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