From: Tino Calancha <tino.calancha@gmail.com>
To: 27633@debbugs.gnu.org
Subject: bug#27633: 26.0.50; Dired doesn't update buffer when wildcards have changed
Date: Mon, 10 Jul 2017 12:02:16 +0900 [thread overview]
Message-ID: <87a84dm1tz.fsf@calancha-pc> (raw)
A 2nd Dired call on the same directory must update
the buffer when the wildcards have changed.
emacs -Q -l dired -eval '(dired (expand-file-name "lisp" source-directory))'
M-: (dired (list default-directory "simple.el")) RET
;; Same Dired buffer.
C-x k RET ; kill the buffer.
;; Show Dired buffer with just 'simple.el':
M-: (dired (list (expand-file-name "lisp" source-directory) "simple.el")) RET
C-x d RET ; Same Dired buffer.
--8<-----------------------------cut here---------------start------------->8---
commit 8772e1bede02b1509fccef0445238e1ec9227a53
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Mon Jul 10 12:00:53 2017 +0900
Revert Dired buffer if wildcards have change
A 2nd Dired call in the same directory must update
the buffer if the wildcards have changed (Bug#27633).
* lisp/dired.el (dired-internal-noselect):
Revert Dired buffer if wildcards change.
diff --git a/lisp/dired.el b/lisp/dired.el
index 0c1f3e4af6..667cf7fba6 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -898,6 +898,10 @@ dired-internal-noselect
(setq dired-directory dir-or-list)
;; this calls dired-revert
(dired-sort-other switches))
+ ;; wildcards have changed.
+ ((not (equal dired-directory dir-or-list))
+ (setq dired-directory dir-or-list)
+ (revert-buffer))
;; Always revert regardless of whether it has changed or not.
((eq dired-auto-revert-buffer t)
(revert-buffer))
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-07-09 built
Repository revision: 273f4bde39af5d87f10fd58f35b666dfa8a996a3
reply other threads:[~2017-07-10 3:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a84dm1tz.fsf@calancha-pc \
--to=tino.calancha@gmail.com \
--cc=27633@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.