GNU bug report logs - #61510
28.2; dired-hide-details-mode shows symlink targets after entering and exiting wdired

Previous Next

Package: emacs;

Reported by: Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>

Date: Tue, 14 Feb 2023 16:40:01 UTC

Severity: normal

Tags: patch

Found in version 28.2

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61510 in the body.
You can then email your comments to 61510 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61510; Package emacs. (Tue, 14 Feb 2023 16:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 14 Feb 2023 16:40:01 GMT) Full text and rfc822 format available.

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

From: Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; dired-hide-details-mode shows symlink targets after entering
 and exiting wdired
Date: Tue, 14 Feb 2023 10:16:52 -0600
[Message part 1 (text/plain, inline)]
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.


In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36,
cairo version 1.17.6)
 of 2023-01-02 built on 2
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Arch Linux

Configured using:
 'configure --with-x-toolkit=gtk3 --with-native-compilation
 --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd
 --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
 -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
 savehist-mode: t
  minions-mode: t
  global-so-long-mode: t
  winner-mode: t
  repeat-mode: t
  global-tree-sitter-mode: t
  dired-hide-details-mode: t
  which-key-mode: t
  shell-dirtrack-mode: t
  gcmh-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/pink/.emacs.d/elpa/transient-20230209.2250/transient hides
/usr/share/emacs/28.2/lisp/transient

