Browse Source

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
Mark Dawson 3 years ago
parent
commit
ef31364bc8
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/ob-tangle.el

+ 4 - 1
lisp/ob-tangle.el

@@ -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