bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14940: 24.3.50; [PATCH] enhancement for `dired-hide-details-mode'


From: Drew Adams
Subject: bug#14940: 24.3.50; [PATCH] enhancement for `dired-hide-details-mode'
Date: Tue, 23 Jul 2013 09:28:59 -0700 (PDT)

`dired-hide-details-mode' is essentially a reimplementation of
dired-details (by Rob Giardina).  The Emacs 24 implementation of
hiding details is better (more efficient) that that of dired-details,
which is a good thing.

But the behavior is not as good for users as that available with
dired-details+.  Attached is a patch that rectifies this.  It gives
users more control.

These are the enhancements:

1. Users can decide whether the initial hide/show state of new Dired
   buffers reflects the last chosen state for a Dired buffer.  This is
   decided by option `dired-hide-details-propagate'.  Non-nil means
   propagate the last chosen state as the initial state of a new Dired
   buffer.

2. If `dired-hide-details-propagate' is nil, or if the user has not
   yet explicitly changed any Dired hide/show state, then option
   `dired-hide-details-initially' defines the initial state of a new
   Dired buffer.  IOW, it specifies what the "last" state defaults to.

In the patch the default value of each option is t, but this is open
for discussion.  In my experience with dired-details+ most users
prefer to hide details by default and to let the last chosen state
update the default state.

But if we wanted to keep the traditional behavior by default then we
would just set both options to nil by default.  The main point is to
give users a choice.

Note that regardless of the option values, once a user has chosen a
state for a given Dired buffer it remains in effect until s?he hits
`(' to choose a different state for _that buffer_.  IOW, the options
affect only new Dired buffers, that is, buffers where the user has not
yet used `('.  A user display choice for a given buffer is never
overridden.

Initialization behavior applies also to `C-x C-v RET', that is,
accepting the same directory as the alternate one to visit.  This is
in keeping with `find-alternate-file' resetting other Dired settings
(markings, omissions, display order, switches, etc.).  Reverting using
`g', however, keeps the user's chosen display state; i.e., unlike `C-x
C-v RET', the state is not reinitialized with `g'.

Reasons to have non-nil default values for both options:

a. `dired-hide-details-propagate': Hide details by default.
   Simpler, screen-space conservative.  Show details on demand: `('.

b. `dired-hide-details-propagate': Propagate last view by default.
   This essentially tells Emacs, "Don't do anything I haven't told you
   to do.  Just keep doing what I last told you to do until I tell you
   otherwise."

For more explanation of why it is a good idea for
`dired-hide-details-propagate' ti be non-nil by default, see the thread
on emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00644.html


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-07-14 on ODIEONE
Bzr revision: 113423 address@hidden
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 CFLAGS='-O0 -g3' CPPFLAGS='-Ic:/Devel/emacs/include'
 LDFLAGS='-Lc:/Devel/emacs/lib''

Attachment: dired-2013-07-20.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]