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: Sun, 23 Aug 2020 20:26:33 -0400 [thread overview]
Message-ID: <CADwFkmkGCxuBB-+Mu21baGpKzXAROk9OtRp_TRKoRHX5o+0f=w@mail.gmail.com> (raw)
In-Reply-To: <e9a7a89e-ceb4-4444-82ed-d4944d5a8cd6@default> (Drew Adams's message of "Mon, 25 May 2020 08:05:25 -0700 (PDT)")
[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]
tags 41524 + patch
thanks
Drew Adams <drew.adams@oracle.com> writes:
>> I was using dired recently after a very long break from it.
>>
>> I marked some files for deletion, wasn't sure how to actually trigger
>> the delete, had a suspicion it was 'x' but checked the menu anyway (I
>> often use the menu merely as a handy cheat-sheet for the keyboard
>> commands). It appears not to be there.
>>
>> If it is actually missing I request it be added as it makes no sense
>> for
>> beginners, who may actually use the menu with the mouse, to be able to
>> variously mark stuff but then lack a way of carrying them out.
>
> Yes, `x' is not in a menu-bar menu. It should be.
>
> If you use Dired+, it is. There, you have submenu
> `Delete', with menu items `Delete Marked (not Flagged)'
> and `Delete Flagged'. The former has key `D', and the
> latter has key `x'.
>
> (In Dired+, menu-bar menu `Operate' is named `Multiple',
> so submenu `Delete' is `Multiple > Delete', not `Operate
>> Delete'.)
How does the attached patch look?
(I had a look at Dired+ and lifted some help strings from there.
Thanks Drew.)
Best regards,
Stefan Kangas
[-- Attachment #2: 0001-Add-Delete-submenu-to-Dired-Mark-menu.patch --]
[-- Type: text/x-diff, Size: 1466 bytes --]
From 935683608dc3e9ab0d607fb5cdf0eca3d50b280d 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 "Mark" menu
* lisp/dired.el (dired-mode-map): Add "Delete" submenu.
(Bug#41524)
---
lisp/dired.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lisp/dired.el b/lisp/dired.el
index aad44a6d69..7d70f4288e 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2065,6 +2065,16 @@ dired-mode-map
:help "Replace marker with another character"))
(define-key map [menu-bar mark unmark-all]
'(menu-item "Unmark All" dired-unmark-all-marks))
+ (define-key map [menu-bar mark delete]
+ `(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 (not flagged files)"))
+ menu)))
(define-key map [menu-bar mark symlinks]
'(menu-item "Mark Symlinks" dired-mark-symlinks
:visible (fboundp 'make-symbolic-link)
--
2.28.0
next prev parent reply other threads:[~2020-08-24 0:26 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 [this message]
2020-08-24 15:09 ` Drew Adams
2020-08-24 15:50 ` Stefan Kangas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmkGCxuBB-+Mu21baGpKzXAROk9OtRp_TRKoRHX5o+0f=w@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 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).