all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Menu bindings for dired-x
@ 2005-10-24 14:57 Lars Hansen
  0 siblings, 0 replies; only message in thread
From: Lars Hansen @ 2005-10-24 14:57 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

dired-x have no menu bindings.
I think some of the commands fit naturally into the dired menus.
I suggest to bind the commands

   dired-do-find-marked-files
   dired-do-relsymlink
   dired-flag-extension
   dired-mark-extension
   dired-mark-omitted
   dired-do-relsymlink-regexp
   dired-omit-mode

as shown in the first attacment.
The second attachment is a patch to dired-x.el that does it.

Any objections/additions/comments?



[-- Attachment #2: dired-menu.txt --]
[-- Type: text/plain, Size: 2182 bytes --]

Operate
-------
Copy to...                (C)
Rename to...              (R)
Delete                    (D)
Find files                (F) <NEW
Shell Command...          (!)
Symlink to...             (S)
Relative symlink to...    (Y) <NEW
Hardlink to...            (H)
Print...                  (P)
Compress                  (Z)
Byte-compile              (B)
Load                      (L)
Change Timestamp...       (T)
Change Mode...            (M)
Change Group...           (G)
Change Owner...           (O)
Search Files...           (A)
Query Replace in Files... (Q)

Mark
----
Toggle Marks              (t)
Mark                      (m)
Unmark                    (u)
Flag                      (d)
Flag Auto-save Files      (#)
Flag Backup Files         (~)
Flag Garbage Files        (&)
Flag extension...                <NEW
Mark Executables          (* *)
Mark Old Backups          (.)
Mark Directories          (* /)
Mark Symlinks             (* @)
Mark extension...         (* .)  <NEW
Mark omitted              (* O)  <NEW
Unmark All                (U)
Change Marks...           (* c)
Next Marked               (M-})
Previous Marked           (M-{)

Rexexp
------
Mark Containing...        (% g)
Mark...                   (% m)
Flag...                   (% d)
Copy...                   (% C)
Rename...                 (% R)
Symlink...                (% S)
Relative symlink...       (% Y)  <NEW
Hardlink...               (% H)
Upcase                    (% u)
Downcase                  (% l)

Immediate
---------
Edit File Names
Create Directory...       (+)
Find This File            (e)
Find in Other Window      (o)
Display in Other Window   (C-o)
View This File            (v)
Diff...                   (=)
Compare with Backup       (M-=)
Compare directories...
<separator>
Omit mode                 (M-o)  <NEW
Refresh                   (g)

Subdir
------
Insert This Subdir        (i)
Next Dirline              (>)
Prev Dirline              (<)
Next Subdir               (C-M-n)
Prev Subdir               (C-M-p)
Up Directory              (^)
Tree Up                   (C-M-u)
Tree Down                 (C-M-d)
Hide/UnHide Subdir        ($)
Hide All                  (M-$)


[-- Attachment #3: patch --]
[-- Type: text/plain, Size: 2372 bytes --]

*** /home/lh/cvsroot/emacs/lisp/dired-x.el	2005-10-23 19:48:06.000000000 +0200
--- /home/lh/emacs/LH-work/test/dired-x.1.64.patched.el	2005-10-24 13:33:48.314202496 +0200
***************
*** 261,266 ****
--- 261,332 ----
  (if dired-bind-info
      (define-key dired-mode-map "I" 'dired-info))
  
+ ;;; MENU BINDINGS
+ 
+ (let ((menu-bar (lookup-key dired-mode-map [menu-bar])))
+   (let ((menu (lookup-key menu-bar [operate])))
+     (define-key-after
+       menu
+       [find-files]
+       '(menu-item
+         "Find files"
+         dired-do-find-marked-files
+         :help "Find current or marked files")
+       'delete)
+     (define-key-after
+       menu
+       [relsymlink]
+       '(menu-item
+         "Relative symlink to..."
+         dired-do-relsymlink
+         :visible (fboundp 'make-symbolic-link)
+         :help "Make relative symbolic links for current or marked files")
+       'symlink))
+   (let ((menu (lookup-key menu-bar [mark])))
+     (define-key-after
+       menu
+       [flag-extension]
+       '(menu-item
+         "Flag extension..."
+         dired-flag-extension
+         :help "Flag files with a certain extension for deletion")
+       'garbage-files)
+     (define-key-after
+       menu
+       [mark-extension]
+       '(menu-item
+         "Mark extension..."
+         dired-mark-extension
+         :help "Mark files with a certain extension")
+       'symlinks)
+     (define-key-after
+       menu
+       [mark-omitted]
+       '(menu-item
+         "Mark omitted"
+         dired-mark-omitted
+         :help "Mark files matching `dired-omit-files' and `dired-omit-extensions'")
+       'mark-extension))
+   (let ((menu (lookup-key menu-bar [regexp])))
+     (define-key-after
+       menu
+       [relsymlink-regexp]
+       '(menu-item
+         "Relative symlink..."
+         dired-do-relsymlink-regexp
+         :visible (fboundp 'make-symbolic-link)
+         :help "Make relative symbolic links for files matching regexp")
+       'symlink))
+   (let ((menu (lookup-key menu-bar [immediate])))
+     (define-key-after
+       menu
+       [omit-mode]
+       '(menu-item
+         "Omit mode" dired-omit-mode
+         :button (:toggle . dired-omit-mode)
+         :help "Enable or disable omitting \"uninteresting\" files")
+       'dashes)))
+ 
  ;;; GLOBAL BINDING.
  (if dired-bind-jump
      (progn


[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-24 14:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-24 14:57 Menu bindings for dired-x Lars Hansen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.