Subject: 28.0.50; Dired inserted subdir ignores dired-hide-details-mode after hiding and unhiding
From: Sean Devlin <[email-masked]>
To: [email-masked]
Date: Wed, 28 Jul 2021 15:25:02 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi folks,

In dired buffers, inserted subdirectories do not respect
dired-hide-details-mode after they have been hidden and unhidden.

Reproduction steps for 'emacs -Q':

1. Open a directory using dired. (To make the bug more obvious, it's
best to choose a subdirectory that is not empty.)

2. Move the point to a subdirectory's name and press 'i' to insert a
listing of that subdirectory at the bottom of the buffer.

3. Press '(' to enable dired-hide-details-mode. Observe that the details
from both the main directory and the subdirectory listing are
hidden. (You can toggle the mode a few more times here to verify it
works correctly to hide and show the details of both listings.)

4. Move the point down to the subdirectory listing and press '$' to hide
the listing.

5. Press '$' again to unhide the subdirectory listing. Observe that the
listing now shows the full details for the directory.

6. Toggle dired-hide-details-mode a few times and verify that it no
longer affects the listing for the subdirectory.

Workaround: press 'g' to revert the buffer and verify that the
subdirectory respects dired-hide-details-mode again.

Thanks!

In GNU Emacs 28.0.50
Repository revision: 794ec934a76d0647a72b7be32e20dc5b95e5ec11
Repository branch: master
Windowing system distributor 'Apple'
System Description:  macOS

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' PKG_CONFIG_PATH=/opt/brew/lib/pkgconfig'

Configured features:
ACL DBUS GNUTLS JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG
THREADS TOOLKIT_SCROLL_BARS 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:
  dired-hide-details-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map
text-property-search time-date subr-x seq byte-opt gv bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils dired-aux cl-loaddefs cl-lib dired
dired-loaddefs iso-transl tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-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 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 kqueue cocoa ns
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 57990 9212)
(symbols 48 6662 1)
(strings 32 19018 1628)
(string-bytes 1 629285)
(vectors 16 13872)
(vector-slots 8 187413 8579)
(floats 8 21 44)
(intervals 56 765 0)
(buffers 992 12))