Features:
(shadow sort mail-extr emacsbug smtpmail message puny rfc822 mml mml-sec
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils wdired vc-hg vc-bzr tramp-cache
reveal epa-file epa derived epg rfc6068 epg-config calc-stuff calc-arith
calc-alg calc-ext calc-misc calc-menu calc calc-loaddefs rect calc-macs
vterm color term disp-table ehelp vterm-module term/xterm xterm misearch
multi-isearch pdf-sync pdf-annot facemenu pdf-outline pdf-links
pdf-history pdf-occur ibuf-ext ibuffer ibuffer-loaddefs tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
let-alist pdf-misc imenu pdf-tools cus-edit cus-start cus-load wid-edit
pdf-view bookmark jka-compr pdf-cache pdf-info tq pdf-util pdf-macs
image-mode exif rmc org-clock org-duration view mule-util solar cal-dst
holidays hol-loaddefs vc-git diff-mode vc-dispatcher diary-lib
diary-loaddefs cal-iso org-eldoc image-file image-converter org-element
avl-tree generator org-habit ol-info ol-man cl-extra help-mode
face-remap org-agenda org-refile server elec-pair ws-butler cookie1
savehist minions modus-vivendi-theme modus-themes pcase so-long winner
repeat pyvenv eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg
esh-module esh-groups esh-util tree-sitter-langs tree-sitter-langs-build
tar-mode arc-mode archive-mode pp tree-sitter-hl tree-sitter
tree-sitter-load tree-sitter-cli tsc tsc-dyn tsc-dyn-get compile
text-property-search dired-aux dired dired-loaddefs tsc-obsolete
pdf-loader which-key ob-python python tramp-sh tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat shell parse-time ls-lisp
org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete pcomplete comint ansi-color ring
org-list org-faces org-entities noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601
time-date ol rx org-keys oc org-compat advice org-macs org-loaddefs
format-spec find-func cal-menu calendar cal-loaddefs edmacro kmacro gcmh
no-littering compat compat-29 finder-inf info package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 706874 47334)
 (symbols 48 38597 0)
 (strings 32 165536 7878)
 (string-bytes 1 5354713)
 (vectors 16 67055)
 (vector-slots 8 1840625 46771)
 (floats 8 788 2814)
 (intervals 56 3264 1760)
 (buffers 992 33))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61510; Package emacs. (Tue, 14 Feb 2023 17:11:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>
Cc: 61510 <at> debbugs.gnu.org
Subject: Re: bug#61510: 28.2;
 dired-hide-details-mode shows symlink targets after entering and
 exiting wdired
Date: Tue, 14 Feb 2023 19:10:16 +0200
> 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"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61510; Package emacs. (Tue, 14 Feb 2023 23:46:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61510 <at> debbugs.gnu.org,
 Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>
Subject: Re: bug#61510: 28.2; dired-hide-details-mode shows symlink targets
 after entering and exiting wdired
Date: Wed, 15 Feb 2023 00:44:55 +0100
[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)

Added tag(s) patch. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 15 Feb 2023 13:59:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61510; Package emacs. (Sat, 18 Feb 2023 16:42:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 61510 <at> debbugs.gnu.org, cornejodlm <at> ciencias.unam.mx
Subject: Re: bug#61510: 28.2; dired-hide-details-mode shows symlink targets
 after entering and exiting wdired
Date: Sat, 18 Feb 2023 18:41:43 +0200
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>,
>   61510 <at> debbugs.gnu.org
> Date: Wed, 15 Feb 2023 00:44:55 +0100
> 
> > 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:

Thanks.

> 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.

I think this is the right fix, so please install this on the emacs-29
branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61510; Package emacs. (Sun, 19 Feb 2023 10:50:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <Stephen.Berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61510 <at> debbugs.gnu.org, Stephen Berman <stephen.berman <at> gmx.net>,
 cornejodlm <at> ciencias.unam.mx
Subject: Aw: Re: bug#61510: 28.2; dired-hide-details-mode shows symlink
 targets after entering and exiting wdired
Date: Sun, 19 Feb 2023 11:48:58 +0100
> Gesendet: Samstag, den 18.02.2023 um 17:41 Uhr
> Von: "Eli Zaretskii" <eliz <at> gnu.org>
> An: "Stephen Berman" <stephen.berman <at> gmx.net>
> Cc: cornejodlm <at> ciencias.unam.mx, 61510 <at> debbugs.gnu.org
> Betreff: Re: bug#61510: 28.2; dired-hide-details-mode shows symlink targets after entering and exiting wdired
> 
> > From: Stephen Berman <stephen.berman <at> gmx.net>
> > Cc: Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>,
> >   61510 <at> debbugs.gnu.org
> > Date: Wed, 15 Feb 2023 00:44:55 +0100
> > 
> > > 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:
> 
> Thanks.
> 
> > 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.
> 
> I think this is the right fix, so please install this on the emacs-29
> branch.

Thanks. I'm traveling right now and won't be able to do that till I return next Friday.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61510; Package emacs. (Fri, 24 Feb 2023 15:49:01 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61510 <at> debbugs.gnu.org, cornejodlm <at> ciencias.unam.mx
Subject: Re: bug#61510: 28.2; dired-hide-details-mode shows symlink targets
 after entering and exiting wdired
Date: Fri, 24 Feb 2023 16:48:23 +0100
On Sun, 19 Feb 2023 11:48:58 +0100 Stephen Berman <Stephen.Berman <at> gmx.net> wrote:

>> Gesendet: Samstag, den 18.02.2023 um 17:41 Uhr
>> Von: "Eli Zaretskii" <eliz <at> gnu.org>
>> An: "Stephen Berman" <stephen.berman <at> gmx.net>
>> Cc: cornejodlm <at> ciencias.unam.mx, 61510 <at> debbugs.gnu.org
>> Betreff: Re: bug#61510: 28.2; dired-hide-details-mode shows symlink targets
>> after entering and exiting wdired
>> 
>> > From: Stephen Berman <stephen.berman <at> gmx.net>
>> > Cc: Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>,
>> >   61510 <at> debbugs.gnu.org
>> > Date: Wed, 15 Feb 2023 00:44:55 +0100
>> > 
>> > > 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:
>> 
>> Thanks.
>> 
>> > 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.
>> 
>> I think this is the right fix, so please install this on the emacs-29
>> branch.
>
> Thanks. I'm traveling right now and won't be able to do that till I return
> next Friday.

I've now committed the fix to emacs-29 and added a test.

Steve Berman




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 24 Feb 2023 17:04:01 GMT) Full text and rfc822 format available.

Notification sent to Iñaki Cornejo de la Mora <cornejodlm <at> ciencias.unam.mx>:
bug acknowledged by developer. (Fri, 24 Feb 2023 17:04:02 GMT) Full text and rfc822 format available.

Message #27 received at 61510-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 61510-done <at> debbugs.gnu.org, cornejodlm <at> ciencias.unam.mx
Subject: Re: bug#61510: 28.2; dired-hide-details-mode shows symlink targets
 after entering and exiting wdired
Date: Fri, 24 Feb 2023 19:03:27 +0200
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: cornejodlm <at> ciencias.unam.mx,  61510 <at> debbugs.gnu.org
> Date: Fri, 24 Feb 2023 16:48:23 +0100
> 
> I've now committed the fix to emacs-29 and added a test.

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 25 Mar 2023 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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