GNU bug report logs - #57293
29.0.50; query-replace with Wdired skips symlink target

Previous Next

Package: emacs;

Reported by: Mike Kupfer <mkupfer <at> alum.berkeley.edu>

Date: Fri, 19 Aug 2022 03:12:02 UTC

Severity: normal

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 57293 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#57293: 29.0.50; query-replace with Wdired skips symlink target
Date: Sat, 20 Aug 2022 18:54:45 -0700
Stefan Kangas wrote:

> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
> 
> > Mike Kupfer <mkupfer <at> alum.berkeley.edu> writes:
> >
> >> I expect query-replace to ask me about both the file foo and the symlink
> >> target foo.  That's what Emacs 28.1 does, and it's quite handy.
> >> Instead, query-replace asks me only about the file foo, ignoring the
> >> symlink target.
> >
> > Thanks for the report, Mike.  See the new option
> > `wdired-search-replace-filenames' to turn off the new behavior.
> >
> > Maybe turning this new behavior on by default was too much (Juri)?
> 
> Shouldn't we get the Emacs 28 behavior whether or not that option is
> enabled though?  IOW, isn't this just a bug?

The docstring says

  Non-nil to search and replace in file names only.

so it does look like the relevant control.  (But I wouldn't be surprised
if I were missing something.)

I have a slight preference for getting the Emacs 28 behavior by default,
but I'm okay either way.  If there had been a NEWS entry about the new
option (hint hint :-)) I wouldn't have filed a bug.

I agree with Michael's point about "\M-sf".  Right now, you get the
filename-only behavior for isearch via a specific functions and
keybindings, but for query-replace, the behavior is controlled by a user
option.  More consistency between isearch and query-replace seems like
it would be a good thing.

I did notice this NEWS entry:

  *** Search and replace in Dired/Wdired supports more regexps.
  For example, the regexp ".*" will match only characters that are part
  of the file name.  Also "^.*$" can be used to match at the beginning
  of the file name and at the end of the file name.

Does that functionality require wdired-search-replace-filenames to be
non-nil?

cheers,
mike




This bug report was last modified 2 years and 273 days ago.

Previous Next


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