From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find multiline regexps Date: Wed, 25 Nov 2020 17:48:11 +0200 Message-ID: <83k0u9sais.fsf@gnu.org> References: <10120030-8b8d-b702-add4-8f099f934ed5@chalmers.se> <91c98791-9df2-43ee-9aac-205c5b0de9c2@default> <87blfm6922.fsf@mail.linkov.net> <838saqtsm9.fsf@gnu.org> <87mtz64htw.fsf@mail.linkov.net> <831rgitqe2.fsf@gnu.org> <87y2iqnhh2.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7789"; mail-complaints-to="usenet@ciao.gmane.io" Cc: abela@chalmers.se, 31796@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 25 16:49:09 2020 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 1khx2b-0001uT-LW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Nov 2020 16:49:09 +0100 Original-Received: from localhost ([::1]:55232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khx2a-0000jU-A2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Nov 2020 10:49:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khx2U-0000jA-DR for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2020 10:49:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khx2U-0001NI-62 for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2020 10:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khx2U-0001c9-3E for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2020 10:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Nov 2020 15:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31796 X-GNU-PR-Package: emacs Original-Received: via spool by 31796-submit@debbugs.gnu.org id=B31796.16063193026149 (code B ref 31796); Wed, 25 Nov 2020 15:49:02 +0000 Original-Received: (at 31796) by debbugs.gnu.org; 25 Nov 2020 15:48:22 +0000 Original-Received: from localhost ([127.0.0.1]:36720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khx1p-0001b7-VS for submit@debbugs.gnu.org; Wed, 25 Nov 2020 10:48:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khx1n-0001at-Lk for 31796@debbugs.gnu.org; Wed, 25 Nov 2020 10:48:20 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46588) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khx1g-00016s-8z; Wed, 25 Nov 2020 10:48:12 -0500 Original-Received: from [176.228.60.248] (port=4344 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khx1f-0005mj-7j; Wed, 25 Nov 2020 10:48:12 -0500 In-Reply-To: <87y2iqnhh2.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 25 Nov 2020 09:28:57 +0200) 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:194205 Archived-At: > From: Juri Linkov > Cc: drew.adams@oracle.com, abela@chalmers.se, 31796@debbugs.gnu.org > Date: Wed, 25 Nov 2020 09:28:57 +0200 > > >> >> dired-do-find-regexp-and-replace could be left bound to Q, but > >> >> dired-do-query-replace-regexp could be bound to M-% in Dired. > >> > > >> > How will this help when the command to continue the loop is not bound > >> > to any key? > >> > >> dired-do-query-replace-regexp works like normal 'M-%' with 'y/n/!' > >> keys and automatically moves to the next file on multiple files. > >> So it seemes it doesn't need a key to continue the loop. > > > > AFAIR, it does need a way to continue the loop if the user exits the > > loop. > > Where would the users get the idea that it's possible to interrupt > query-replace and resume it anytime later, if single-file query-replace > doesn't support this feature? In the manual. And in their muscle memory: we are talking about users who knew about the original binding of Q in Dired, so we should assume they also know about the possibility of exiting the loop and then resuming it. the command that was previously bound to Q used the UI that is very similar to find-tag: you are presented with the first hit, and then go to the next one, and the one after it, etc. "Exiting the loop" can be as simple as moving point or switching to another buffer to consult some other part of Emacs. It is very natural. Once you've done that, you'd want to resume the loop. > I can't find where this feature of continuing the loop is > documented. (info "(emacs) Query Replace") only says: > > To restart a ‘query-replace’ once it is exited, use ‘C-x > ’, which repeats the ‘query-replace’ because it used the minibuffer > to read its arguments. *Note C-x : Repetition. Wrong part of the manual, and the text which described that was removed from the manual when we changed the binding. Visit the Emacs 24 manual and go to "Operating on Files", a section of the "Dired" chapter. There you will see this text: `Q REGEXP TO ' Perform `query-replace-regexp' on each of the specified files, replacing matches for REGEXP with the string TO (`dired-do-query-replace-regexp'). This command is a variant of `tags-query-replace'. If you exit the query replace loop, you can use `M-,' to resume the scan and replace more matches. *Note Tags Search::. The new UI presents all the hits in a separate window, so you can easily use that to go to any hit you want even if you exit the loop.