[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6799: dired-details[+].el
From: |
Stefan Monnier |
Subject: |
bug#6799: dired-details[+].el |
Date: |
Wed, 16 May 2012 18:57:31 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
>> 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.
At least I can't find him in the FSF's copyright-list.
Sometimes some entries are missing, so if he says he did sign the
papers, I'll ask the copyright clerk to investigate.
> The most recent reply we have from Rob is from
> this address: rob.giardina@gmail.com.
Thanks, I added it to the Cc.
> 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.
Thanks. Moved this thread to the bug. The patch there looks very
similar to the one I just reviewed.
>> > + (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'.
Actually, I think you're right.
>> > +(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.)
Not the same thing indeed, but in many cases, truncation makes
hiding unnecessary.
>> 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.
I find truncated lines to be the only good choice for text displayed in
columns, where wrapping breaks the clean visual display.
I don't claim it's perfect, but I think it's a generally better default.
> An extra reason is that some users will have no clue what's going on
> and how to show the missing info.
If that's really a problem, it's a general one that needs to be fixed in
general (e.g. by adding horizontal scroll bars and/or supporting
horizontal scrolling via two-finger gestures or things like that).
> 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.
Obviously a matter of taste.
> 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.
I don't see why using define-minor-mode would prevent this behavior.
> 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.
A local minor mode can change global defaults as well.
>> > +(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.
You could still get this result by changing buffer-invisibility-spec, so
it's not an objection.
Stefan
- bug#6799: dired-details[+].el,
Stefan Monnier <=