From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#57293: 29.0.50; query-replace with Wdired skips symlink target Date: Sun, 21 Aug 2022 19:37:13 +0300 Organization: LINKOV.NET Message-ID: <86a67xk46m.fsf@mail.linkov.net> References: <40517.1661046885@alto> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5787"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Michael Heerdegen , 57293@debbugs.gnu.org, Stefan Kangas To: Mike Kupfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 21 18:51:36 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPoAi-0001H2-42 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Aug 2022 18:51:36 +0200 Original-Received: from localhost ([::1]:59488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPoAh-0008HF-3E for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Aug 2022 12:51:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPoAE-0007av-Qt for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 12:51:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46909) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPoAB-0004vK-CU for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 12:51:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPoAB-0006Nc-8p for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 12:51:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Aug 2022 16:51:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57293 X-GNU-PR-Package: emacs Original-Received: via spool by 57293-submit@debbugs.gnu.org id=B57293.166110062124446 (code B ref 57293); Sun, 21 Aug 2022 16:51:03 +0000 Original-Received: (at 57293) by debbugs.gnu.org; 21 Aug 2022 16:50:21 +0000 Original-Received: from localhost ([127.0.0.1]:36656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPo9U-0006M7-Dc for submit@debbugs.gnu.org; Sun, 21 Aug 2022 12:50:20 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:41751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPo9Q-0006Ll-Fo for 57293@debbugs.gnu.org; Sun, 21 Aug 2022 12:50:18 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 2AB131BF205; Sun, 21 Aug 2022 16:50:05 +0000 (UTC) In-Reply-To: <40517.1661046885@alto> (Mike Kupfer's message of "Sat, 20 Aug 2022 18:54:45 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240339 Archived-At: >> > 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.) The main question is what constitutes a file name? The old definition was that replaceable file names are everywhere where read-only is nil. The new definition is that file names are everywhere where the text property 'dired-filename' is non-nil. So if "foo" in "bar -> foo" had the text property 'dired-filename', query-replace would visit it as well. But wouldn't such change break some other commands? > 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. A NEWS entry could be added too unless something like below will make it obsolete. > 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. Please note that unlike the corresponding option dired-isearch-filenames that is nil, it makes much more sense to enable wdired-search-replace-filenames by default because renaming file names is the primary use of WDired. > 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? Indeed, when wdired-search-replace-filenames is nil, ".*" matches whole lines.