forked from mirrors/org-mode
Merge branch 'bugfix'
This commit is contained in:
commit
2b7ea20346
|
@ -187,15 +187,12 @@ source code blocks by languages matching a regular expression.
|
||||||
|
|
||||||
Return a list whose CAR is the tangled file name."
|
Return a list whose CAR is the tangled file name."
|
||||||
(interactive "fFile to tangle: \nP")
|
(interactive "fFile to tangle: \nP")
|
||||||
(let ((visited-p (find-buffer-visiting (expand-file-name file)))
|
(let ((visited (find-buffer-visiting file))
|
||||||
to-be-removed)
|
(buffer (or visited (find-file-noselect file))))
|
||||||
(prog1
|
(with-current-buffer buffer
|
||||||
(save-window-excursion
|
(org-with-wide-buffer
|
||||||
(find-file file)
|
(mapcar #'expand-file-name (org-babel-tangle nil target-file lang-re))))
|
||||||
(setq to-be-removed (current-buffer))
|
(unless visited (kill-buffer buffer))))
|
||||||
(mapcar #'expand-file-name (org-babel-tangle nil target-file lang-re)))
|
|
||||||
(unless visited-p
|
|
||||||
(kill-buffer to-be-removed)))))
|
|
||||||
|
|
||||||
(defun org-babel-tangle-publish (_ filename pub-dir)
|
(defun org-babel-tangle-publish (_ filename pub-dir)
|
||||||
"Tangle FILENAME and place the results in PUB-DIR."
|
"Tangle FILENAME and place the results in PUB-DIR."
|
||||||
|
|
Loading…
Reference in New Issue