all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Drew Adams <drew.adams@oracle.com>
Cc: jan <rtm443x@googlemail.com>, 41524@debbugs.gnu.org
Subject: bug#41524: 26.3; Request for 'x' for 'execute' in dired menu
Date: Mon, 24 Aug 2020 11:50:42 -0400	[thread overview]
Message-ID: <CADwFkmnPN1=O9hB4thuYzGb1HXAqP-LhRbVxd0FaM+fKyC3s4Q@mail.gmail.com> (raw)
In-Reply-To: <64f184cb-21ed-4181-9e61-9d08041c8740@default>

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

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

> It belongs on menu `Operate', as it operates on the
> (typically) multiple files that are marked (or flagged).

Ah, right.  I never use the menu so I overlooked that.

Should be fixed in the attached.

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Add-Delete-submenu-to-Dired-Operate-menu.patch --]
[-- Type: text/x-diff, Size: 1629 bytes --]

From 645c91dce0714de04366ad7981361bb25d964d8b Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Mon, 24 Aug 2020 02:17:52 +0200
Subject: [PATCH] Add "Delete" submenu to Dired "Operate" menu

* lisp/dired.el (dired-mode-map): Add "Delete" submenu to "Operate"
menu with an entry for 'dired-do-flagged-delete'.  (Bug#41524)
---
 lisp/dired.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lisp/dired.el b/lisp/dired.el
index 94d3befda8..08d0468851 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2244,8 +2244,15 @@ dired-mode-map
       '(menu-item "Shell Command..." dired-do-shell-command
 		  :help "Run a shell command on current or marked files"))
     (define-key map [menu-bar operate delete]
-      '(menu-item "Delete" dired-do-delete
-		  :help "Delete current file or all marked files"))
+      `(menu-item "Delete"
+                  ,(let ((menu (make-sparse-keymap "Delete")))
+                     (define-key menu [delete-flagged]
+                       '(menu-item "Delete Flagged Files" dired-do-flagged-delete
+                                   :help "Delete all files flagged for deletion (D)"))
+                     (define-key menu [delete-marked]
+                       '(menu-item "Delete Marked (Not Flagged) Files" dired-do-delete
+                                   :help "Delete current file or all marked files (excluding flagged files)"))
+                     menu)))
     (define-key map [menu-bar operate rename]
       '(menu-item "Rename to..." dired-do-rename
 		  :help "Rename current file or move marked files"))
-- 
2.28.0


  reply	other threads:[~2020-08-24 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 11:22 bug#41524: 26.3; Request for 'x' for 'execute' in dired menu jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-25 15:05 ` Drew Adams
2020-08-24  0:26   ` Stefan Kangas
2020-08-24 15:09     ` Drew Adams
2020-08-24 15:50       ` Stefan Kangas [this message]
2020-08-24 16:04         ` Drew Adams
2020-08-25 18:34           ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmnPN1=O9hB4thuYzGb1HXAqP-LhRbVxd0FaM+fKyC3s4Q@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=41524@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=rtm443x@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.