Explorar o código

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.
Christian Dietrich %!s(int64=5) %!d(string=hai) anos
pai
achega
a72466ce8d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/ob-tangle.el

+ 1 - 1
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