unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 67028@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <83ttpuxc5c.fsf@gnu.org> (raw)
In-Reply-To: <SJ0PR10MB54882AA7F19ECC6B98E40A01F3AFA@SJ0PR10MB5488.namprd10.prod.outlook.com> (message from Drew Adams on Thu, 9 Nov 2023 20:00:25 +0000)

> From: Drew Adams <drew.adams@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)





  reply	other threads:[~2023-11-10  8:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 20:00 bug#67028: 29.1; WDired should restore the previous `mode-name' when returning to Dired mode Drew Adams
2023-11-10  8:09 ` Eli Zaretskii [this message]
2023-11-10 17:21   ` Drew Adams
2023-11-10 19:55     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ttpuxc5c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67028@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).