mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-27 07:37:25 +00:00
ob-core: Fix failing tests.
* lisp/ob-core.el (org-babel-result-to-file): Do not assume current buffer is visiting a file.
This commit is contained in:
parent
20b5d8aaec
commit
003af466c5
@ -2501,9 +2501,11 @@ in the buffer."
|
||||
If the `default-directory' is different from the containing
|
||||
file's directory then expand relative links."
|
||||
(when (stringp result)
|
||||
(let ((same-directory? (not (string= (expand-file-name default-directory)
|
||||
(expand-file-name
|
||||
(file-name-directory buffer-file-name))))))
|
||||
(let ((same-directory?
|
||||
(and buffer-file-name
|
||||
(not (string= (expand-file-name default-directory)
|
||||
(expand-file-name
|
||||
(file-name-directory buffer-file-name)))))))
|
||||
(format "[[file:%s]%s]"
|
||||
(if (and default-directory buffer-file-name same-directory?)
|
||||
(if (eq org-link-file-path-type 'adaptive)
|
||||
|
Loading…
Reference in New Issue
Block a user