GNU bug report logs - #73635
dired-do-query-replace-regexp should check if files are selected first

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 5 Oct 2024 03:46:01 UTC

Severity: wishlist

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73635-done <at> debbugs.gnu.org, Visuwesh <visuweshm <at> gmail.com>
Subject: bug#73635: dired-do-query-replace-regexp should check if files are selected first
Date: Sat, 26 Oct 2024 05:53:14 +0800
>> > E.g., yes there were files selected, but we just did a first run, and
>> > are no longer looking at the dired buffer. We need to go back to the
>> > dired buffer first. Fine. But at least let the user know before they
>> > bother entering the from and to values.
>> 
>> It uses the filename under point if there are no marked files like all
>> dired commands.

EZ> Right, and so I think there's no bug here to fix, and I'm therefore
EZ> closing it.

There is no check that the user is staring at the dired buffer first
before asking for the two strings.

So the user thinks they can mark some files, have a look at one, and
then do dired-do-query-replace-regexp... and it asks for the two
strings, and then says they have not selected any files.

But they did select the files. But they need to be back in the dired
buffer before running dired-do-query-replace-regexp. So
dired-do-query-replace-regexp should tell them that, instead of asking
them for the two strings.

In fact what needs to be changed is:
dired-do-query-replace-regexp needs to first check if the current buffer
is a dired buffer.

And if it is not, it needs to say "Must be run in a dired buffer" and
quit.

(Even if there is only one dired buffer in buffer-list.)




This bug report was last modified 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.