diff options
author | Christian Dietrich <stettberger@dokucode.de> | 2019-08-13 15:43:03 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-08-22 09:50:26 +0200 |
commit | a72466ce8dbc15b3a214156483e7b6d28c275c1a (patch) | |
tree | 27df6222494bdff7f5ba42c16a3509176fa345ec | |
parent | 96cc762ff3ef9bf71d8d19e1a2fa82a0aa745a74 (diff) | |
download | org-mode-a72466ce8dbc15b3a214156483e7b6d28c275c1a.tar.gz |
Fix bug in org-babel-tangle-file with symlinked files
Assume that there is file A and symlink B that points to file A. If
there is an open buffer that points to A and we
call (org-babel-tangle-file "B"), then this function kills the buffer
since get-file-buffer does not follow symlinks.
-rw-r--r-- | lisp/ob-tangle.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index f9f7859..7dbd618 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -174,7 +174,7 @@ export file for all source blocks. Optional argument LANG can be used to limit the exported source code blocks by language. Return a list whose CAR is the tangled file name." (interactive "fFile to tangle: \nP") - (let ((visited-p (get-file-buffer (expand-file-name file))) + (let ((visited-p (find-buffer-visiting (expand-file-name file))) to-be-removed) (prog1 (save-window-excursion |