mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 23:17:49 +00:00
Fix tangling in indirect buffers
* lisp/ob-tangle.el (org-babel-tangle-single-block): Get file name from base buffer. (org-babel-tangle): Use file name from attribute list returned by org-babel-tangle-single-block. Reported-by: Rainer M Krug <Rainer@krugs.de> <http://permalink.gmane.org/gmane.emacs.orgmode/100845>
This commit is contained in:
parent
5adb8bcfa2
commit
85e0c1ce75
|
@ -242,7 +242,7 @@ used to limit the exported source code blocks by language."
|
|||
(base-name (cond
|
||||
((string= "yes" tangle)
|
||||
(file-name-sans-extension
|
||||
(buffer-file-name)))
|
||||
(nth 1 spec)))
|
||||
((string= "no" tangle) nil)
|
||||
((> (length tangle) 0) tangle)))
|
||||
(file-name (when base-name
|
||||
|
@ -427,7 +427,7 @@ list to be used by `org-babel-tangle' directly."
|
|||
(start-line
|
||||
(save-restriction (widen)
|
||||
(+ 1 (line-number-at-pos (point)))))
|
||||
(file (buffer-file-name))
|
||||
(file (buffer-file-name (buffer-base-buffer)))
|
||||
(src-lang (nth 0 info))
|
||||
(params (nth 2 info))
|
||||
(extra (nth 3 info))
|
||||
|
|
Loading…
Reference in a new issue