Explorar el Código

Babel: Stop tangling failing in an indirect buffer

* ob-tangle.el (org-babel-tangle): Make it work in an indirect buffer.

The problem was that the message generated after tangling included the
file name of the current buffer which was nil in an indirect buffer.

TINYCHANGE
Shaun Johnson hace 14 años
padre
commit
de63411264
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      lisp/ob-tangle.el

+ 2 - 1
lisp/ob-tangle.el

@@ -243,7 +243,8 @@ exported source code blocks by language."
        (org-babel-tangle-collect-blocks lang))
       (message "tangled %d code block%s from %s" block-counter
                (if (= block-counter 1) "" "s")
-	       (file-name-nondirectory (buffer-file-name (current-buffer))))
+	       (file-name-nondirectory
+		(buffer-file-name (or (buffer-base-buffer) (current-buffer)))))
       ;; run `org-babel-post-tangle-hook' in all tangled files
       (when org-babel-post-tangle-hook
 	(mapc