ob-tangle: Fix incorrect buff name in org-src edit

* lisp/ob-tangle.el (org-babel-tangle): Fix stringp error which happens
when confirming successful tangle when `org-babel-tangle' is called from
an org-src edit buffer.

TINYCHANGE
This commit is contained in:
Mark Dawson 2021-09-19 20:50:37 +08:00 committed by TEC
parent 069bcba529
commit ef31364bc8
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 4 additions and 1 deletions

View File

@ -284,7 +284,10 @@ matching a regular expression."
(if (= block-counter 1) "" "s")
(file-name-nondirectory
(buffer-file-name
(or (buffer-base-buffer) (current-buffer)))))
(or (buffer-base-buffer)
(current-buffer)
(and (org-src-edit-buffer-p)
(org-src-source-buffer))))))
;; run `org-babel-post-tangle-hook' in all tangled files
(when org-babel-post-tangle-hook
(mapc