unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15799: 24.3.50; dired-hide-details-mode:  Provide default key binding
@ 2013-11-04  8:09 Jambunathan K
  2013-11-04 14:06 ` Stefan Monnier
  2013-11-15  5:15 ` Jambunathan K
  0 siblings, 2 replies; 8+ messages in thread
From: Jambunathan K @ 2013-11-04  8:09 UTC (permalink / raw)
  To: 15799


All my dired buffers, hide the details by default (See below).  I
propose "@" as a key for toggling the details.

I suggest 

    (defun dired-mode-hook ()
      (dired-hide-details-mode 1)
      (local-set-key "@" 'dired-hide-details-mode))


In GNU Emacs 24.3.50.5 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2013-11-04 on debian-6.05
Bzr revision: 114933 monnier@iro.umontreal.ca-20131104042959-sy10svhxghg2z9ei
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description:	Debian GNU/Linux 6.0.5 (squeeze)






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#15799: 24.3.50; dired-hide-details-mode:  Provide default key binding
  2013-11-04  8:09 bug#15799: 24.3.50; dired-hide-details-mode: Provide default key binding Jambunathan K
@ 2013-11-04 14:06 ` Stefan Monnier
  2013-11-04 14:32   ` Drew Adams
  2013-11-15  5:15 ` Jambunathan K
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2013-11-04 14:06 UTC (permalink / raw)
  To: Jambunathan K; +Cc: 15799

severity 15799 wishlist
thanks

> All my dired buffers, hide the details by default (See below).  I
> propose "@" as a key for toggling the details.

I wouldn't mind, but since I don't myself use dired much, I'd like to
hear what actual users think about it.  Also, wouldn't it make sense to
try and bring hide-details "closer" to the dired-omit facilities?


        Stefan





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#15799: 24.3.50; dired-hide-details-mode:  Provide default key binding
  2013-11-04 14:06 ` Stefan Monnier
@ 2013-11-04 14:32   ` Drew Adams
  2013-11-04 16:35     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2013-11-04 14:32 UTC (permalink / raw)
  To: Stefan Monnier, Jambunathan K; +Cc: 15799

> > All my dired buffers, hide the details by default (See below).  I
> > propose "@" as a key for toggling the details.

See bug #14940, which provides a patch with a much better solution.

> I wouldn't mind, but since I don't myself use dired much, I'd like
> to hear what actual users think about it.

See bug #14940.  See also bug #14914.

See also Dired+
http://www.emacswiki.org/emacs-en/download/dired%2b.el

> Also, wouldn't it make sense to try and bring hide-details
> "closer" to the dired-omit facilities?

Definitely not.  No relation.  Completely different uses.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#15799: 24.3.50; dired-hide-details-mode:  Provide default key binding
  2013-11-04 14:32   ` Drew Adams
@ 2013-11-04 16:35     ` Stefan Monnier
  2013-11-04 17:35       ` bug#14914: " Drew Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2013-11-04 16:35 UTC (permalink / raw)
  To: Drew Adams; +Cc: 15799, Jambunathan K

> See bug #14940.  See also bug #14914.

Thanks.  For #14914, there's no doubt for me that we should use
a "[✓] Hide details" menu entry.

>> Also, wouldn't it make sense to try and bring hide-details
>> "closer" to the dired-omit facilities?
> Definitely not.  No relation.  Completely different uses.

Of course, they're different, but I assume the @ was chosen because it's
also used for things like outline-minor-mode, i.e. for other features
that hide parts of the buffer.

So, maybe @ should be a prefix key for "hiding stuff", in which we can
place key bindings for "omit" and for "details".


        Stefan





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14914: bug#15799: 24.3.50; dired-hide-details-mode:  Provide default key binding
  2013-11-04 16:35     ` Stefan Monnier
@ 2013-11-04 17:35       ` Drew Adams
  2013-11-06  7:31         ` Jambunathan K
  2020-10-28  8:41         ` Stefan Kangas
  0 siblings, 2 replies; 8+ messages in thread
From: Drew Adams @ 2013-11-04 17:35 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 15799, 14914, Jambunathan K

> Thanks.  For #14914, there's no doubt for me that we should use
> a "[✓] Hide details" menu entry.

Sounds good to me (except it should be title case: `Hide Details').

> >> Also, wouldn't it make sense to try and bring hide-details
> >> "closer" to the dired-omit facilities?
> >
> > Definitely not.  No relation.  Completely different uses.
> 
> Of course, they're different, but I assume the @ was chosen because
> it's also used for things like outline-minor-mode, i.e. for other
> features that hide parts of the buffer.

`@' was proposed by Jambunathan, not I.  I have no special objection
to `@' instead of `(', however.

But I'm not convinced that it is good to confuse hiding stuff in
Dired with outline-minor-mode hiding.

> So, maybe @ should be a prefix key for "hiding stuff", in which we
> can place key bindings for "omit" and for "details".

I don't object to that.  As long as the two, hiding columns and
hiding rows, are kept clear and separate, no problem.

But there is really more to it than that.  There are at least these
hide/show commands in Dired:

$    (`dired-hide-subdir')
M-$  (`dired-hide-all')
(    (`dired-hide-details-mode')
M-o  (`dired-omit-mode')

It is good that each of these is quick, but yes, we could put them
all on a prefix key.  In that case, `M-o', `M-$', and `$' are also
good candidates for the prefix key.

We could have, for example:

M-o s  (`dired-hide-subdir')       - `s' for subdi
M-o S  (`dired-hide-all')          - `S' for subdirs
M-o c  (`dired-hide-details-mode') - `c' for columns
M-o r  (`dired-omit-mode')         - `r' for rows

No Shift key needed for them, except for the one that boosts `s'.

FWIW, Dired+ adds these commands, which could also be added to the
list, perhaps with these bindings:

M-o m  (`diredp-omit-marked')      - `m' for marked
M-o u  (`diredp-omit-unmarked')    - `u' for unmarked

Here are their (trivial) definitions:

(defun diredp-omit-marked ()
  "Omit lines of marked files.  Return the number of lines omitted."
  (interactive)
  (let ((old-modified-p  (buffer-modified-p))
        count)
    (when (interactive-p) (message "Omitting marked lines..."))
    (setq count  (dired-do-kill-lines nil "Omitted %d line%s."))
    (set-buffer-modified-p old-modified-p) ; So no `%*' appear in mode-line.
    count))

(defun diredp-omit-unmarked ()
  "Omit lines of unmarked files.  Return the number of lines omitted."
  (interactive)
  (let ((old-modified-p  (buffer-modified-p))
        count)
    (dired-toggle-marks)
    (message "Omitting unmarked lines...")
    (setq count  (diredp-omit-marked))
    (dired-toggle-marks)                ; Marks all except `.', `..'
    (set-buffer-modified-p old-modified-p) ; So no `%*' appear in mode-line.
    count))





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14914: bug#15799: 24.3.50; dired-hide-details-mode:  Provide default key binding
  2013-11-04 17:35       ` bug#14914: " Drew Adams
@ 2013-11-06  7:31         ` Jambunathan K
  2020-10-28  8:41         ` Stefan Kangas
  1 sibling, 0 replies; 8+ messages in thread
From: Jambunathan K @ 2013-11-06  7:31 UTC (permalink / raw)
  To: Drew Adams; +Cc: 14914, 15799


>> Of course, they're different, but I assume the @ was chosen because
>> it's also used for things like outline-minor-mode, i.e. for other
>> features that hide parts of the buffer.
>
> `@' was proposed by Jambunathan, not I.  I have no special objection
> to `@' instead of `(', however.

I do object to '('.  

Partly because I am tempted to think ')' will undo whatever it's other
pair did.

> But there is really more to it than that.  There are at least these
> hide/show commands in Dired:
>
> $    (`dired-hide-subdir')
> M-$  (`dired-hide-all')
> (    (`dired-hide-details-mode')
> M-o  (`dired-omit-mode')
>
> It is good that each of these is quick, but yes, we could put them
> all on a prefix key.  In that case, `M-o', `M-$', and `$' are also
> good candidates for the prefix key.

$ is indeed better than @.  Remember `$' is used in conjunction with
selective display.  

> We could have, for example:
>
> M-o s  (`dired-hide-subdir')       - `s' for subdi
> M-o S  (`dired-hide-all')          - `S' for subdirs
> M-o c  (`dired-hide-details-mode') - `c' for columns
> M-o r  (`dired-omit-mode')         - `r' for rows

I object to M-o.  The verb `Omit' is generally not used.  It has bad
connotations.  (My mom will spank me if I omitted something)

Let's omit omit and stick with show or hide.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#15799: 24.3.50; dired-hide-details-mode:  Provide default key binding
  2013-11-04  8:09 bug#15799: 24.3.50; dired-hide-details-mode: Provide default key binding Jambunathan K
  2013-11-04 14:06 ` Stefan Monnier
@ 2013-11-15  5:15 ` Jambunathan K
  1 sibling, 0 replies; 8+ messages in thread
From: Jambunathan K @ 2013-11-15  5:15 UTC (permalink / raw)
  To: 15799-done


OP here.  Closed.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14914: bug#15799: 24.3.50; dired-hide-details-mode: Provide default key binding
  2013-11-04 17:35       ` bug#14914: " Drew Adams
  2013-11-06  7:31         ` Jambunathan K
@ 2020-10-28  8:41         ` Stefan Kangas
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Kangas @ 2020-10-28  8:41 UTC (permalink / raw)
  To: Drew Adams; +Cc: 14914-done

Drew Adams <drew.adams@oracle.com> writes:

>> Thanks.  For #14914, there's no doubt for me that we should use
>> a "[✓] Hide details" menu entry.
>
> Sounds good to me (except it should be title case: `Hide Details').

This is now the case on current master, so I'm closing this bug.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-28  8:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-04  8:09 bug#15799: 24.3.50; dired-hide-details-mode: Provide default key binding Jambunathan K
2013-11-04 14:06 ` Stefan Monnier
2013-11-04 14:32   ` Drew Adams
2013-11-04 16:35     ` Stefan Monnier
2013-11-04 17:35       ` bug#14914: " Drew Adams
2013-11-06  7:31         ` Jambunathan K
2020-10-28  8:41         ` Stefan Kangas
2013-11-15  5:15 ` Jambunathan K

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).