GNU bug report logs - #67028
29.1; WDired should restore the previous `mode-name' when returning to Dired mode

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 9 Nov 2023 20:02:01 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 67028 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 67028 <at> debbugs.gnu.org
Subject: Re: bug#67028: 29.1;
 WDired should restore the previous `mode-name' when returning to
 Dired mode
Date: Fri, 10 Nov 2023 10:09:35 +0200
> From: Drew Adams <drew.adams <at> oracle.com>
> Date: Thu, 9 Nov 2023 20:00:25 +0000
> 
> Dunno how simple and sure this would be to do, but I think that when you
> quit WDired the mode-line should show the same `mode-name' it showed
> before you entered WDired.  E.g., if the `mode-name' was "Dired by name"
> then it should be restored to that.
> 
> Instead, when you quit WDired the `mode-name' is always set to just
> "Dired".  You lose the info that the sorting is by name or by date.

Thanks.  Does the patch below give good results?

diff --git a/lisp/wdired.el b/lisp/wdired.el
index 7b9c75d..079d93d 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -453,7 +453,7 @@ wdired-change-to-dired-mode
   (force-mode-line-update)
   (setq buffer-read-only t)
   (setq major-mode 'dired-mode)
-  (setq mode-name "Dired")
+  (dired-sort-set-mode-line)
   (dired-advertise)
   (dired-hide-details-update-invisibility-spec)
   (remove-hook 'kill-buffer-hook #'wdired-check-kill-buffer t)




This bug report was last modified 1 year and 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.