GNU bug report logs -
#61510
28.2; dired-hide-details-mode shows symlink targets after entering and exiting wdired
Previous Next
Full log
Message #11 received at 61510 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, 14 Feb 2023 19:10:16 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>
>> Date: Tue, 14 Feb 2023 10:16:52 -0600
>>
>> When using dired-hide-details-mode with the default of hiding symlink
>> targets (setq dired-hide-details-hide-symlink-targets t), the targets
>> become visible when entering wdired (expected and really useful)
>> but they remain visible after exiting the mode with any of:
>> - wdired-abort-changes
>> - wdired-exit
>> - wdired-finish-edit
>>
>> The only way to restore the previous look is to toggle
>> dired-hide-details-mode off and on so that symlink targets are
>> hidden again. I assume this is unexpected behaviour and hope this helps.
>
> Thank you for your report.
>
> To make the investigation of this issue easier, could you please post
> a step-by-step recipe for reproducing this starting from "emacs -Q"?
I can reproduce the problem:
0. emacs -Q
1. Visit a directory in Dired where you have write permission, e.g. /tmp
and on some file line there, e.g. .X0-lock, type `S bla RET' to set
the symlink "bla" to that file. Now the directory has e.g. this
entry:
lrwxrwxrwx 1 steve steve 13 Feb 15 00:31 bla -> /tmp/.X0-lock
2. Type `(' to enable dired-hide-details-mode; now the previous entry
looks like this:
bla ->
3. Type `C-x C-q' to enter wdired-mode; now the previous entry looks
like this:
bla -> /tmp/.X0-lock
4. Type `C-x C-s' to return to dired-mode; the previous entry still
looks like this
bla -> /tmp/.X0-lock
instead of like this:
bla ->
With the patch below the result after step 4 is "bla ->". But I haven't
tested it with any other case, so maybe it has unwanted consequences.
Steve Berman
[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 771458508e6..5572dcb32f3 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -455,6 +455,7 @@ wdired-change-to-dired-mode
(setq major-mode 'dired-mode)
(setq mode-name "Dired")
(dired-advertise)
+ (dired-hide-details-update-invisibility-spec)
(remove-hook 'kill-buffer-hook #'wdired-check-kill-buffer t)
(remove-hook 'before-change-functions #'wdired--before-change-fn t)
(remove-hook 'after-change-functions #'wdired--restore-properties t)
This bug report was last modified 2 years and 165 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.