unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: 58256@debbugs.gnu.org
Subject: bug#58256: Possible mistake in recent `dired-do-flagged-delete' change
Date: Sun, 02 Oct 2022 22:46:15 +0200	[thread overview]
Message-ID: <871qrqt0mg.fsf@gmx.net> (raw)
In-Reply-To: <CADwFkmmmY2ffrr2rkm6njCxb6cjSB2vE_oC4cWBnuKnJA3LeCg@mail.gmail.com> (Stefan Kangas's message of "Sun, 2 Oct 2022 20:42:17 +0200")

On Sun, 2 Oct 2022 20:42:17 +0200 Stefan Kangas <stefankangas@gmail.com> wrote:

> It seems like there might be a mistake in the `dired-do-flagged-delete'
> of this commit:
>
>     commit 194d54a929a83fede75d618b104acd1b544feb10
>     Author: Stephen Berman <stephen.berman@gmx.net>
>     Date:   Fri Jun 4 12:01:41 2021 +0200
>
>         Fix placement of point in Dired deletion operations
>
> It seems like there is a `dolist' that will always run on the empty
> list.  Was perhaps the below the intended change?

Yeah, it looks like I mistakenly put the dolist in the 'else' clause
instead of the 'then' clause.  Thanks for catching that.

On Sun, 2 Oct 2022 19:17:27 +0000 Stefan Kangas <stefankangas@gmail.com> wrote:

> 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?

I think doing it that way leaves the markers in the buffer, though
probably for typical use cases that's not a problem, and it is simpler
that way (as I noted when I posted my patch).  I guess the same
simplification can be applied to `dired-do-delete' as well.

Steve Berman





  parent reply	other threads:[~2022-10-02 20:46 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
2022-10-02 20:46 ` Stephen Berman [this message]
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=871qrqt0mg.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=58256@debbugs.gnu.org \
    --cc=stefankangas@gmail.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).