From: Stefan Kangas <stefankangas@gmail.com>
To: 58256@debbugs.gnu.org
Cc: Stephen Berman <stephen.berman@gmx.net>
Subject: bug#58256: Possible mistake in recent `dired-do-flagged-delete' change
Date: Sun, 2 Oct 2022 19:17:27 +0000 [thread overview]
Message-ID: <CADwFkmkvtm+bc2mmyCTMOJ7gXBZxf3VBOEkureV5L_22cUBpww@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmmmY2ffrr2rkm6njCxb6cjSB2vE_oC4cWBnuKnJA3LeCg@mail.gmail.com> (Stefan Kangas's message of "Sun, 2 Oct 2022 20:42:17 +0200")
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
Stefan Kangas <stefankangas@gmail.com> writes:
> If so, I wonder how this code would have worked without that `dolist' so
> far, and if that line could just be removed instead?
The command seems to be working correctly with the attached patch.
Am I missing something here?
[-- Attachment #2: 0001-lisp-dired.el-dired-do-flagged-delete-Simplify.patch --]
[-- Type: text/x-diff, Size: 1313 bytes --]
From 6500b271658a7a71ff8856b2f423d87557307bbf Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 2 Oct 2022 21:08:40 +0200
Subject: [PATCH] * lisp/dired.el (dired-do-flagged-delete): Simplify.
---
lisp/dired.el | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/lisp/dired.el b/lisp/dired.el
index b9e89292e2..7d3940832a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3661,19 +3661,13 @@ dired-do-flagged-delete
(interactive)
(let* ((dired-marker-char dired-del-marker)
(regexp (dired-marker-regexp))
- case-fold-search markers)
+ case-fold-search)
(if (save-excursion (goto-char (point-min))
(re-search-forward regexp nil t))
- (dired-internal-do-deletions
+ (dired-internal-do-deletions
(nreverse
- ;; this can't move point since ARG is nil
- (dired-map-over-marks (cons (dired-get-filename)
- (let ((m (point-marker)))
- (push m markers)
- m))
- nil))
+ (dired-map-over-marks (cons (dired-get-filename) (point-marker)) nil))
nil t)
- (dolist (m markers) (set-marker m nil))
(or nomessage
(message "(No deletions requested)")))))
--
2.30.2
next prev parent reply other threads:[~2022-10-02 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 18:42 bug#58256: Possible mistake in recent `dired-do-flagged-delete' change Stefan Kangas
2022-10-02 19:17 ` Stefan Kangas [this message]
2022-10-02 20:46 ` Stephen Berman
2022-10-02 22:30 ` 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=CADwFkmkvtm+bc2mmyCTMOJ7gXBZxf3VBOEkureV5L_22cUBpww@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=58256@debbugs.gnu.org \
--cc=stephen.berman@gmx.net \
/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).