João Pedro de Amorim Paula <jpedrodeamo...@gmail.com> writes: > I realized the function `org-babel-tangle-comment-links' won't return the > relative file path regardless of the value of > `org-babel-tangle-use-relative-file-links', is this the intended behaviour > or a bug? Here's the source code for `org-babel-tangle-comment-links' for > reference:
> (defun org-babel-tangle-comment-links (&optional info) > "Return a list of begin and end link comments for the code block at point. > INFO, when non nil, is the source block information, as returned > by `org-babel-get-src-block-info'." > (let ((link-data (pcase (or info (org-babel-get-src-block-info 'no-eval)) > (`(,_ ,_ ,params ,_ ,name ,start ,_) > `(("start-line" . ,(org-with-point-at start > (number-to-string > (line-number-at-pos)))) > ("file" . ,(buffer-file-name)) > ("link" . ,(org-babel-tangle--unbracketed-link params)) > ("source-name" . ,name)))))) > (list (org-fill-template org-babel-tangle-comment-format-beg link-data) > (org-fill-template org-babel-tangle-comment-format-end link-data)))) > > I believe the line where `file' is assigned to `(buffer-file-name)` should > be a check for `org-babel-tangle-use-relative-file-links'. `org-babel-tangle-use-relative-file-links' only concerns links - "link" part of the return value. Not the "file" part. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>