diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2022-04-01 09:01:35 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2022-04-01 09:01:35 +0200 |
commit | 2429b9d8c902a26656e0d600abc1b3740208fa3c (patch) | |
tree | 383dd08fbd6e54071fc9b09a16e83052a0353446 /lisp/image-mode.el | |
parent | 8c031d8fcf04a9d79f7a1e90bc0c59d27b16e3b8 (diff) | |
download | emacs-2429b9d8c902a26656e0d600abc1b3740208fa3c.tar.gz emacs-2429b9d8c902a26656e0d600abc1b3740208fa3c.tar.bz2 emacs-2429b9d8c902a26656e0d600abc1b3740208fa3c.zip |
More robust checks for directory buffers in image-mode
* lisp/image-mode.el (image-mode--directory-buffers): Apply more
robust checks for directory buffers. (Bug#54606)
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r-- | lisp/image-mode.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index d7dfb4336b9..721f2f2bbd8 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -1196,8 +1196,9 @@ replacing the current Image mode buffer." "Return an alist of type/buffer for all \"parent\" buffers to image FILE. This is normally a list of Dired buffers, but can also be archive and tar mode buffers." - (let ((buffers nil) - (dir (file-name-directory file))) + (let* ((non-essential t) ; Do not block for remote buffers. + (buffers nil) + (dir (file-name-directory file))) (cond ((and (boundp 'tar-superior-buffer) tar-superior-buffer) @@ -1212,6 +1213,8 @@ tar mode buffers." (dolist (buffer (buffer-list)) (with-current-buffer buffer (when (and (derived-mode-p 'dired-mode) + (equal (file-remote-p dir) + (file-remote-p default-directory)) (equal (file-truename dir) (file-truename default-directory))) (push (cons 'dired (current-buffer)) buffers)))) |