branch: externals/org
commit c730caf512d62e959e092aee75e5ade8a76f4f50
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>

    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: 赵一宇 <[email protected]>
    Link: 
https://list.orgmode.org/orgmode/[email protected]/
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index e470efa9e1..cf8f84293d 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2741,7 +2741,7 @@ specified as an an \"attachment:\" style link."
   (when (stringp result)
     (let* ((result-file-name (expand-file-name result))
            (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)))
            (same-directory?
            (and base-file-name

Reply via email to