emacs-devel
[Top][All Lists]
Advanced

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

RE: dired-details[+].el


From: Drew Adams
Subject: RE: dired-details[+].el
Date: Wed, 16 May 2012 09:10:40 -0700

Thanks for looking into this again, Stefan. 

> A technical reason is lack of copyright paperwork.  I'm not 
> sure if the email I used in the Cc is valid.  If so, Rob,
> could you contact me to get this copyright business out of the way?

Hopefully Rob will answer, but I'm pretty sure he already took care of the
copyright stuff.  The most recent reply we have from Rob is from this address:
address@hidden

This is that reply:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6799#23. Note too that he included
the latest patches in that message.

> > Rob's change log and RMS's call for comment:
> > http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg01187.html
> 
> This was mangled by the non-MIME forwarding, but I think I managed to
> unmangle it (see after my sig).  Some of the hunks don't 
> apply any more, but they're trivial to fix.  There are a few minor
> details to make before we can install the code:

Please check also the patches in his message a few weeks ago (see above), just
in case there is some difference that might be important.

> > +    (define-key map "(" 'dired-details-hide)
> > +    (define-key map ")" 'dired-details-show)
> > +    (define-key map ";" 'dired-details-toggle)
> 
> I'd rather place the bindings on a "dired-details" prefix.

FWIW, I think we need only one keybinding, for just `dired-details-toggle'.
It's good to have the other commands too, but I'm not sure they need key
bindings.  Just one opinion.  Personally, I use only the toggle, and I bind it
to `)' - and also to `(', for the heck of it.  I never use the other two
commands, but users are different.

So in particular I see no need for a prefix key - a single keystroke should be
sufficient for everything that one wants to do with `dired-details'.

Note that the toggle (at least as I defined it, and I think Rob's patches kept
this behavior) affects future Dired buffers - IOW the new setting persists after
toggling in the current Dired buffer, so that it is used thereafter
(everywhere).

> > +(defcustom dired-details-hide-link-targets t
> > +  "*Hide symbolic link target paths."
> > +  :group 'dired-details
> > +  :type 'boolean)
> 
> FWIW I find something like (setq truncate-lines t) to be better.

Not the same thing.  And not better, IMO - less specific.  Hiding symlink
targets should apply regardless of line length.  Truncating is only about
handling long lines.  (But I don't really care about this matter.)

> Since line truncation is the default in tabulated-list-mode, maybe we
> should also make it the default in dired.

Egads, no, please.

No, I won't fight over the default value, but I think truncated lines as the
default is nearly always a bad idea.  An extra reason is that some users will
have no clue what's going on and how to show the missing info.

Truncating lines is nearly a barbarism that should go the way of the dinosaurs.
No, just kidding.  It can be handy if you know how to toggle it, but truncation
should not be the default (anywhere), IMHO.

Again though, not very important.

> > +(defun dired-details-toggle (&optional arg default-too)
> > +  "Toggle visibility of dired details.
> > +With positive prefix argument ARG hide the details, with negative
> > +show them."
> > +  (interactive "P")
> > +  (let ((hide (if (null arg)
> > +                  (not (eq 'hidden dired-details-state))
> > +                (> (prefix-numeric-value arg) 0))))
> > +    (if default-too
> > +        (setq dired-details-initially-hide hide))
> > +    (if hide (dired-details-hide)
> > +      (dired-details-show))))
> 
> Use define-minor-mode.

I think I disagree, and I feel more strongly about this point.  The current
behavior is what I like, and I'm not sure how using a minor mode would provide
it.  This is the behavior:

 Toggling affects only the current Dired buffer and subsequently
 created Dired buffers.  It does not affect other existing Dired buffers.

A local minor mode would affect only the current Dired buffer and not
subsequently created ones.  A global minor mode would affect all Dired buffers
at the same time.  

The current toggle is very handy.  Toggling twice, just to show something for a
moment for example, does not show everything in all Dired buffers (as would a
global minor mode).  It has an effect only on the current buffer (since you did
it twice).

And the fact that toggling sets the "mode" for all new Dired buffers is very
handy, though it's hard for me to do justice as to why.  Just try it for a
while, to see.  Drill down the directory hierarchy, for instance.  But again, I
can't really characterize the value using a particular example - just try it.

I really suggest (ask that) you play with the existing feature a while, before
suggesting behavior changes.

> > +(defun dired-details-hide-overlay (o)
> > +  (overlay-put o 'invisible t)
> > +  (overlay-put o 'before-string dired-details-hidden-string))
> 
> Why use dired-details-hidden-string rather than just using the
> traditional ellipsis with buffer-invisibility-spec?

The first thing I did when getting dired-details.el was change the string to "",
and I've never looked back.  In my use of it, hiding the details means showing
nothing in their place.  And in the commentary of dired-details+.el I
recommended that others do the same.

FWIW, This is important to me.  When I hide details I get a _minimal_ Dired
display.  And I automatically fit its frame to the content, so the frame takes
up a minimum of screen real estate.  It's thus almost like a speedbar (narrow),
but the buffer still has the full functionality of Dired.

HTH.




reply via email to

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