unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* improve Dired menus
@ 2009-10-11 20:53 Drew Adams
  2009-10-12  0:21 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2009-10-11 20:53 UTC (permalink / raw
  To: emacs-devel

Dunno why I open this worm can again, but here goes.  I will
avoid getting involved in any discussion, myself.  All I have to
say about it is said here, and should be clear enough.  Discuss
or not, as you like.

----

The Dired menus are `Operate', `Mark', `Regexp', `Immediate', and
`Subdir'.

`Immediate' has become a catch-all - its items are a hodge-podge.
Actually, it has been a catch-all for a long time.  And the names
`Operate' and `Immediate' don't mean much - every command
operates and is immediate.

Perhaps it is because "Immediate" doesn't mean anything specific
that we have stuck items such as `Edit File Names', `Refresh',
and `Isearch in File Names' there - dunno.

I use a better breakdown in dired+.el. I propose that we use
something like it for vanilla Emacs:

 * Rename: `Subdir'    to `Dir'
           `Immediate' to `Single'
           `Operate'   to `Multiple'

 * `Dir' is for general actions on the Dired directory, all of
   its content, and the Dired buffer content.  Some of the
   `Immediate' items belong here, in a separate pane from the
   current `Subdir' items.

 * `Single' is for actions on the current line (single file or
   subdir).  Only some of the `Immediate' items belongs here.

 * `Multiple' is for actions on the marked (or next prefix arg)
   lines (files or subdirs), as now.  The current set of
   `Operate' items is OK as is for `Multiple'.

IOW, each menu would be defined by the objects on which acts: the
Dired directory/buffer, a single file/subdir, or a set of files
and subdirs.


Dir
---

  All items currently in `Subdir' would be in one pane of `Dir'.
  We would move the following items to `Dir' for its non-subdir
  pane:

  --------------------------------------------
  Up Directory                               ^
  Create Directory                           +
  Compare Directories...
  Edit File Names (Wdired)...          C-x C-q
  Isearch in File Names...           M-s f C-s
  Isearch Regexp in File Names...  M-s f C-M-s
  Refresh                                    g
  --------------------------------------------


  FWIW, these are additional items that I add to `Dir':

  --------------------------------------------
  Dired (Filter via Wildcards)...        C-x d
  Dired Marked Files
  Dired Fileset...
  --------------------------------------------

  (I add them mainly to advertize/teach using Dired with a set of
  files.  Too few users are aware of it.)


Single
------

  Menu `Single' would contain (only) the following items:

  --------------------------------------------
  Open                                     RET
  Display in Other Window                  C-o
  View (Read-Only)                           v
  --------------------------------------------
  Diff                                       =
  Diff with Backup                         M-=
  --------------------------------------------
  Display Image                          C-t i
  Display Image Externally               C-t x
  --------------------------------------------
  Insert Subdir                              i
  --------------------------------------------
  Encrypt                                   :e
  Decrypt                                   :d
  Sign                                      :s
  Verify                                    :v
  --------------------------------------------

  The other items currently in `Immediate' would not be in
  `Single'.

  `Insert Subdir' is an addition, but it must be active only when
  point is on a subdir line (bug #4701 filed).  This action would
  thus be in both `Dir' and `Single' menus, because it can be an
  action on a subdir (insert it) or on the Dired directory (go to
  an existing subdir part or return from it).


  FWIW, these are additional items that I add to `Single':

  --------------------------------------------
  Open in Other Window                     C-o    (non-standard)
  Open in Windows Explorer               M-RET
  Open Associated Windows App            C-RET
  --------------------------------------------
  Compare using Ediff                        =    (non-standard)
  --------------------------------------------
  Copy to...
  Rename to...                               r
  Upcase                                   M-u
  Downcase                                 M-l
  Capitalize                               M-c
  Delete                                   C-k
  --------------------------------------------
  Symlink to...
  Hardlink to...
  --------------------------------------------
  Print...                                 M-p
  Grep...
  Compress/Uncompress                        z
  Shell Command...
  Byte Compile                               b
  Load
  --------------------------------------------
  Change Mode...                           M-m
  Change Group...
  Change Owner
  --------------------------------------------

  (Items such as `Copy to' are somewhat redundant wrt the similar
  items in `Multiple', but they are not the same.  Here, they
  always act on the current line's file, even if there are marked
  files.  IOW, they are shortcuts for using a prefix arg with the
  `Multiple' items.)


Multiple
--------

  No change is needed in the set of items from the current
  content of `Operate'.  But we might want to group items using
  separators:

  --------------------------------------------
  Copy to...                                 C
  Rename to...                               R
  Delete Marked (not Flagged)...             D
  --------------------------------------------
  Print...                                   P
  Compress/Uncompress                        Z
  Shell Command...                           !
  Byte Compile                               B
  Load                                       L
  --------------------------------------------
  Symlink to (Absolute)...                   S
  Hardlink to...                             H
  --------------------------------------------
  Search Files...                            A
  Query Replace...                           Q
  Isearch Files...                   M-s a C-s
  Isearch Regexp Files...          M-s a C-M-s
  --------------------------------------------
  Change Timestamp...
  Change Mode...                             M
  --------------------------------------------
  Display Image Thumbnails               C-t d
  Add Image Content...                   C-t c
  Add Image Tags...                      C-t t
  Delete Image Tag...                    C-t r
  --------------------------------------------


  FWIW, these are additional items that I add to `Multiple':

  --------------------------------------------
  Open                                       F
  Open Associated Windows App
  Dired (Marked)
  Copy File Names (to Paste)                 w
  --------------------------------------------
  Upcase                                    %u
  Downcase                                  %l
  Capitalize
  Delete Flagged                             x
  --------------------------------------------
  Symlink to (Relative)...                   Y
  --------------------------------------------
  Grep...                                  M-g
  --------------------------------------------
  Change Group...                            G
  Change Owner...                            O
  --------------------------------------------

  Dired on the marked files is thus in both `Dir' (to advertize
  it) and `Multiple'.  The former is not needed, but I think it
  helps.


Enjoy.  Discuss or ignore.





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

* RE: improve Dired menus
  2009-10-11 20:53 improve Dired menus Drew Adams
@ 2009-10-12  0:21 ` Drew Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2009-10-12  0:21 UTC (permalink / raw
  To: emacs-devel

I'm unfamiliar with the encryption commands, so in my proposal I left them in
the menu where they were. After looking at the code a bit, it seems there is a
bug (filed as #4703) - they should be in the Operate menu, not the Immediate
menu.

For my proposal, they would thus be in `Multiple', not `Single'. They each act
on the set of marked files (or the next prefix arg files).

This is another example of the mischievousness of such meaningless names as
"Immediate". Apparently, whoever added them to `Immediate' just figured "Hey,
they're immediate", which of course they are - like all commands.

Also in bug #4703: If these menu items do not apply to subdirectory lines, then
an appropriate :enable entry should be added to disable them for non-file lines.





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

end of thread, other threads:[~2009-10-12  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-11 20:53 improve Dired menus Drew Adams
2009-10-12  0:21 ` Drew Adams

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).