emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ob-tangle.el: fix ‘:comments noweb’ double linking


From: Max Nikulin
Subject: Re: [PATCH] ob-tangle.el: fix ‘:comments noweb’ double linking
Date: Wed, 3 Aug 2022 22:55:36 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 31/07/2022 06:42, Hraban Luyat wrote:
Before:

    ;; [[file:test.org::*Main][Main:1]]
    1
    ;; [[[[file:/tmp/test.org::inner][inner]]][inner]]

After:

    ;; [[file:test.org::*Main][Main:1]]
    1
    ;; [[file:test.org::inner][inner]]

Certainly the fix will be an improvement.

+      (when bare
+        (if (and org-babel-tangle-use-relative-file-links
+                 (string-match org-link-types-re bare)
+                 (string= (match-string 1 bare) "file"))
+            (concat "file:"
+                    (file-relative-name (substring bare (match-end 0))
+                                        (file-name-directory
+                                         (cdr (assq :tangle params)))))

Is there any problem with the following?

     (alist-get :tangle params)

+          bare)))))

I have not read the patch care carefully, so I may miss something. It seems that (when bare (if (and other...) (action) bare)) may be simplified to

    (and bare other... (action))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]