org-babel-result-to-file: Fix when in indirect buffer
* lisp/ob-core.el (org-babel-result-to-file): Consider file name in base buffer when calculating base directory. Reported-by: 赵一宇 <zhyznd@163.com> Link: https://list.orgmode.org/orgmode/3d69c850.69db.18953ae45da.Coremail.zhyznd@163.com/
This commit is contained in:
parent
26440689aa
commit
c730caf512
|
@ -2741,7 +2741,7 @@ specified as an an \"attachment:\" style link."
|
||||||
(when (stringp result)
|
(when (stringp result)
|
||||||
(let* ((result-file-name (expand-file-name result))
|
(let* ((result-file-name (expand-file-name result))
|
||||||
(base-file-name (buffer-file-name (buffer-base-buffer)))
|
(base-file-name (buffer-file-name (buffer-base-buffer)))
|
||||||
(base-directory (and buffer-file-name
|
(base-directory (and base-file-name
|
||||||
(file-name-directory base-file-name)))
|
(file-name-directory base-file-name)))
|
||||||
(same-directory?
|
(same-directory?
|
||||||
(and base-file-name
|
(and base-file-name
|
||||||
|
|
Loading…
Reference in New Issue