GNU bug report logs - #31796
26.1; dired-do-find-regexp-and-replace fails to find multiline regexps

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Žygimantas Bruzgys <me@HIDDEN>; dated Tue, 12 Jun 2018 07:56:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 6 Dec 2020 21:16:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 16:16:16 2020
Received: from localhost ([127.0.0.1]:51500 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1km1OB-00035r-UR
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 16:16:16 -0500
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56969)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1km1OA-00035G-Mu
 for 31796 <at> debbugs.gnu.org; Sun, 06 Dec 2020 16:16:15 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id E18A41BF204;
 Sun,  6 Dec 2020 21:16:06 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
 <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
 <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <87blffns95.fsf@HIDDEN>
 <8c124412-3bb3-fd92-4c3b-da4b3a8bdcac@HIDDEN>
 <87blfec4l3.fsf@HIDDEN>
 <00d1c8ef-5601-6445-199e-1590ddfae9e9@HIDDEN>
Date: Sun, 06 Dec 2020 23:00:24 +0200
In-Reply-To: <00d1c8ef-5601-6445-199e-1590ddfae9e9@HIDDEN> (Dmitry Gutov's
 message of "Thu, 3 Dec 2020 04:46:43 +0200")
Message-ID: <87eek2902v.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: Eli Zaretskii <eliz@HIDDEN>, abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> dired-do-find-regexp uses 'ignores' to filter out ignored files.
>> You could add another filter to filter out files without matches
>> using 'grep -PzL'.
>
> Right. This is sorta a backup plan. Although, when the number of files to
> search can be counted on one hand, there's nothing too bad in doing the
> search in Emacs.

Another backup plan is to use ripgrep.  Its multiline handling with -U
also allows to search words ignoring any whitespace, even newlines.
This is like isearch-lax-whitespace using search-whitespace-regexp
when it contains a newline, e.g. "[ \t\r\n]+".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 3 Dec 2020 05:27:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 03 00:27:03 2020
Received: from localhost ([127.0.0.1]:37983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkh8t-00019N-Pk
	for submit <at> debbugs.gnu.org; Thu, 03 Dec 2020 00:27:03 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39448)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1kkh8r-000197-Kv
 for 31796 <at> debbugs.gnu.org; Thu, 03 Dec 2020 00:26:58 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37086)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1kkh8l-0006DF-Ks; Thu, 03 Dec 2020 00:26:51 -0500
Received: from rms by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rms@HIDDEN>)
 id 1kkh8a-0001ix-OX; Thu, 03 Dec 2020 00:26:40 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <83wny0f6bk.fsf@HIDDEN> (message from Eli Zaretskii on Wed, 02
 Dec 2020 19:47:43 +0200)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN> <83k0u1il6c.fsf@HIDDEN>
 <E1kkJiU-0003uD-Lq@HIDDEN> <83blfcgst9.fsf@HIDDEN>
 <c863133b-0bd3-81a1-23c6-373fff789835@HIDDEN> <83zh2wf6or.fsf@HIDDEN>
 <0646a65f-db21-b377-6897-caeb6ff3e10c@HIDDEN> <83wny0f6bk.fsf@HIDDEN>
Message-Id: <E1kkh8a-0001ix-OX@HIDDEN>
Date: Thu, 03 Dec 2020 00:26:40 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Subject: bug#31796: 27.1;
  >  dired-do-find-regexp-and-replace fails to find multiline regexps
  > Resent-From: Eli Zaretskii <eliz@HIDDEN>
  > Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
  > Resent-CC: bug-gnu-emacs@HIDDEN
  > Resent-Sender: help-debbugs@HIDDEN
  > To: Dmitry Gutov <dgutov@HIDDEN>
  > Date: Wed, 02 Dec 2020 19:47:43 +0200
  > Message-Id: <83wny0f6bk.fsf@HIDDEN>
  > From: Eli Zaretskii <eliz@HIDDEN>
  > In-Reply-To: <0646a65f-db21-b377-6897-caeb6ff3e10c@HIDDEN> (message from
  >  Dmitry Gutov on Wed, 2 Dec 2020 19:43:52 +0200)
  > Cc: abela@HIDDEN, rms@HIDDEN, 31796 <at> debbugs.gnu.org

  > > Cc: rms@HIDDEN, abela@HIDDEN, 31796 <at> debbugs.gnu.org
  > > From: Dmitry Gutov <dgutov@HIDDEN>
  > > Date: Wed, 2 Dec 2020 19:43:52 +0200
  > > 
  > > >> Although... since it has to scan the full file anyway, it could first do
  > > >> a quick detection, and then maybe rescan from the beginning if the
  > > >> encoding turns out to be something else.
  > > > 
  > > > That'd be too late, as some matches were already output.
  > > 
  > > It could buffer them until the full file has been parsed. Encoding 
  > > detection and conversion must add a certain overhead anyway, so I'm not 
  > > sure how expensive the extra buffering would be in comparison.
  > > 
  > > As a bonus, per-file buffering like that would allow easier 
  > > parallelization of searches.

  > Buffering means you don't output matches as soon as you find them,
  > which might be regarded as a kind of regression -- see Richard's bug
  > reports a few days ago.  And since you never know where in the file
  > the telltale byte sequences will appear, you will need to always wait
  > until the entire file is read -- which could be prohibitive for very
  > large files.

In my case, I was definitely going to wait until the search finished,
to see all the responses.

But it is mudh easier to look at them if they come out one by one,
rather than all at once due to buffering.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 3 Dec 2020 02:46:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 21:46:54 2020
Received: from localhost ([127.0.0.1]:37910 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkedy-0005nR-Kk
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2020 21:46:54 -0500
Received: from mail-ej1-f44.google.com ([209.85.218.44]:44553)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kkedw-0005nB-Gl
 for 31796 <at> debbugs.gnu.org; Wed, 02 Dec 2020 21:46:52 -0500
Received: by mail-ej1-f44.google.com with SMTP id m19so1146408ejj.11
 for <31796 <at> debbugs.gnu.org>; Wed, 02 Dec 2020 18:46:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=ZbMHvETBfsELd0eyMngZ4vYFuboos2leNnzXF2O84i8=;
 b=oC71Oi+dXSBbM/UynksI2ssrjdY/FwniDbU7MjzzmkXda5rputNU9sfON6iHBYt6Wc
 QmYH58r0wwjDQK8JDmL1Bp2dDHyRQMUEjEkEJ2HrA2e7vNvge5TFmcKt7K6wjQrrtFWG
 jX8WzbbLvJol8QofDg20jzIdMMfUKEw5MM5FFe67dIH8b/ZBqFJKWf54nWSCREgDGgFE
 /OwM2By66dvSkB/VN047R7vD23skjzm5IQ3JbBvH6tdC7gDglKpQ71nSNZDQ7dz+Hzyy
 YIYpZT9jfzOr5qxYV2p2pOcEqHeLeLiTnXNciIHtBHcoDqcH95B8srJ6w4mAzzwNJ4Nr
 ymyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=ZbMHvETBfsELd0eyMngZ4vYFuboos2leNnzXF2O84i8=;
 b=g8ysfERC7xU84LM0SfbOivRG7kNrvcojpNRgaxvkxVnYHZ+t950FBZwkASVufvYOVq
 agnoiW4Uwd2n856i51smjoy1PiOMbHCQxAklIzsn4MjkWgBapegqoOeUZ5386g2YeO32
 PT4dG0++J4bmcX2edSBG9OxIEC/aBiVxSGEL+3XkqEGbKN+qO3O4BswCkB9itorA/xCR
 MlPpqvRqgUXKZF/WV/ZT1CtUnkLmkEbJBuCbnXvtkjiGeCCQZZZfJ3bWac0v1b02Xa/C
 jO5T0ymth1+/e0K1Efhqj5hMAnz+ynSQh67o10Df2HzzgniBv2btGdbWNrfVNfoCUFdC
 wExg==
X-Gm-Message-State: AOAM531r3AMbaK/5loaq9q+VR6wGcFeHH0Di5VwlPL3h5QvT7QG26jIp
 JEo5W2gTHMoS+JXCXtBtE7tbXJsj9JsYVw==
X-Google-Smtp-Source: ABdhPJw7Nm9fYRfTF/oZjGzEqo5ymkQJVQY2TmzUDPcWcNdpyTrgohMB318WSeCvVEjybEgI5luEGw==
X-Received: by 2002:a17:906:2e82:: with SMTP id
 o2mr751667eji.106.1606963606273; 
 Wed, 02 Dec 2020 18:46:46 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id ch30sm148696edb.8.2020.12.02.18.46.44
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 02 Dec 2020 18:46:45 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Juri Linkov <juri@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <87blffns95.fsf@HIDDEN>
 <8c124412-3bb3-fd92-4c3b-da4b3a8bdcac@HIDDEN>
 <87blfec4l3.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <00d1c8ef-5601-6445-199e-1590ddfae9e9@HIDDEN>
Date: Thu, 3 Dec 2020 04:46:43 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <87blfec4l3.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: Eli Zaretskii <eliz@HIDDEN>, abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 01.12.2020 10:39, Juri Linkov wrote:
>>> When a grep input pattern contains a newline, then xref could use
>>> the same algorithm as is used for 'M-.', i.e. run 'grep -Pzl'
>>> to get the file names that contain the pattern, then return
>>> these file names without line numbers.
>>
>> Do you mean the xref items backed by find-func.el? There are a particular
>> kind of references which are usually unique enough that special navigation
>> logic can work. It's also implemented this way because the search can be
>> performed without reading file contents (which would be slower).
> 
> I meant xref-matches-in-files.

'M-.' doesn't use xref-matches-in-files.

> It could also use another regexp
> for the output of 'grep -Pzo' without line numbers.

Not 100% sure I understand you here, but hopefully this line of 
discussion is continued below.

>>> This works exactly
>>> like a new feature of extending xref-show-xrefs-function
>>> with a new completion function was proposed recently on emacs-devel
>>
>> For Grep results, I think the line number is important because we're even
>> more likely to have multiple lines with the same contents in one file.
> 
> Yes, sometimes this might cause inconvenience when the user wants to visit
> the second occurrence of exactly the same line.

Or 5th or 10th. Where this would be more important, though, is when the 
user will want to change all these lines at once with 
xref-query-replace-in-results.

Also, it'd probably be surprising to see Grep search results without 
line numbers.

>> What we *could* do, is run Grep, then take just the list of files names
>> that it returns, visit them all in Emacs and repeat the search in all of
>> them. But that would require a more complex abstraction than just "search
>> command", as well as some juggling of buffers that weren't open before (we
>> don't want to add more open buffers just because the user has run a search,
>> right?).
> 
> dired-do-find-regexp uses 'ignores' to filter out ignored files.
> You could add another filter to filter out files without matches
> using 'grep -PzL'.

Right. This is sorta a backup plan. Although, when the number of files 
to search can be counted on one hand, there's nothing too bad in doing 
the search in Emacs.

>>> (BTW, why it's not installed yet?)
>>
>> Waiting for the feedback.
>>
>> It went through several minor revisions. Do you like the most recent
>> version? If so, please reply to the message containing it. If you don't,
>> please also reply and say why.
> 
> I suggest to create a new bug-number for it.

If you think it's best. The original thread author decided to write to 
emacs-devel, maybe they're more comfortable there. *shrug*

>>> So like this feature presenting such completions without line numbers:
>>>     lisp/progmodes/project.el:(cl-defgeneric project-root)
>>>     lisp/progmodes/project.el:(cl-defmethod project-root ((project (head transient))))
>>>     lisp/progmodes/project.el:(cl-defmethod project-root ((project (head vc))))
>>> xref for grep could work the same way without line numbers:
>>>     lisp/progmodes/project.el:names"^Jproject--read-file-cpd-relative)
>>>     lisp/progmodes/project.el:names"^Jproject--read-file-absolute)
>>> Then visiting such grep hit should use Emacs search functions
>>> to find the grep hit in the visited file.
>>
>> These are two substrings inside that file that matched the search
>> regexp. But there could be substrings in the same file that are equal to
>> either of these but don't match said regexp, e.g. because they are preceded
>> or followed by some different contents.
> 
> How is this possible?  Please show examples.

Hmm, apparently no examples possible with Grep (which treats all lines 
as independent strings), but if we take ripgrep, or other regexp 
engines, they can use anchors like \A (counterpart to \` in Emacs), or 
PCRE's lookahead/lookbehind. As long as dired-do-find-regexp is 
documented to simply "use constructs supported by your local [search] 
command", the user could take advantage of some advances syntax like that.

Though we might have to limit that capability if the idea of 
post-filtering search results using Emacs's own engine comes to life.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 3 Dec 2020 02:23:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 21:23:43 2020
Received: from localhost ([127.0.0.1]:37897 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkeHX-0005Fh-MB
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2020 21:23:43 -0500
Received: from mail-ej1-f51.google.com ([209.85.218.51]:44129)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kkeHW-0005FS-6r
 for 31796 <at> debbugs.gnu.org; Wed, 02 Dec 2020 21:23:42 -0500
Received: by mail-ej1-f51.google.com with SMTP id m19so1086635ejj.11
 for <31796 <at> debbugs.gnu.org>; Wed, 02 Dec 2020 18:23:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=g8SMEZwvMHTTVbnM/FUPx15h4yqoR10K14KSjQsxd8M=;
 b=RLWkau3xZxWVuPpFHv6pqs440ZowSSrF7v/P/ROmiuPAP6k7vZ5/lqnmMsDm8gj/wI
 ADax0BVO9BuKRr47LnqL1Qs/pRLQIXZ867z+5EZIqdcVLG7TdpMx/N7OZ0f4y+7baNhq
 sBJlKYXxzVoHi1sHtqgWb7bHmTOtZk7PTyOzKe5K+Y9tW0gUShxwnow4glg3b6cFzyPc
 uvzbV56YVoY4QEjwRFfJ19a+SIU4aitepCESeXaTpo25fiXL9dSuDN6HC6mfLvkPvN3H
 zIV+ixueVxr6CN4qCqIqd3ByVbgoUTQGAiXJXgx9zxya62Mi5HswpDxxf4EKk89BNl5q
 DWag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=g8SMEZwvMHTTVbnM/FUPx15h4yqoR10K14KSjQsxd8M=;
 b=U+7M23HW3oqyn4lzKogQ2LGB2gK1AaHh2+NWyuFjeeD/gLmLASDbrysVgkXV75pskL
 JbaPy3CW4C+hsUvlUOUQUaj+KBaF4Zg66/1ilA31RUyMLPbMX05iU/E06CvMyfpxt+rB
 2VpvPMXFqd3ETWkDEhruX7pXEnCAJzzRSLWm4g/eo1CYJ2ZAaIKvh9GsuawEQboOf996
 qlYrbgi7k0UHiB+NudR7Sk6pi1l8YxRXDgbKK5lcKfbudVH1YSToGhGL9S0T7nrcqq4V
 CFm6OjGVtohV5UzLsvO1u/iznOEaCDDmenBBK1Wh9d0kZ5sw7dB7jDM46Ebd/+NePcD2
 KPew==
X-Gm-Message-State: AOAM530eXGAl5hX+IRXnJLtVuRMG5GZch90YnvrghY2Xoj1JtyLz7Inj
 tAoVyGeILHzymDP4jGzOTiGiz3/0X7MxWQ==
X-Google-Smtp-Source: ABdhPJw5A6tHU7qCyxno4rOMeR1A6etKpyXpvXZ6gSbpz49xKRMAwIbaSxvAetielTI1IJkyHarAXw==
X-Received: by 2002:a17:906:dd3:: with SMTP id
 p19mr623971eji.221.1606962216001; 
 Wed, 02 Dec 2020 18:23:36 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id k21sm111609edq.26.2020.12.02.18.23.34
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 02 Dec 2020 18:23:35 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: rms@HIDDEN
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <fec98352-413e-1b02-f19a-9cfb3e895c70@HIDDEN>
Date: Thu, 3 Dec 2020 04:23:32 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <E1kjy5E-00046B-7R@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 01.12.2020 07:20, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>    > To sum up, there are options, but I don't see a working solution that is
>    > based on GNU Grep.
> 
> Can people think of a new feature that would be easy to add to GNU grep
> that would make it easy for Dired to handle all cases correctly?
> 
> I don't know what the problem is, but if it has to do with parsing the
> grep output, here's an idea: an option to tell GNU grep to use quoting
> on file names and the match strings, Perhaps in the same way GNU ls
> does.

Grep already has that, more or less, with --null. pcregrep doesn't 
(which was my other example).

What Grep could add, however, is a "multiline" matching mode similar to 
what pcregrep and ripgrep have. Meaning, it would allow matches to cross 
newlines (with certain rules on whether "." matches a newline) but 
without requiring the -z mode. So it would still report correct line 
numbers for the matches.

> Another idea is an option to output numerical byte positions in the
> file instead of the lines that are matched.  Emacs can feed those byte
> positions into byte-to-position to convert them into buffer positions.

Like Eli said, that's -b.

But considering Emacs would have to visit each file, to post-process the 
results with byte-to-position, this might turn out to be not much faster 
or easier to implement than simply visiting every file that (according 
to Grep) has matches and repeating the search in Emacs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 2 Dec 2020 17:48:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 12:48:06 2020
Received: from localhost ([127.0.0.1]:37258 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkWEY-000555-8k
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:48:06 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49500)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kkWEU-00054X-9S
 for 31796 <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:48:05 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54587)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kkWEN-0003hm-Ey; Wed, 02 Dec 2020 12:47:55 -0500
Received: from [176.228.60.248] (port=2642 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kkWED-0006pU-ML; Wed, 02 Dec 2020 12:47:46 -0500
Date: Wed, 02 Dec 2020 19:47:43 +0200
Message-Id: <83wny0f6bk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <0646a65f-db21-b377-6897-caeb6ff3e10c@HIDDEN> (message from
 Dmitry Gutov on Wed, 2 Dec 2020 19:43:52 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN> <83k0u1il6c.fsf@HIDDEN>
 <E1kkJiU-0003uD-Lq@HIDDEN> <83blfcgst9.fsf@HIDDEN>
 <c863133b-0bd3-81a1-23c6-373fff789835@HIDDEN> <83zh2wf6or.fsf@HIDDEN>
 <0646a65f-db21-b377-6897-caeb6ff3e10c@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, rms@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: rms@HIDDEN, abela@HIDDEN, 31796 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Wed, 2 Dec 2020 19:43:52 +0200
> 
> >> Although... since it has to scan the full file anyway, it could first do
> >> a quick detection, and then maybe rescan from the beginning if the
> >> encoding turns out to be something else.
> > 
> > That'd be too late, as some matches were already output.
> 
> It could buffer them until the full file has been parsed. Encoding 
> detection and conversion must add a certain overhead anyway, so I'm not 
> sure how expensive the extra buffering would be in comparison.
> 
> As a bonus, per-file buffering like that would allow easier 
> parallelization of searches.

Buffering means you don't output matches as soon as you find them,
which might be regarded as a kind of regression -- see Richard's bug
reports a few days ago.  And since you never know where in the file
the telltale byte sequences will appear, you will need to always wait
until the entire file is read -- which could be prohibitive for very
large files.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 2 Dec 2020 17:44:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 12:44:07 2020
Received: from localhost ([127.0.0.1]:37249 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkWAh-0004yH-Af
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:44:07 -0500
Received: from mail-ej1-f42.google.com ([209.85.218.42]:34475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kkWAb-0004xT-9i
 for 31796 <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:44:01 -0500
Received: by mail-ej1-f42.google.com with SMTP id g20so5712327ejb.1
 for <31796 <at> debbugs.gnu.org>; Wed, 02 Dec 2020 09:44:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=C+rgic6HNFKjuuIGojxhdffeRfwGokaPO1TFfS8u5rg=;
 b=cr8BWbGs/veLWDgG9QENeIDr2c8Hsc7Nu+wQBfKWCYD37KIswDCmYNV/e94Ruw68w1
 aqsgJ2cXU5mwVw6sgbV0eZRZheDzV6+1Bm3kAM7/uBUah8kGeBEu0gQokFgPGhIiUbkn
 JJoTmdbXns3NhCARFY8Fm/X/EvhIf5ddRcmhc/1TlnDcLkZNzdpoKt9P1wTiDFjxzUr8
 9JLQ39R77T1oYrRvqd/qsBNPznuFA3uqhB+qpMdIhptKzMFtfEk88xbwpOAaog6OO6Dt
 AMXYmeR0BWl9nch4C/LMMmEg9hTKoLWcN9CNnDt7JLx7F9GbyEiskIqkoD3NhluaEhAf
 ReHg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=C+rgic6HNFKjuuIGojxhdffeRfwGokaPO1TFfS8u5rg=;
 b=VpgU+rkcoro/eWoBYgKrTUR3lb/IJYCJHPNwFjAED6HLHBzL39tiNx72KmLAemDzXv
 xUIlmjCXP7v/m3jLFrCdAOZBtNph3DJfLOKRdbUIG+MEiGD0OzvdWJRyJCnzIn2olN1l
 fCeXw8GTbkYou9fs8C2gqYAjcVU96Kvl8hN4nfbGrDMWnkx2zdz4OZPONCYDBHVP6xKB
 6tSzapbBSekG5JenLlMD6FehbcJDqi/XgjMdJAvIHVy4qU74ne11x3pSsg9NOMF2Qtcv
 HSW4OIi0L3KqoS2eW41brFscMd1/ziIpJS2ld93J8Ry27hWrW7P9B7N8yde1d8I6cNfq
 RuPQ==
X-Gm-Message-State: AOAM532erS5+DQ8B+mm6xB14EXAbKPT7AdkYfKrmui2gT8S/6QXxmALr
 Yr+CR9fXIMZxc9M6jXqt/EYHBT6wZylD6A==
X-Google-Smtp-Source: ABdhPJxoCkBUCv7yN7meN5JOQBGIuTPFzC5RU3fgarLOZ24jkyn1z+9rgzGpMMlBCVOaAfWHfVPAZA==
X-Received: by 2002:a17:906:a946:: with SMTP id
 hh6mr870938ejb.456.1606931035219; 
 Wed, 02 Dec 2020 09:43:55 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id m24sm363465ejo.52.2020.12.02.09.43.53
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 02 Dec 2020 09:43:54 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Eli Zaretskii <eliz@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN> <83k0u1il6c.fsf@HIDDEN>
 <E1kkJiU-0003uD-Lq@HIDDEN> <83blfcgst9.fsf@HIDDEN>
 <c863133b-0bd3-81a1-23c6-373fff789835@HIDDEN> <83zh2wf6or.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <0646a65f-db21-b377-6897-caeb6ff3e10c@HIDDEN>
Date: Wed, 2 Dec 2020 19:43:52 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <83zh2wf6or.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, rms@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 02.12.2020 19:39, Eli Zaretskii wrote:
>> Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@HIDDEN>
>> Date: Wed, 2 Dec 2020 19:17:06 +0200
>>
>> On 02.12.2020 16:56, Eli Zaretskii wrote:
>>> The point is that our heuristics for detecting encoding is not
>>> perfect, so it could fail.
>>
>> Do you imagine Grep could use a more reliable detection algorithm?
> 
> No, I don't.  But it could allow the user to specify a different
> encoding for each file, as in
> 
>     grep --encoding=FOO FILES1* --encoding=BAR FILES2*

Not sure we can call it like that in an automated fashion (i.e. in 
project-find-regexp). But hey, somebody else could.

> etc.  And even if it just did the job of the same quality as we do, it
> will do it faster, which is why we use Grep in the first place, right?

That's true.

> The important part of the "enhancement" I described is actually the
> fact that the output gets encoded in a single encoding, no matter what
> was the encoding of the original files.  This makes reading and
> decoding the output simple and always correct.

Yes, OK.

>> Although... since it has to scan the full file anyway, it could first do
>> a quick detection, and then maybe rescan from the beginning if the
>> encoding turns out to be something else.
> 
> That'd be too late, as some matches were already output.

It could buffer them until the full file has been parsed. Encoding 
detection and conversion must add a certain overhead anyway, so I'm not 
sure how expensive the extra buffering would be in comparison.

As a bonus, per-file buffering like that would allow easier 
parallelization of searches.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 2 Dec 2020 17:40:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 12:40:08 2020
Received: from localhost ([127.0.0.1]:37242 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkW6q-0004sJ-LL
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:40:08 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46400)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kkW6o-0004ri-KJ
 for 31796 <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:40:07 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54369)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kkW6h-0002Mg-Bm; Wed, 02 Dec 2020 12:39:59 -0500
Received: from [176.228.60.248] (port=1670 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kkW6Z-00061h-1B; Wed, 02 Dec 2020 12:39:51 -0500
Date: Wed, 02 Dec 2020 19:39:48 +0200
Message-Id: <83zh2wf6or.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <c863133b-0bd3-81a1-23c6-373fff789835@HIDDEN> (message from
 Dmitry Gutov on Wed, 2 Dec 2020 19:17:06 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN> <83k0u1il6c.fsf@HIDDEN>
 <E1kkJiU-0003uD-Lq@HIDDEN> <83blfcgst9.fsf@HIDDEN>
 <c863133b-0bd3-81a1-23c6-373fff789835@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, rms@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Wed, 2 Dec 2020 19:17:06 +0200
> 
> On 02.12.2020 16:56, Eli Zaretskii wrote:
> > The point is that our heuristics for detecting encoding is not
> > perfect, so it could fail.
> 
> Do you imagine Grep could use a more reliable detection algorithm?

No, I don't.  But it could allow the user to specify a different
encoding for each file, as in

   grep --encoding=FOO FILES1* --encoding=BAR FILES2*

etc.  And even if it just did the job of the same quality as we do, it
will do it faster, which is why we use Grep in the first place, right?

The important part of the "enhancement" I described is actually the
fact that the output gets encoded in a single encoding, no matter what
was the encoding of the original files.  This makes reading and
decoding the output simple and always correct.

> Although... since it has to scan the full file anyway, it could first do 
> a quick detection, and then maybe rescan from the beginning if the 
> encoding turns out to be something else.

That'd be too late, as some matches were already output.

Grep does begin by scanning a small portion of the file (at least it
did, back when I was familiar with its code), so detection in the same
style as Emacs does should be a natural addition, I think.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 2 Dec 2020 17:17:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 12:17:31 2020
Received: from localhost ([127.0.0.1]:37202 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkVkw-0004Iy-VV
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:17:31 -0500
Received: from mail-ej1-f49.google.com ([209.85.218.49]:37398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kkVkh-0004IY-Sh
 for 31796 <at> debbugs.gnu.org; Wed, 02 Dec 2020 12:17:29 -0500
Received: by mail-ej1-f49.google.com with SMTP id ga15so5544783ejb.4
 for <31796 <at> debbugs.gnu.org>; Wed, 02 Dec 2020 09:17:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=TkU6eSZ7v7iYzAwjR8R2iV1xy1pAIQz3RhGtXqWKgHw=;
 b=I6OOkigbA0xeDruHskKtjs3uWfUL1NPi+V48ynpOOBGG2nH2oyqBr2+9EMbyD7mme3
 E0YXJjQQhnbuWGy1r6IGIolTiHLNduTUImPDRU00nI6XNL3UiD1hbxOyVa27ueXtUDeU
 tgA1XZYIDQdN5wK6mk4fvTAFFKv35ZcpJV9hTV84IqA1Fcwk88MYtmTRQXEYFRILHoiD
 q45+Yhfe1+8b8q7lSTrp+lWkL7+wAXFw6fhCa/8bKYBTmajiggtoFsMbso4uwip4HeZQ
 NS5cuTuGRJvpkDQnW1BAdnGQhnnxrHtGpFox705nvEjsEk6QudR2b1q4j4nEHDCZUTJ1
 T5TA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=TkU6eSZ7v7iYzAwjR8R2iV1xy1pAIQz3RhGtXqWKgHw=;
 b=X3gWRfBipW6/1UdKzG8c3niiV0fVhtQt7WDbYM6pmlu3TjmO+x07VYIPmhLiZejj9T
 EmckaVbIc99Ec1WymMvYmLkxYBKCeduMl0fJTyC7SHIB5zC3qrb7kuV7M76O9+Nz0niE
 A0CN3Clyx7erx3UM7406BvQGGvlKzWJdSRhRtDSM68FcKP7j073NUI3OFEfJ48yx+n1P
 ZaxahpB688Ny3speJ0aKQJfq60pWvDUUtP00pXp83PSpAKR+hKGthtbzA3bEmnSW1Ugc
 MLV5ZXm89zEd1QqxBKFDbWnoU4fOE9SROdBdkh+eZYRzYKqAOhXavcGAokURhhVITgNB
 2lHg==
X-Gm-Message-State: AOAM532YQVA3lS/PGj4D5OO+GS1lgwXEvhqqc14G61SfQz6gW5WXTWFA
 46/duKgRseJdClzkDLGyTXzkBYbSKCxBjA==
X-Google-Smtp-Source: ABdhPJxiEjjg9aT7hvnvzAWgPZyHVXutwX/Vqqszcxbvci9qm/HefSpLV5UG0e641+Vq85obNsFAcg==
X-Received: by 2002:a17:906:2818:: with SMTP id
 r24mr784171ejc.100.1606929429606; 
 Wed, 02 Dec 2020 09:17:09 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id r1sm335227eje.51.2020.12.02.09.17.08
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 02 Dec 2020 09:17:08 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Eli Zaretskii <eliz@HIDDEN>, rms@HIDDEN
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN> <83k0u1il6c.fsf@HIDDEN>
 <E1kkJiU-0003uD-Lq@HIDDEN> <83blfcgst9.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <c863133b-0bd3-81a1-23c6-373fff789835@HIDDEN>
Date: Wed, 2 Dec 2020 19:17:06 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <83blfcgst9.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 02.12.2020 16:56, Eli Zaretskii wrote:
> The point is that our heuristics for detecting encoding is not
> perfect, so it could fail.

Do you imagine Grep could use a more reliable detection algorithm?

Although... since it has to scan the full file anyway, it could first do 
a quick detection, and then maybe rescan from the beginning if the 
encoding turns out to be something else.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 2 Dec 2020 14:56:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 02 09:56:54 2020
Received: from localhost ([127.0.0.1]:36783 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkTYs-0000hi-4v
	for submit <at> debbugs.gnu.org; Wed, 02 Dec 2020 09:56:54 -0500
Received: from eggs.gnu.org ([209.51.188.92]:52412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kkTYp-0000hX-UW
 for 31796 <at> debbugs.gnu.org; Wed, 02 Dec 2020 09:56:52 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50968)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kkTYi-0007zB-7l; Wed, 02 Dec 2020 09:56:44 -0500
Received: from [176.228.60.248] (port=3324 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kkTYZ-0007T5-F6; Wed, 02 Dec 2020 09:56:36 -0500
Date: Wed, 02 Dec 2020 16:56:34 +0200
Message-Id: <83blfcgst9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rms@HIDDEN
In-Reply-To: <E1kkJiU-0003uD-Lq@HIDDEN> (message from Richard
 Stallman on Tue, 01 Dec 2020 23:26:10 -0500)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN> <83k0u1il6c.fsf@HIDDEN>
 <E1kkJiU-0003uD-Lq@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Richard Stallman <rms@HIDDEN>
> Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, dgutov@HIDDEN
> Date: Tue, 01 Dec 2020 23:26:10 -0500
> 
>   > AFAIU, there's already such an option: -b.  However, byte-to-position
>   > works only with UTF-8 encoded files; we need filepos-to-bufferpos
> 
> Oops.
> 
>   > (which requires to know the file's encoding, so we are back at the
>   > same problem).
> 
> If you're going to look at the contents of the file, you have to
> visit it, which means you'll know which encoding to use for that file.

The point is that our heuristics for detecting encoding is not
perfect, so it could fail.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 2 Dec 2020 04:26:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 01 23:26:23 2020
Received: from localhost ([127.0.0.1]:33854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kkJih-0008Ng-8a
	for submit <at> debbugs.gnu.org; Tue, 01 Dec 2020 23:26:23 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1kkJid-0008NR-2c
 for 31796 <at> debbugs.gnu.org; Tue, 01 Dec 2020 23:26:22 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42262)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1kkJiV-0003vE-OI; Tue, 01 Dec 2020 23:26:11 -0500
Received: from rms by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rms@HIDDEN>)
 id 1kkJiU-0003uD-Lq; Tue, 01 Dec 2020 23:26:10 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <83k0u1il6c.fsf@HIDDEN> (message from Eli Zaretskii on Tue, 01
 Dec 2020 17:46:19 +0200)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN> <83k0u1il6c.fsf@HIDDEN>
Message-Id: <E1kkJiU-0003uD-Lq@HIDDEN>
Date: Tue, 01 Dec 2020 23:26:10 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > AFAIU, there's already such an option: -b.  However, byte-to-position
  > works only with UTF-8 encoded files; we need filepos-to-bufferpos

Oops.

  > (which requires to know the file's encoding, so we are back at the
  > same problem).

If you're going to look at the contents of the file, you have to
visit it, which means you'll know which encoding to use for that file.

Does that make it work?

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 15:46:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 01 10:46:42 2020
Received: from localhost ([127.0.0.1]:33061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kk7rW-0006mb-AB
	for submit <at> debbugs.gnu.org; Tue, 01 Dec 2020 10:46:42 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49196)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kk7rU-0006mL-Hq
 for 31796 <at> debbugs.gnu.org; Tue, 01 Dec 2020 10:46:41 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56763)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kk7rN-0003qv-Dr; Tue, 01 Dec 2020 10:46:33 -0500
Received: from [176.228.60.248] (port=1572 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kk7rE-0004P5-Ge; Tue, 01 Dec 2020 10:46:24 -0500
Date: Tue, 01 Dec 2020 17:46:19 +0200
Message-Id: <83k0u1il6c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rms@HIDDEN
In-Reply-To: <E1kjy5E-00046B-7R@HIDDEN> (message from Richard
 Stallman on Tue, 01 Dec 2020 00:20:12 -0500)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <E1kjy5E-00046B-7R@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Richard Stallman <rms@HIDDEN>
> Cc: eliz@HIDDEN, abela@HIDDEN, 31796 <at> debbugs.gnu.org
> Date: Tue, 01 Dec 2020 00:20:12 -0500
> 
> Can people think of a new feature that would be easy to add to GNU grep
> that would make it easy for Dired to handle all cases correctly?

Yes: it should detect encoding of each input file (and have a way of
letting the user specify encoding for each file), convert the file's
contents to some internal encoding (probably UTF-8), then report the
hits encoded in UTF-8, regardless of the file's original encoding (and
regardless of the current locale's codeset).

> I don't know what the problem is, but if it has to do with parsing the
> grep output, here's an idea: an option to tell GNU grep to use quoting
> on file names and the match strings, Perhaps in the same way GNU ls
> does.

The problem is not with file names, it's with the matches.  But since
you mention it: Grep should, in this new mode, report file names also
recoded into UTF-8.  In a word, it should arrange for its output be in
a single encoding known in advance, so that front ends like Emacs
won't need to guess the encoding.

> Another idea is an option to output numerical byte positions in the
> file instead of the lines that are matched.  Emacs can feed those byte
> positions into byte-to-position to convert them into buffer positions.

AFAIU, there's already such an option: -b.  However, byte-to-position
works only with UTF-8 encoded files; we need filepos-to-bufferpos
(which requires to know the file's encoding, so we are back at the
same problem).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 15:20:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 01 10:20:59 2020
Received: from localhost ([127.0.0.1]:32950 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kk7Sc-0005xZ-Ro
	for submit <at> debbugs.gnu.org; Tue, 01 Dec 2020 10:20:59 -0500
Received: from mail-wr1-f46.google.com ([209.85.221.46]:45904)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kk7Sa-0005xJ-MO
 for 31796 <at> debbugs.gnu.org; Tue, 01 Dec 2020 10:20:57 -0500
Received: by mail-wr1-f46.google.com with SMTP id t4so3157472wrr.12
 for <31796 <at> debbugs.gnu.org>; Tue, 01 Dec 2020 07:20:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=iZGgHPbGZwMiUAjYbCsXDx/rbeTRYmrl6NPJWLRoahU=;
 b=MaGBmEfHRDVrprmQDtEaJVjqUGg6nhgm7voaiiyfAEEz1/wkGHIgAl9MZ0CpuaiQc0
 3W3Yaudzb5LrJMCPiFQDVZ9aa/vDdfTZpkObYiTgZOUcwS2kRyyleLhk7+miuoe4lslk
 U0KxGAl+tVvmxrnSYL+oQKaOdUYob59uSIlvO4Mc6RNqjyIIDh08xlmFaBKC71gF1OxD
 zCOslKZGEn66lX8vDNA3kQFuNJEa+GL7pWSSHhASHebD0bPhmoZmCOdxqX7DoaPLgu/U
 AahpMnlQNbczk2RKu06LwetVS/5Pl3bKLvCIVUprgr+h+hsfaEocYUeZOaNegu5Ar0/V
 7KPw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=iZGgHPbGZwMiUAjYbCsXDx/rbeTRYmrl6NPJWLRoahU=;
 b=BNpTLohN/+rtMMcQCFrGqLrQn1FBFJW91YHK7qElD0blMzKutirmdPGUK29mbOt+mD
 EFGnaQHZGhsSrwJAgqOWqFX/+iOdbu2c4Cle3vkH0cPCAL5A2AhnFmR3vWQ/QjSjiP8l
 ou2fY9Asj6JtxGpAKNoso8Gbquy0prGmu3zlHWj6tSZYWh20G8J76bvE80UcYHCMaO3J
 +TTrKGtJyfXuwXzg9OGhZnfeZmwtDJ/vByDJD2ZI6UsEc0vVm3n6ebbMdP7wOXhC9spC
 rL8pz5DZ09ZX3vdYNXDDfq/FR71Knqeym04JjYsUBpom2hZ621bT3gI3n3PoORaMS6mq
 icyg==
X-Gm-Message-State: AOAM532Qd0bjs4YHQceAoqjbjVapHR+EbZxgPjoOjmRMOQM11IBioqER
 weynEoSgQm/AO3km56w/3MTyTGXo+CK9nA==
X-Google-Smtp-Source: ABdhPJyzMV4l7mW1fVNpMIP6p4t2cpJwmyFuu6LbmBuY+3L8OsJtWv97+fbWuNOTctDFjZxJdxnPQw==
X-Received: by 2002:adf:f98a:: with SMTP id f10mr4579285wrr.154.1606836050592; 
 Tue, 01 Dec 2020 07:20:50 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id d13sm4109133wrb.39.2020.12.01.07.20.48
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 01 Dec 2020 07:20:49 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Juri Linkov <juri@HIDDEN>
References: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN> <834kl6lv5f.fsf@HIDDEN>
 <X8US6Pl3UpJE2jRX@HIDDEN>
 <43b0d5df-a4e7-e8a7-d6cf-5dc6bc7a52cf@HIDDEN>
 <87czzudk6p.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <21c9d43c-9972-bf22-17a4-df95cdf0091e@HIDDEN>
Date: Tue, 1 Dec 2020 17:20:47 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <87czzudk6p.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: Eli Zaretskii <eliz@HIDDEN>, abela@HIDDEN, 31796 <at> debbugs.gnu.org,
 Jean Louis <bugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 01.12.2020 10:36, Juri Linkov wrote:
>>> It is possible to combine with sed:
>>> https://www.gnu.org/software/sed/manual/html_node/Text-search-across-multiple-lines.html
>>> https://www.gnu.org/software/sed/manual/html_node/Multiline-techniques.html#Multiline-techniques
>>
>> It's pretty much Chinese to me, sorry.
> 
> When I need to grep in multi-line mode I use Ruby, but its modifiers
> differ from Perl:
> 
> https://regular-expressions.mobi/ruby.html
>    /m makes the dot match newlines.  Ruby indeed uses /m, whereas Perl and
>    many other programming languages use /s for “dot matches newlines”.
> 
> https://www.regular-expressions.info/modifiers.html
>    (?s) for “single line mode” makes the dot match all characters,
>         including line breaks.  Not supported by Ruby or JavaScript.
>    (?m) for “multi-line mode” makes the caret and dollar match at the start
>         and end of each line in the subject string.  In Ruby, (?m) makes the
>         dot match all characters, without affecting the caret and dollar which
>         always match at the start and end of each line in Ruby.

Ruby's much easier for me, of course, but it doesn't have the same 
advantage of ubiquity that awk (and, to a lesser extent, perl) have.

Either way, someone would need to write that script.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 08:55:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 01 03:55:25 2020
Received: from localhost ([127.0.0.1]:57725 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kk1RU-0003VM-Nv
	for submit <at> debbugs.gnu.org; Tue, 01 Dec 2020 03:55:25 -0500
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56771)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1kk1RM-0003Ua-TX
 for 31796 <at> debbugs.gnu.org; Tue, 01 Dec 2020 03:55:23 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 990D11BF208;
 Tue,  1 Dec 2020 08:55:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
 <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
 <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <834kl6lv5f.fsf@HIDDEN> <X8US6Pl3UpJE2jRX@HIDDEN>
 <43b0d5df-a4e7-e8a7-d6cf-5dc6bc7a52cf@HIDDEN>
Date: Tue, 01 Dec 2020 10:36:38 +0200
In-Reply-To: <43b0d5df-a4e7-e8a7-d6cf-5dc6bc7a52cf@HIDDEN> (Dmitry Gutov's
 message of "Tue, 1 Dec 2020 03:23:00 +0200")
Message-ID: <87czzudk6p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: Eli Zaretskii <eliz@HIDDEN>, abela@HIDDEN, 31796 <at> debbugs.gnu.org,
 Jean Louis <bugs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> It is possible to combine with sed:
>> https://www.gnu.org/software/sed/manual/html_node/Text-search-across-multiple-lines.html
>> https://www.gnu.org/software/sed/manual/html_node/Multiline-techniques.html#Multiline-techniques
>
> It's pretty much Chinese to me, sorry.

When I need to grep in multi-line mode I use Ruby, but its modifiers
differ from Perl:

https://regular-expressions.mobi/ruby.html
  /m makes the dot match newlines.  Ruby indeed uses /m, whereas Perl and
  many other programming languages use /s for “dot matches newlines”.

https://www.regular-expressions.info/modifiers.html
  (?s) for “single line mode” makes the dot match all characters,
       including line breaks.  Not supported by Ruby or JavaScript.
  (?m) for “multi-line mode” makes the caret and dollar match at the start
       and end of each line in the subject string.  In Ruby, (?m) makes the
       dot match all characters, without affecting the caret and dollar which
       always match at the start and end of each line in Ruby.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 08:55:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 01 03:55:22 2020
Received: from localhost ([127.0.0.1]:57721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kk1RS-0003Uz-4Z
	for submit <at> debbugs.gnu.org; Tue, 01 Dec 2020 03:55:22 -0500
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:37921)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1kk1RP-0003Ud-TO
 for 31796 <at> debbugs.gnu.org; Tue, 01 Dec 2020 03:55:20 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id BBE9DE0008;
 Tue,  1 Dec 2020 08:55:12 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
 <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
 <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <87blffns95.fsf@HIDDEN>
 <8c124412-3bb3-fd92-4c3b-da4b3a8bdcac@HIDDEN>
Date: Tue, 01 Dec 2020 10:39:56 +0200
In-Reply-To: <8c124412-3bb3-fd92-4c3b-da4b3a8bdcac@HIDDEN> (Dmitry Gutov's
 message of "Tue, 1 Dec 2020 04:21:23 +0200")
Message-ID: <87blfec4l3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: Eli Zaretskii <eliz@HIDDEN>, abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> When a grep input pattern contains a newline, then xref could use
>> the same algorithm as is used for 'M-.', i.e. run 'grep -Pzl'
>> to get the file names that contain the pattern, then return
>> these file names without line numbers.
>
> Do you mean the xref items backed by find-func.el? There are a particular
> kind of references which are usually unique enough that special navigation
> logic can work. It's also implemented this way because the search can be
> performed without reading file contents (which would be slower).

I meant xref-matches-in-files.  It could also use another regexp
for the output of 'grep -Pzo' without line numbers.

>> This works exactly
>> like a new feature of extending xref-show-xrefs-function
>> with a new completion function was proposed recently on emacs-devel
>
> For Grep results, I think the line number is important because we're even
> more likely to have multiple lines with the same contents in one file.

Yes, sometimes this might cause inconvenience when the user wants to visit
the second occurrence of exactly the same line.

> What we *could* do, is run Grep, then take just the list of files names
> that it returns, visit them all in Emacs and repeat the search in all of
> them. But that would require a more complex abstraction than just "search
> command", as well as some juggling of buffers that weren't open before (we
> don't want to add more open buffers just because the user has run a search,
> right?).

dired-do-find-regexp uses 'ignores' to filter out ignored files.
You could add another filter to filter out files without matches
using 'grep -PzL'.

>> (BTW, why it's not installed yet?)
>
> Waiting for the feedback.
>
> It went through several minor revisions. Do you like the most recent
> version? If so, please reply to the message containing it. If you don't,
> please also reply and say why.

I suggest to create a new bug-number for it.

>> So like this feature presenting such completions without line numbers:
>>    lisp/progmodes/project.el:(cl-defgeneric project-root)
>>    lisp/progmodes/project.el:(cl-defmethod project-root ((project (head transient))))
>>    lisp/progmodes/project.el:(cl-defmethod project-root ((project (head vc))))
>> xref for grep could work the same way without line numbers:
>>    lisp/progmodes/project.el:names"^Jproject--read-file-cpd-relative)
>>    lisp/progmodes/project.el:names"^Jproject--read-file-absolute)
>> Then visiting such grep hit should use Emacs search functions
>> to find the grep hit in the visited file.
>
> These are two substrings inside that file that matched the search
> regexp. But there could be substrings in the same file that are equal to
> either of these but don't match said regexp, e.g. because they are preceded
> or followed by some different contents.

How is this possible?  Please show examples.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 05:20:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 01 00:20:21 2020
Received: from localhost ([127.0.0.1]:57462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjy5N-0004PP-FY
	for submit <at> debbugs.gnu.org; Tue, 01 Dec 2020 00:20:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:45892)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1kjy5M-0004Oy-1f
 for 31796 <at> debbugs.gnu.org; Tue, 01 Dec 2020 00:20:20 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48019)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1kjy5F-0003SA-It; Tue, 01 Dec 2020 00:20:13 -0500
Received: from rms by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rms@HIDDEN>)
 id 1kjy5E-00046B-7R; Tue, 01 Dec 2020 00:20:12 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN> (message from
 Dmitry Gutov on Mon, 30 Nov 2020 04:25:31 +0200)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
Message-Id: <E1kjy5E-00046B-7R@HIDDEN>
Date: Tue, 01 Dec 2020 00:20:12 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: eliz@HIDDEN, abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > To sum up, there are options, but I don't see a working solution that is 
  > based on GNU Grep.

Can people think of a new feature that would be easy to add to GNU grep
that would make it easy for Dired to handle all cases correctly?

I don't know what the problem is, but if it has to do with parsing the
grep output, here's an idea: an option to tell GNU grep to use quoting
on file names and the match strings, Perhaps in the same way GNU ls
does.

Another idea is an option to output numerical byte positions in the
file instead of the lines that are matched.  Emacs can feed those byte
positions into byte-to-position to convert them into buffer positions.


-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 02:21:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 21:21:35 2020
Received: from localhost ([127.0.0.1]:57251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjvIN-0008VZ-1g
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 21:21:35 -0500
Received: from mail-ed1-f52.google.com ([209.85.208.52]:37449)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kjvIL-0008VM-If
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 21:21:33 -0500
Received: by mail-ed1-f52.google.com with SMTP id n24so735004edb.4
 for <31796 <at> debbugs.gnu.org>; Mon, 30 Nov 2020 18:21:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=xE9uiWdR2XTwox5UaJC3yXNMmylae/+kGu9RPHL46wg=;
 b=UYtvyoMxWW/dugbkPhad4T/C3I5Tl2SD7FNkaxbCqP5XxTmwGgfqtqaacMCL+bSNlY
 akzfhf0B3G7RW8tk2YFmuXqgbqu7k/0wlUhKTnoMpCqgXfFZ0LMT37WKu7ScwclCLf75
 zbL3B+qrL1GwV07N1bbTTvcvt6MQn8AunJjEkvkETTuSOy8bBcMy1bpILV6jskzL+ng6
 BDviHr7a3rY/sUxmOLsiz3W+TLQAVd1TjSTyOmQ8BKIdRXRLq7SIe3JGGps1IBkH2y7V
 y4btJ0/Y9gSubXLZDaapD9gDocl0Ru1sKZt4cQv5OJS3FqOQby4Fe4HGM1YSDQUWYoWn
 dgkg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=xE9uiWdR2XTwox5UaJC3yXNMmylae/+kGu9RPHL46wg=;
 b=BpzPxYJ6rUkE2ABMVIEiAMQGx/W6wwcJxiycYzrsjjfvP6V1MNclu6c/EzwfFW5K0D
 SOC14B0OXiiH9hYvZsh4HBCbhno0k25jMywh37eqsY38e3coF0f4waEQdMmhjTSy6hgs
 QDKYWRtDqtTIHpRJIcW7GDcL164VNrmzpi8LJU0tmiuuBTRrX+enhihG1+sApi4xyCf7
 s2bWy79isDItnj6PyG5dmj5ybyrTz0nkDeUOPoPrMYKTW33PCPx/EzERkq9nyGdAPWID
 plYFv/0igTngnM2cCkfqGW1ytWiSjbRmZx+W8GBuzGdmaAWwp7ytDherWJ4GxPt9oF9W
 ifSQ==
X-Gm-Message-State: AOAM533wLhYuAmMfO9b8cJcU9WK8eIaO0MWxsA2UExcFTBueKlww948n
 yc4H3QBKsQOufADOPfguA30UOUFoxZB78g==
X-Google-Smtp-Source: ABdhPJzg6b7+TtUGybFtDmANSh4iyHEbmCyBAf4eG4nVJbQh0MTmaYaiizF+b2FDoIYkgp+twpOA7g==
X-Received: by 2002:a50:c19a:: with SMTP id m26mr807875edf.302.1606789287298; 
 Mon, 30 Nov 2020 18:21:27 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id dk4sm92104edb.54.2020.11.30.18.21.25
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 30 Nov 2020 18:21:26 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Juri Linkov <juri@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <87blffns95.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <8c124412-3bb3-fd92-4c3b-da4b3a8bdcac@HIDDEN>
Date: Tue, 1 Dec 2020 04:21:23 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <87blffns95.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: Eli Zaretskii <eliz@HIDDEN>, abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 30.11.2020 10:49, Juri Linkov wrote:

>> Even if it worked differently, -P imposes a significant performance penalty
>> from what I see, even when the extra syntax is not actually used. So we
>> couldn't enable it by default.
> 
> When a grep input pattern contains a newline, then xref could use
> the same algorithm as is used for 'M-.', i.e. run 'grep -Pzl'
> to get the file names that contain the pattern, then return
> these file names without line numbers.

Do you mean the xref items backed by find-func.el? There are a 
particular kind of references which are usually unique enough that 
special navigation logic can work. It's also implemented this way 
because the search can be performed without reading file contents (which 
would be slower).

> This works exactly
> like a new feature of extending xref-show-xrefs-function
> with a new completion function was proposed recently on emacs-devel

For Grep results, I think the line number is important because we're 
even more likely to have multiple lines with the same contents in one file.

What we *could* do, is run Grep, then take just the list of files names 
that it returns, visit them all in Emacs and repeat the search in all of 
them. But that would require a more complex abstraction than just 
"search command", as well as some juggling of buffers that weren't open 
before (we don't want to add more open buffers just because the user has 
run a search, right?).

I'm not sure cost/benefit is worth it, but if you'd like to try your 
hand at writing it, please go ahead. Just let me add ripgrep support first.

BTW, that approach could fit project-search and 
project-query-replace-regexp well, I think. Perhaps the dired-do-* 
functions, too. Should improve their performance in a number of scenarios.

> (BTW, why it's not installed yet?)

Waiting for the feedback.

It went through several minor revisions. Do you like the most recent 
version? If so, please reply to the message containing it. If you don't, 
please also reply and say why.

> So like this feature presenting such completions without line numbers:
> 
>    lisp/progmodes/project.el:(cl-defgeneric project-root)
>    lisp/progmodes/project.el:(cl-defmethod project-root ((project (head transient))))
>    lisp/progmodes/project.el:(cl-defmethod project-root ((project (head vc))))
> 
> xref for grep could work the same way without line numbers:
> 
>    lisp/progmodes/project.el:names"^Jproject--read-file-cpd-relative)
>    lisp/progmodes/project.el:names"^Jproject--read-file-absolute)
> 
> Then visiting such grep hit should use Emacs search functions
> to find the grep hit in the visited file.

These are two substrings inside that file that matched the search 
regexp. But there could be substrings in the same file that are equal to 
either of these but don't match said regexp, e.g. because they are 
preceded or followed by some different contents.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 01:24:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 20:24:17 2020
Received: from localhost ([127.0.0.1]:57205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjuOp-00076P-H9
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 20:24:17 -0500
Received: from mail-wr1-f47.google.com ([209.85.221.47]:46258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kjuOn-00076B-LN
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 20:24:10 -0500
Received: by mail-wr1-f47.google.com with SMTP id g14so18939320wrm.13
 for <31796 <at> debbugs.gnu.org>; Mon, 30 Nov 2020 17:24:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=GnFlQiDGK9BYAuEPchHWBb+EkQV9A0GvcmSmfQxiC0E=;
 b=YGz2CsvFX1FsVx+by4gut1X/qcPsItXyVLxxf8/m/lzHN2Ua/A/HkrDJvR178iYnv9
 mBSzAHSwAYgyr8k/5C3NQ2DlSuPzThfYAcNZwvSDvGXlp4zCiJdBlVVgpr8K0XBpk139
 FV/GmRJ2s5iMFZFRt5lOBL8i37OK5qTlt6lE2lqujA+UAvoaTeaQbMoz4ofnmgG742Z3
 E9A70oS4cKMwfogTNQ7vuIbJ7BonUWIhfqMkfvzUECffH/aZpJeQle1x2u6Kv/unJOjU
 1+6J57yPbv1vWVajDU2wd3Ck8huYGs29IssOBduualwDeEVYGqq5UH/b9fNAE0LUPuzO
 dL4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=GnFlQiDGK9BYAuEPchHWBb+EkQV9A0GvcmSmfQxiC0E=;
 b=JGmwBHbZYeyDhMMfGjYGtmpkNFKfd7MeJIsQA0jYVIycGvtd138bed9L4ImhTmsZHX
 7f9fRdQjnfYZO106D1+98TqhyuxkEss5k42v2QRYISQnE0NQ6HKuSxLHMmUFp8TiFFWD
 0I+bE7Nw4GoJtMCNsnSUl9KjU0YTiHwwGy4Wdum3Ra0fTh1e6nLZ7dberoJk/xTNbkPm
 iQ8M2s2n7NsON8SWLwa4gh2UoNYvMJLz+vKMqUdLyZkW3TL0kVpfMISU+3mSerrRsiq7
 TB8Yt7Y0i1N1wZ9T0cdaVjmmxISFoKALNQqh8/Nvg8Z4TIRTbwhN8FJ/xTGfhcWZnsAq
 P5dA==
X-Gm-Message-State: AOAM530TO/M66ywhd+qQ6Dv1sgau2cx1PMppI/nbfJ5dxde3iW1ocJmj
 mM/OTlaja9J5oxqNR9jnvjVXJ6HWtyKNHw==
X-Google-Smtp-Source: ABdhPJyyl4CG/TQNBgMBmsk8t02CllvJ6zaE9K1y1HHXxUdjIZ9fY26apE2k/C6zWLIcPGvaCAK+BA==
X-Received: by 2002:adf:dd04:: with SMTP id a4mr390231wrm.77.1606785843888;
 Mon, 30 Nov 2020 17:24:03 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id a65sm121708wmc.35.2020.11.30.17.24.02
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 30 Nov 2020 17:24:03 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Eli Zaretskii <eliz@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN> <834kl6lv5f.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <b50bf44b-5b2b-7625-6612-bb81e0c413bd@HIDDEN>
Date: Tue, 1 Dec 2020 03:24:01 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <834kl6lv5f.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 30.11.2020 17:30, Eli Zaretskii wrote:
>> Cc:abela@HIDDEN,31796 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dgutov@HIDDEN>
>> Date: Mon, 30 Nov 2020 04:25:31 +0200
>>
>> To sum up, there are options, but I don't see a working solution that is
>> based on GNU Grep. And that's the most portable search program we have,
>> I think.
> Maybe we should say that if someone wants to be able to find multiline
> regexp, they should install ripgrep?

We could do that, indeed.

Certainly better than not having that feature at all.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 1 Dec 2020 01:23:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 20:23:12 2020
Received: from localhost ([127.0.0.1]:57201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjuNs-00074n-5e
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 20:23:12 -0500
Received: from mail-wr1-f41.google.com ([209.85.221.41]:45255)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kjuNq-00074Z-D4
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 20:23:10 -0500
Received: by mail-wr1-f41.google.com with SMTP id t4so18945687wrr.12
 for <31796 <at> debbugs.gnu.org>; Mon, 30 Nov 2020 17:23:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=ZawjKx4iEtXw386x8QglX5O58k+fxiCRioPol56wRjo=;
 b=PnWLweJb/JO66azxwsKzwh7+CdTibKAl//Zqz/G1p7zI0GrWRbdihWtAs8A7A0Kknn
 eyHESfs0yJ2mIBVH07kgPF19mtFvDwuRdut/PBW/w2PdKN7L5jazz1uTtLF44NjH//tX
 SwE3gmF7O2P73dRz30w+X/a29AD3We6vX5CaCgANeSwQxfDjVTX7VNf3BD0huEQBwdFC
 CJHkrjE8q56nfsToVZyGOxGIq5SiVj+XtIzvi+ZyfaddHspbz/wHXDK596rV/x4n/Oy+
 60KkfZtHsppCfS79Vd8xmrsxztyf7pAMDq2SLpZ4/fydUknqAvE723wXi7NOsl4S6Bjq
 km6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=ZawjKx4iEtXw386x8QglX5O58k+fxiCRioPol56wRjo=;
 b=djy/ACFEdd9agcSFt+GEhX4mYCNw2rKIESokASeLHMpf8Fidf41GLz4RsNEYg5qYcS
 3AJ1OiYqdb4AR7EJQa+oBxGFUTCS8IyAeJV+7gInnWSH9Oi6RuG/d+qB5/cuQ/zY6ejA
 Ia01m+3N6cIKbs0saIqkko0SkohtIFcINrcvFYNFWp573tCM/c0ZmfxCYHRz5X5524H9
 +uYeMHlmEgSnxPjuVoJP9HbeB5tzwpvzi1Ofr1/q8Kz9zVyp/ZwwYA26e6Y4QqSCgR4N
 u2r2GsEE2QndNLzskdijLiqKErMPplREBAXvhq7h4oo22y9372c2ULbk06vg+RFdQWGT
 mmRA==
X-Gm-Message-State: AOAM533UfFyeZA9laJ4mySIitnpQEN0Bn1zRiOfQqCNBPuImMib/AqjL
 kFKOonuDPmXCTycJcb9vKsrJw0pFoUhb+w==
X-Google-Smtp-Source: ABdhPJy7q9gX2TTgvvUlLLpIj/codk4scVokcCx2Kgu4rRBlG9/XsRPN5ugAv+VVxhv9h2TLpGu/hg==
X-Received: by 2002:adf:ed04:: with SMTP id a4mr399653wro.172.1606785784274;
 Mon, 30 Nov 2020 17:23:04 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id o203sm165084wmb.0.2020.11.30.17.23.01
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 30 Nov 2020 17:23:03 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Jean Louis <bugs@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN> <834kl6lv5f.fsf@HIDDEN>
 <X8US6Pl3UpJE2jRX@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <43b0d5df-a4e7-e8a7-d6cf-5dc6bc7a52cf@HIDDEN>
Date: Tue, 1 Dec 2020 03:23:00 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <X8US6Pl3UpJE2jRX@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 30.11.2020 17:42, Jean Louis wrote:
> It is possible to combine with sed:
> https://www.gnu.org/software/sed/manual/html_node/Text-search-across-multiple-lines.html
> 
> https://www.gnu.org/software/sed/manual/html_node/Multiline-techniques.html#Multiline-techniques

It's pretty much Chinese to me, sorry.

Can you write a sed search script like that that outputs in the expected 
format?

Meaning,

   FILE_NAME\0LINE_NUMBER_1:MATCH_LINE_1
   ...
   LINE_NUMBER_N:MATCH_LINE_N




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 30 Nov 2020 16:36:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 11:36:27 2020
Received: from localhost ([127.0.0.1]:56454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjmA3-0008SR-Cb
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 11:36:27 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43038)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kjmA1-0008SE-6h
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 11:36:21 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59392)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kjm9t-0002Q0-Mk; Mon, 30 Nov 2020 11:36:13 -0500
Received: from [176.228.60.248] (port=3825 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kjm9s-00023w-QJ; Mon, 30 Nov 2020 11:36:13 -0500
Date: Mon, 30 Nov 2020 18:36:05 +0200
Message-Id: <83k0u2kdje.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jean Louis <bugs@HIDDEN>
In-Reply-To: <X8USNVr0oXH9iBnw@HIDDEN> (message from Jean Louis
 on Mon, 30 Nov 2020 18:39:33 +0300)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
 <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
 <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <834kl6lv5f.fsf@HIDDEN> <X8USNVr0oXH9iBnw@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 30 Nov 2020 18:39:33 +0300
> From: Jean Louis <bugs@HIDDEN>
> Cc: Dmitry Gutov <dgutov@HIDDEN>, abela@HIDDEN,
>   31796 <at> debbugs.gnu.org
> 
> * Eli Zaretskii <eliz@HIDDEN> [2020-11-30 18:31]:
> > > Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
> > > From: Dmitry Gutov <dgutov@HIDDEN>
> > > Date: Mon, 30 Nov 2020 04:25:31 +0200
> > > 
> > > To sum up, there are options, but I don't see a working solution that is 
> > > based on GNU Grep. And that's the most portable search program we have, 
> > > I think.
> > 
> > Maybe we should say that if someone wants to be able to find multiline
> > regexp, they should install ripgrep?
> 
> Does this help?
> 
> https://stackoverflow.com/questions/3717772/regex-grep-for-multi-line-search-needed#7167115

I think this was already discussed up-thread?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 30 Nov 2020 15:45:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 10:45:51 2020
Received: from localhost ([127.0.0.1]:56320 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjlN9-0002im-Bp
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 10:45:51 -0500
Received: from static.rcdrun.com ([95.85.24.50]:49119)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bugs@HIDDEN>) id 1kjlN7-0002iY-2R
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 10:45:49 -0500
Received: from localhost ([::ffff:197.157.34.183])
 (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384)
 by static.rcdrun.com with ESMTPSA
 id 00000000002C1AE2.000000005FC513A6.00000212; Mon, 30 Nov 2020 15:45:41 +0000
Date: Mon, 30 Nov 2020 18:42:32 +0300
From: Jean Louis <bugs@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Message-ID: <X8US6Pl3UpJE2jRX@HIDDEN>
References: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
 <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
 <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <834kl6lv5f.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
In-Reply-To: <834kl6lv5f.fsf@HIDDEN>
User-Agent: Mutt/2.0 (3d08634) (2020-11-07)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, Dmitry Gutov <dgutov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* Eli Zaretskii <eliz@HIDDEN> [2020-11-30 18:31]:
> > Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
> > From: Dmitry Gutov <dgutov@HIDDEN>
> > Date: Mon, 30 Nov 2020 04:25:31 +0200
> > 
> > To sum up, there are options, but I don't see a working solution that is 
> > based on GNU Grep. And that's the most portable search program we have, 
> > I think.
> 
> Maybe we should say that if someone wants to be able to find multiline
> regexp, they should install ripgrep?

It is possible to combine with sed:
https://www.gnu.org/software/sed/manual/html_node/Text-search-across-multiple-lines.html

https://www.gnu.org/software/sed/manual/html_node/Multiline-techniques.html#Multiline-techniques





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 30 Nov 2020 15:40:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 10:40:51 2020
Received: from localhost ([127.0.0.1]:56293 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjlII-0002ZA-V5
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 10:40:51 -0500
Received: from static.rcdrun.com ([95.85.24.50]:34289)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bugs@HIDDEN>) id 1kjlIH-0002Yq-S3
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 10:40:50 -0500
Received: from localhost ([::ffff:197.157.34.183])
 (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384)
 by static.rcdrun.com with ESMTPSA
 id 00000000002C000B.000000005FC5127B.00007FBC; Mon, 30 Nov 2020 15:40:42 +0000
Date: Mon, 30 Nov 2020 18:39:33 +0300
From: Jean Louis <bugs@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Message-ID: <X8USNVr0oXH9iBnw@HIDDEN>
References: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
 <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
 <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
 <834kl6lv5f.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
In-Reply-To: <834kl6lv5f.fsf@HIDDEN>
User-Agent: Mutt/2.0 (3d08634) (2020-11-07)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, Dmitry Gutov <dgutov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* Eli Zaretskii <eliz@HIDDEN> [2020-11-30 18:31]:
> > Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
> > From: Dmitry Gutov <dgutov@HIDDEN>
> > Date: Mon, 30 Nov 2020 04:25:31 +0200
> > 
> > To sum up, there are options, but I don't see a working solution that is 
> > based on GNU Grep. And that's the most portable search program we have, 
> > I think.
> 
> Maybe we should say that if someone wants to be able to find multiline
> regexp, they should install ripgrep?

Does this help?

https://stackoverflow.com/questions/3717772/regex-grep-for-multi-line-search-needed#7167115





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 30 Nov 2020 15:30:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 10:30:41 2020
Received: from localhost ([127.0.0.1]:56289 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjl8S-0002KV-UR
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 10:30:41 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49948)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kjl8Q-0002KJ-IN
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 10:30:38 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57624)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kjl8I-000495-CX; Mon, 30 Nov 2020 10:30:31 -0500
Received: from [176.228.60.248] (port=3713 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kjl8F-0006L4-Bz; Mon, 30 Nov 2020 10:30:29 -0500
Date: Mon, 30 Nov 2020 17:30:20 +0200
Message-Id: <834kl6lv5f.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN> (message from
 Dmitry Gutov on Mon, 30 Nov 2020 04:25:31 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Mon, 30 Nov 2020 04:25:31 +0200
> 
> To sum up, there are options, but I don't see a working solution that is 
> based on GNU Grep. And that's the most portable search program we have, 
> I think.

Maybe we should say that if someone wants to be able to find multiline
regexp, they should install ripgrep?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 30 Nov 2020 08:55:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 30 03:55:22 2020
Received: from localhost ([127.0.0.1]:53406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjexu-0005PX-9m
	for submit <at> debbugs.gnu.org; Mon, 30 Nov 2020 03:55:22 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:56219)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1kjexs-0005PE-T4
 for 31796 <at> debbugs.gnu.org; Mon, 30 Nov 2020 03:55:21 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 86BA24000D;
 Mon, 30 Nov 2020 08:55:13 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
 <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
 <83a6v6tss9.fsf@HIDDEN>
 <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
Date: Mon, 30 Nov 2020 10:49:58 +0200
In-Reply-To: <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN> (Dmitry Gutov's
 message of "Mon, 30 Nov 2020 04:25:31 +0200")
Message-ID: <87blffns95.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: Eli Zaretskii <eliz@HIDDEN>, abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Now that I've dug in a little, the situation seems difficult.
>
> -Pz does work, but it forces Grep to consider the file as one long
>  string. As a consequence, if we ask it to output the line number, the
>  number will always be 1. That's not a helpful mode of operation.
>
> Even if it worked differently, -P imposes a significant performance penalty
> from what I see, even when the extra syntax is not actually used. So we
> couldn't enable it by default.

When a grep input pattern contains a newline, then xref could use
the same algorithm as is used for 'M-.', i.e. run 'grep -Pzl'
to get the file names that contain the pattern, then return
these file names without line numbers.  This works exactly
like a new feature of extending xref-show-xrefs-function
with a new completion function was proposed recently on emacs-devel
(BTW, why it's not installed yet?)

So like this feature presenting such completions without line numbers:

  lisp/progmodes/project.el:(cl-defgeneric project-root)
  lisp/progmodes/project.el:(cl-defmethod project-root ((project (head transient))))
  lisp/progmodes/project.el:(cl-defmethod project-root ((project (head vc))))

xref for grep could work the same way without line numbers:

  lisp/progmodes/project.el:names"^Jproject--read-file-cpd-relative)
  lisp/progmodes/project.el:names"^Jproject--read-file-absolute)

Then visiting such grep hit should use Emacs search functions
to find the grep hit in the visited file.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 30 Nov 2020 02:25:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 29 21:25:42 2020
Received: from localhost ([127.0.0.1]:53002 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjYso-0007vj-4B
	for submit <at> debbugs.gnu.org; Sun, 29 Nov 2020 21:25:42 -0500
Received: from mail-wm1-f42.google.com ([209.85.128.42]:38225)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kjYsl-0007vU-W2
 for 31796 <at> debbugs.gnu.org; Sun, 29 Nov 2020 21:25:40 -0500
Received: by mail-wm1-f42.google.com with SMTP id g185so13109592wmf.3
 for <31796 <at> debbugs.gnu.org>; Sun, 29 Nov 2020 18:25:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=t0EwoCK3jwdoQHFmkGdVdc7SlZtLG1/RFdbt+IzBA5c=;
 b=oQNtdRfb53HhJX/ZKtLV/H6PRlys5E2B/yKk+CZBDsIqRb6/YcZeYkhIjFe1l8lkAx
 WvmfSQN3B4ZdJeQEUUufvGv2srT4P/RgzMQDUYI/lDY/nihS7JJD/4qkspL4jVLBxpQU
 yNn3RxiNdUAyvZYRlwUchjUunCzbxHahHPzHGIDzMtE7PM3lLATEHSFPgFJ/4JgcD2B9
 0JZ2kePjPYfGltPPKToycvDkMvu8qe2ebqUeED6RBXm0TaSTwNJeASCThPGNmzcsaKlB
 Rz2rhUzFTTm81iaIohpWNQHKgmm2qeAakK6PXyycDR1aCP/U17Kv/9lXe5y7O+56NXzo
 hv5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=t0EwoCK3jwdoQHFmkGdVdc7SlZtLG1/RFdbt+IzBA5c=;
 b=guZGlRknERpAaQTfC7Q9XBThnmn2NMjWJ/rf341K7zZZY9gIk1e33NM8vftiNn6PjC
 gzpInDHnNFu53ibyMJdeymOMtxVayS1xALE6N5HU7++burKLetYOgkVAQhxMtQ9wN9HB
 o1kPtpBeMzqNeo7o6g9sKwMXj/sio3bRMi7Q53NRdzGjNHZWJBc6VRdNWM/HwJWMwEuG
 y6GQAIsQPMBZL/fchyR9k6gm2a1reN8e5G9pODqHs3NVCct1TVj2/Vx7GZvPz1OLl+c8
 IvfefAZ0IH6cbZ1yB8PdeY5ZlfdIEQksx2HHfgvIA01SLurzB8MCphif2PpXb9XuDS0B
 ERzQ==
X-Gm-Message-State: AOAM530tN3AUcGUEdvc9BUmp+JxriF7fz+fIeyBMmwq2R05lXiCQ6DTY
 ejvolaBLO7SIUDVDFNY830FmlORf3W4enA==
X-Google-Smtp-Source: ABdhPJy8RqovfzxBBVI8Di29FnY/TI8NqFwLzweJPbruoTh1HQMIEPpmMLbh19Vbktk4tSLUVyn/UQ==
X-Received: by 2002:a1c:1d85:: with SMTP id d127mr4631050wmd.39.1606703133934; 
 Sun, 29 Nov 2020 18:25:33 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id c131sm43177709wmf.3.2020.11.29.18.25.32
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 29 Nov 2020 18:25:33 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Eli Zaretskii <eliz@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> <83a6v6tss9.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <08c0bbce-051e-7a49-106a-d6d0629b2224@HIDDEN>
Date: Mon, 30 Nov 2020 04:25:31 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <83a6v6tss9.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 24.11.2020 22:16, Eli Zaretskii wrote:
>> Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@HIDDEN>
>> Date: Tue, 24 Nov 2020 21:43:22 +0200
>>
>> How about https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31796#23 ?
> 
> The idea sounds fine to me.
> 
>> Someone more familiar with existing ports of Grep on different systems
>> should weigh in on it.
> 
> I don't think it's necessary.  We just need to probe Grep for support
> of these switches, and then use it.  The result cannot be worse than
> it is now.

Now that I've dug in a little, the situation seems difficult.

-Pz does work, but it forces Grep to consider the file as one long 
string. As a consequence, if we ask it to output the line number, the 
number will always be 1. That's not a helpful mode of operation.

Even if it worked differently, -P imposes a significant performance 
penalty from what I see, even when the extra syntax is not actually 
used. So we couldn't enable it by default.

There is a similar program called pcregrep which outputs in the expected 
format:

$ pcregrep -MHn "names\"\n *" lisp/progmodes/project.el
lisp/progmodes/project.el:772:  :type '(choice (const :tag "Read with 
completion from relative names"
                         project--read-file-cpd-relative)
lisp/progmodes/project.el:774:                 (const :tag "Read with 
completion from absolute names"
                         project--read-file-absolute)

...but it doesn't seem to have a way to reliably detect where a match 
result ends. When we're talking multiline, perhaps the searched file 
includes a string like "file-name/etc:number"? Some of our tests 
probably do. Grep has an flag -Z (or --null) which adds a null byte 
after file names, but pcregrep doesn't.

And anyway, pcregrep isn't usually installed by default.

ripgrep, OTOH, seems to combine both good features here:

$ rg -Hn --multiline --null "names\"\n *" lisp/progmodes/project.el
lisp/progmodes/project.el772:  :type '(choice (const :tag "Read with 
completion from relative names"
773:                        project--read-file-cpd-relative)
774:                 (const :tag "Read with completion from absolute names"
775:                        project--read-file-absolute)

And it also disables the multiline mode automatically if the regexp 
can't match a newline (the multiline mode is significantly slower).

To sum up, there are options, but I don't see a working solution that is 
based on GNU Grep. And that's the most portable search program we have, 
I think.

The other recommendations I see (here: 
https://unix.stackexchange.com/questions/112132/how-can-i-grep-patterns-across-multiple-lines) 
include bespoke scripts in sed or perl in command mode. These seem less 
portable, but if someone would like to try their hand at one that would 
also output file names and line numbers in the expected format, I'd be 
happy to benchmark it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 29 Nov 2020 15:22:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 29 10:22:26 2020
Received: from localhost ([127.0.0.1]:52251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjOWw-0004LM-6X
	for submit <at> debbugs.gnu.org; Sun, 29 Nov 2020 10:22:26 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38366)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kjOWu-0004L9-SI
 for 31796 <at> debbugs.gnu.org; Sun, 29 Nov 2020 10:22:25 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35312)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kjOWn-0005Yo-4V; Sun, 29 Nov 2020 10:22:17 -0500
Received: from [176.228.60.248] (port=2357 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kjOWm-0005aD-L4; Sun, 29 Nov 2020 10:22:16 -0500
Date: Sun, 29 Nov 2020 17:22:07 +0200
Message-Id: <831rgcmbmo.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <cb02c72c-590c-416b-f895-5f16ab049072@HIDDEN> (message from
 Dmitry Gutov on Sun, 29 Nov 2020 04:30:14 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN> <831rgitqe2.fsf@HIDDEN>
 <87y2iqnhh2.fsf@HIDDEN> <83k0u9sais.fsf@HIDDEN>
 <87d0016w6n.fsf@HIDDEN> <83v9dtqiw1.fsf@HIDDEN>
 <cb02c72c-590c-416b-f895-5f16ab049072@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Sun, 29 Nov 2020 04:30:14 +0200
> 
> For instance, a number of character classes in Emacs regexps are 
> dependent on the syntax table. Like [:word:], for instance.
> 
> Even [:space:] is dependent on syntax, while it matches a fixed set of 
> characters in Grep. So when searching across different file types we 
> can't even "expand" such constructs into concrete characters to search for.

It isn't clear to me which interpretation users will want.  I don't
think there's a single answer.

> Someone should try it, but it's a fair amount of work to handle all 
> supported constructs, and to catch all (most?) the regexps which we 
> can't support in this mode.

FWIW, I think this is much less important than the embedded newline
support.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 29 Nov 2020 02:30:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 28 21:30:28 2020
Received: from localhost ([127.0.0.1]:49418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kjCTs-0007yQ-IH
	for submit <at> debbugs.gnu.org; Sat, 28 Nov 2020 21:30:28 -0500
Received: from mail-ed1-f52.google.com ([209.85.208.52]:38100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kjCTn-0007y8-S2
 for 31796 <at> debbugs.gnu.org; Sat, 28 Nov 2020 21:30:26 -0500
Received: by mail-ed1-f52.google.com with SMTP id y4so10246581edy.5
 for <31796 <at> debbugs.gnu.org>; Sat, 28 Nov 2020 18:30:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=DiNZ04GolJswS8WNgEuAGrkedsJiBu91y/fSXJ4TD+Q=;
 b=jYGy9DNOj4PdWTm5DEvB9IAJkdCPyuKnfBWJvxwhXUyFWPdtEcS3QHka2VRWB5M4K4
 E9fcKB3JJlTICh0hXZgYFBY3SLBmoBNYu/09ovaD6D3hOVCRB/y6oAMZAzzg8Q8KJSpH
 mqUKyhcW+qiIvDrOmjvdUMjRyyaTvXsKk6+jB0R8W1mC+TpBmXGxXhsI9PG/dWrlaYNJ
 QZWjGR8AKGA/prdyQnIzjdLlVraarLbjPmaVtC+l6U7JMP2GGdW0KgQ0qG70uYpXK8zD
 7QSuk2V1dMCkKw55ADaz+hEZ8220zDEZhZgOUGs26aokday9mCAL5fusq+5FRnf6FgWV
 r68g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=DiNZ04GolJswS8WNgEuAGrkedsJiBu91y/fSXJ4TD+Q=;
 b=okazbbwmIdKbeLB9lgRd7rnW1v1gJ7vuRMNPmLs++xrtKCp0anB3yPTFiyrv7m5IaT
 tAJjoezLSToDgT+SdrX5YePeaKIQGpi7mu5FxrLYChuphnKyc+VWlOi3AePs2qYJUemw
 kSS5KjNkHmyx/jSvlhvVPNK1KK7a2JUx5svDnQ2iFcPzKEXzMLoOeT8vQm+UVppN8zUb
 gQOj5hAE11woKNyaajES1cunsmGDPO42MzYl53JRiZBiVLqNFQSP3Zgqe5dF2b1fqCfF
 jLQsZVyLuFmac0A9ALpuwmBayGktAagN9iooays0TlmoaVpd1OF+VCRI99P5nrR+iwBp
 zz8A==
X-Gm-Message-State: AOAM532U3RG1m5qyc4o7Lg4OWbjkNbp+cYA6qY+Cx9OqTjCN/70OTlTv
 dd8IX0/pXg8KQgDbEzA/WyHCiI3xB0GSvA==
X-Google-Smtp-Source: ABdhPJy4WmRnk+5vMhmuKJfYx775ef+p4eiFFAfwcR5Oubz0H+nRoj6sUJL521fO+JPWUCT+RxM3xw==
X-Received: by 2002:a50:8004:: with SMTP id 4mr13062178eda.329.1606617017321; 
 Sat, 28 Nov 2020 18:30:17 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id ba7sm7146971edb.55.2020.11.28.18.30.15
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 28 Nov 2020 18:30:16 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Eli Zaretskii <eliz@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN> <831rgitqe2.fsf@HIDDEN>
 <87y2iqnhh2.fsf@HIDDEN> <83k0u9sais.fsf@HIDDEN>
 <87d0016w6n.fsf@HIDDEN> <83v9dtqiw1.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <cb02c72c-590c-416b-f895-5f16ab049072@HIDDEN>
Date: Sun, 29 Nov 2020 04:30:14 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <83v9dtqiw1.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 25.11.2020 22:30, Eli Zaretskii wrote:
> I'd like us to fix the current binding of Q so that it supports
> everything the previous command did.

Just how much of "everything" are we talking about?

For instance, a number of character classes in Emacs regexps are 
dependent on the syntax table. Like [:word:], for instance.

Even [:space:] is dependent on syntax, while it matches a fixed set of 
characters in Grep. So when searching across different file types we 
can't even "expand" such constructs into concrete characters to search for.

One approach I've considered is replacing such unsupported constructs 
with '.', or removing them entirely for constructs like \< and \_<. And 
then post-filter the resulting matches in Emacs.

For example, xref-references-in-directory uses a special case of this 
approach. In the general case though, I worry users would sometimes 
create regexps that result in an exponentially slow or just match-all 
regexp being passed to Grep, which would never finish, for no obvious 
reason.

Someone should try it, but it's a fair amount of work to handle all 
supported constructs, and to catch all (most?) the regexps which we 
can't support in this mode.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 25 Nov 2020 20:30:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 25 15:30:35 2020
Received: from localhost ([127.0.0.1]:37224 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ki1Qw-00005F-Qo
	for submit <at> debbugs.gnu.org; Wed, 25 Nov 2020 15:30:35 -0500
Received: from eggs.gnu.org ([209.51.188.92]:56352)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ki1Qv-00004v-EB
 for 31796 <at> debbugs.gnu.org; Wed, 25 Nov 2020 15:30:33 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52482)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1ki1Qo-0002bR-IU; Wed, 25 Nov 2020 15:30:26 -0500
Received: from [176.228.60.248] (port=1942 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1ki1Qn-0000ih-9n; Wed, 25 Nov 2020 15:30:25 -0500
Date: Wed, 25 Nov 2020 22:30:22 +0200
Message-Id: <83v9dtqiw1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87d0016w6n.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 25 Nov 2020 22:18:28 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN> <831rgitqe2.fsf@HIDDEN>
 <87y2iqnhh2.fsf@HIDDEN> <83k0u9sais.fsf@HIDDEN>
 <87d0016w6n.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: drew.adams@HIDDEN,  abela@HIDDEN,  31796 <at> debbugs.gnu.org
> Date: Wed, 25 Nov 2020 22:18:28 +0200
> 
> > 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.
> 
> Would adding `M-s a M-C-%' help users who want the old behavior back?
> Or a keybinding for `fileloop-continue' is needed as well?

I'd prefer not to add fileloop-continue back in any shape or form.
I'd like us to fix the current binding of Q so that it supports
everything the previous command did.  Bringing back the commands we
obsoleted is counter-productive.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 25 Nov 2020 20:25:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 25 15:25:54 2020
Received: from localhost ([127.0.0.1]:37214 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ki1MP-0008Od-W8
	for submit <at> debbugs.gnu.org; Wed, 25 Nov 2020 15:25:54 -0500
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:41525)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1ki1MN-0008OQ-VX
 for 31796 <at> debbugs.gnu.org; Wed, 25 Nov 2020 15:25:52 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 7CFAD60006;
 Wed, 25 Nov 2020 20:25:44 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN> <831rgitqe2.fsf@HIDDEN>
 <87y2iqnhh2.fsf@HIDDEN> <83k0u9sais.fsf@HIDDEN>
Date: Wed, 25 Nov 2020 22:18:28 +0200
In-Reply-To: <83k0u9sais.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 25 Nov
 2020 17:48:11 +0200")
Message-ID: <87d0016w6n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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

Would adding `M-s a M-C-%' help users who want the old behavior back?
Or a keybinding for `fileloop-continue' is needed as well?

> 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::.

Maybe `M-s M-,' is not bad for `fileloop-continue'?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 25 Nov 2020 17:38:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 25 12:38:02 2020
Received: from localhost ([127.0.0.1]:36856 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khyjx-0004Ir-G9
	for submit <at> debbugs.gnu.org; Wed, 25 Nov 2020 12:38:01 -0500
Received: from aserp2130.oracle.com ([141.146.126.79]:40960)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1khyjw-0004IX-23
 for 31796 <at> debbugs.gnu.org; Wed, 25 Nov 2020 12:38:00 -0500
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0APHSdRb074973;
 Wed, 25 Nov 2020 17:37:50 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=urYwfrE3UXid22bcGgeJBOxnIvQmX72yys8TVbAkO7g=;
 b=VMuBRMyZjmiZ3HS6un2qJc74l7kQm6ZEsvxm/K3kQLig2KG4tnMlZPOVeNMXKsiG+Rgm
 52acFcZqF2WqZqFfLEauWeaUurL2tO2kdF4C6QWJPb104kBB/KEJUKdLttkgJuOh6ik9
 jjZow3914OAfVOmzu1+lxeR6gVgzk3hMFzc35hVz1PwpRqpOuB+al13fjsmTxGLrpGA/
 CanXa9uj4Ald/pyMxjKRFEiQS5X4akjhpyFq9nyH4lcQlSs0MPev6owSYKtJS3Myrd65
 qgYKlXEd0D5t+JI90Ni+PIpTQH689a6uMYamPzx3e8PU+dLJC7A7XzdT1Sr7+xrxAytI dg== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by aserp2130.oracle.com with ESMTP id 351kwhamhb-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Wed, 25 Nov 2020 17:37:50 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0APHU1DY166370;
 Wed, 25 Nov 2020 17:37:49 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by userp3020.oracle.com with ESMTP id 351kwfd7r2-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 25 Nov 2020 17:37:49 +0000
Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0APHbiQt019389;
 Wed, 25 Nov 2020 17:37:45 GMT
MIME-Version: 1.0
Message-ID: <be0a3beb-d12b-4f29-9d02-7c65915334c9@default>
Date: Wed, 25 Nov 2020 09:37:43 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: RE: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN>
 <c46208e5-91ec-46d5-8866-f365d0bef10d@default>
 <87im9unh9o.fsf@HIDDEN>
In-Reply-To: <87im9unh9o.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5071.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9816
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 bulkscore=0 phishscore=0
 malwarescore=0 spamscore=0 suspectscore=0 mlxscore=0 mlxlogscore=852
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011250110
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9816
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 mlxscore=0 impostorscore=0
 suspectscore=0 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0
 lowpriorityscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=862
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011250110
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> >> >  Multiple > Search >
> >> >    Query Replace Using TAGS Table...   M-q
> >> >    Query Replace Using `find'...       Q
> >>
> >> 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.
> >
> > For the latter, I use `M-q' (not `M-%').
> > I suggest that vanilla Emacs do the same.
> >
> > These two commands have quite similar purposes.
> > I suggest that they have similar keys.
> >
> > Also, `M-%' has its normal meaning when Dired
> > has been toggled to writable (WDired).  That
> > key should be kept for its normal purpose, IMO.
>=20
> 'M-q' has its normal meaning of filling the paragraph,
> so it would be confusing to use other meaning in Dired.

How do you think filling a paragraph is useful
in Dired (or WDired)?  I don't follow you, here.

> While finding a good short key would be nice, here is a patch
> that for consistency with 'M-s a M-C-s' also adds 'M-s a M-C-%':

Count me out as favorable for that suggestion.
(Just one opinion.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 25 Nov 2020 15:48:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 25 10:48:22 2020
Received: from localhost ([127.0.0.1]:36720 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khx1p-0001b7-VS
	for submit <at> debbugs.gnu.org; Wed, 25 Nov 2020 10:48:22 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60264)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1khx1n-0001at-Lk
 for 31796 <at> debbugs.gnu.org; Wed, 25 Nov 2020 10:48:20 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46588)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1khx1g-00016s-8z; Wed, 25 Nov 2020 10:48:12 -0500
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 <eliz@HIDDEN>)
 id 1khx1f-0005mj-7j; Wed, 25 Nov 2020 10:48:12 -0500
Date: Wed, 25 Nov 2020 17:48:11 +0200
Message-Id: <83k0u9sais.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87y2iqnhh2.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 25 Nov 2020 09:28:57 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN> <831rgitqe2.fsf@HIDDEN>
 <87y2iqnhh2.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: drew.adams@HIDDEN,  abela@HIDDEN,  31796 <at> 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 <ESC>
>   <ESC>’, which repeats the ‘query-replace’ because it used the minibuffer
>   to read its arguments.  *Note C-x <ESC> <ESC>: 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 <RET> TO <RET>'
       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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 25 Nov 2020 07:54:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 25 02:54:30 2020
Received: from localhost ([127.0.0.1]:34063 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khpdG-0008Ha-Hr
	for submit <at> debbugs.gnu.org; Wed, 25 Nov 2020 02:54:30 -0500
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:36589)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1khpdE-0008H9-FP
 for 31796 <at> debbugs.gnu.org; Wed, 25 Nov 2020 02:54:29 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id A418020006;
 Wed, 25 Nov 2020 07:54:20 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN>
 <c46208e5-91ec-46d5-8866-f365d0bef10d@default>
Date: Wed, 25 Nov 2020 09:31:23 +0200
In-Reply-To: <c46208e5-91ec-46d5-8866-f365d0bef10d@default> (Drew Adams's
 message of "Tue, 24 Nov 2020 12:12:25 -0800 (PST)")
Message-ID: <87im9unh9o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

>> >  Multiple > Search >
>> >    Query Replace Using TAGS Table...   M-q
>> >    Query Replace Using `find'...       Q
>>
>> 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.
>
> For the latter, I use `M-q' (not `M-%').
> I suggest that vanilla Emacs do the same.
>
> These two commands have quite similar purposes.
> I suggest that they have similar keys.
>
> Also, `M-%' has its normal meaning when Dired
> has been toggled to writable (WDired).  That
> key should be kept for its normal purpose, IMO.

'M-q' has its normal meaning of filling the paragraph,
so it would be confusing to use other meaning in Dired.

While finding a good short key would be nice, here is a patch
that for consistency with 'M-s a M-C-s' also adds 'M-s a M-C-%':


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=query-replace-regexp.patch

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index cdf8ab984e..bed779104c 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -308,6 +308,7 @@ vc-dir-mode-map
     (define-key map "Q" 'vc-dir-query-replace-regexp)
     (define-key map (kbd "M-s a C-s")   'vc-dir-isearch)
     (define-key map (kbd "M-s a M-C-s") 'vc-dir-isearch-regexp)
+    (define-key map (kbd "M-s a M-C-%") 'vc-dir-query-replace-regexp)
     (define-key map "G" 'vc-dir-ignore)
 
     (let ((branch-map (make-sparse-keymap)))
diff --git a/lisp/dired.el b/lisp/dired.el
index 08b19a0225..6cbcc17852 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1932,6 +1932,7 @@ dired-mode-map
     ;; isearch
     (define-key map (kbd "M-s a C-s")   'dired-do-isearch)
     (define-key map (kbd "M-s a M-C-s") 'dired-do-isearch-regexp)
+    (define-key map (kbd "M-s a M-C-%") 'dired-do-query-replace-regexp)
     (define-key map (kbd "M-s f C-s")   'dired-isearch-filenames)
     (define-key map (kbd "M-s f M-C-s") 'dired-isearch-filenames-regexp)
     ;; misc
@@ -2214,9 +2215,12 @@ dired-mode-map
     (define-key map [menu-bar operate dashes-3]
       '("--"))
 
-    (define-key map [menu-bar operate query-replace]
-      '(menu-item "Query Replace in Files..." dired-do-find-regexp-and-replace
-		  :help "Replace regexp matches in marked files"))
+    (define-key map [menu-bar operate find-regexp-and-replace]
+      '(menu-item "Replace Regexp in Files..." dired-do-find-regexp-and-replace
+        	  :help "Replace regexp matches in marked files"))
+    (define-key map [menu-bar operate query-replace-regexp]
+      '(menu-item "Query Replace in Files..." dired-do-query-replace-regexp
+        	  :help "Replace regexp matches in marked files"))
     (define-key map [menu-bar operate search]
       '(menu-item "Search Files..." dired-do-find-regexp
 		  :help "Search marked files for matches of regexp"))
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index a395453491..7b8dcc2096 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -598,7 +598,7 @@ project-prefix-map
     (define-key map "p" 'project-switch-project)
     (define-key map "g" 'project-find-regexp)
     (define-key map "G" 'project-or-external-find-regexp)
-    (define-key map "r" 'project-query-replace-regexp)
+    (define-key map [?\C-\M-%] 'project-query-replace-regexp)
     map)
   "Keymap for project commands.")
 

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 25 Nov 2020 07:54:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 25 02:54:25 2020
Received: from localhost ([127.0.0.1]:34060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khpdB-0008HI-9N
	for submit <at> debbugs.gnu.org; Wed, 25 Nov 2020 02:54:25 -0500
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50965)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1khpdA-0008H5-Ac
 for 31796 <at> debbugs.gnu.org; Wed, 25 Nov 2020 02:54:24 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A30D56000A;
 Wed, 25 Nov 2020 07:54:15 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN> <831rgitqe2.fsf@HIDDEN>
Date: Wed, 25 Nov 2020 09:28:57 +0200
In-Reply-To: <831rgitqe2.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 24 Nov
 2020 23:07:49 +0200")
Message-ID: <87y2iqnhh2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> >> 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?  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 <ESC>
  <ESC>’, which repeats the ‘query-replace’ because it used the minibuffer
  to read its arguments.  *Note C-x <ESC> <ESC>: Repetition.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 21:38:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 16:38:00 2020
Received: from localhost ([127.0.0.1]:33297 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khg0e-0003n1-Bk
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 16:38:00 -0500
Received: from userp2130.oracle.com ([156.151.31.86]:33152)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1khg0c-0003me-KB
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 16:37:59 -0500
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOLIvGt076238;
 Tue, 24 Nov 2020 21:37:44 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=UvZ9gDMNnF1QW73FumH+l0Yr5bRF2tKMSZvbA6KN6q0=;
 b=fOsyijMJgrpbSfkG6zqT1681PZqGvID5wY3rLLiQgsDI6ti38+6OwwDLS4aIZUu2yoKR
 qeAP7wb0In8hZJ4HoGNhtfTOtZpLuFIm4J2L+T4mFB93TApvW3H9uEsaVA7i1FhbY9mA
 wOusr6RRUgbRjJILh+M+hQNQb9gUSudkmJQE+rH0Z5k3mM1LWqXBpZsa34ASqn1kuj0R
 r0HpuKqAAaCFlsk2iiksIM2g+gpD1Ildb6rwlGH8Pug44GXtq6vHDL0qDAf2hz3PUoRv
 Aibz41ndNpWl50srwE+dHeAg5ZVzeeM12eqdEx+SUgssBYBB1dnHyB8QriRDlJ5v6Q9V Qg== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by userp2130.oracle.com with ESMTP id 3514q8hqtq-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Tue, 24 Nov 2020 21:37:44 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOLEubo168311;
 Tue, 24 Nov 2020 21:35:44 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by userp3030.oracle.com with ESMTP id 34yctx1fds-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 24 Nov 2020 21:35:43 +0000
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0AOLZgTu015138;
 Tue, 24 Nov 2020 21:35:42 GMT
MIME-Version: 1.0
Message-ID: <142b3234-a15a-4850-8eea-4bbe89de7169@default>
Date: Tue, 24 Nov 2020 13:35:40 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: RE: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <<CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN>> <<838saqtsm9.fsf@HIDDEN>>
 <<87mtz64htw.fsf@HIDDEN>> <<831rgitqe2.fsf@HIDDEN>>
In-Reply-To: <<831rgitqe2.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5071.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 suspectscore=0
 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=915 adultscore=0
 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2011240126
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=928
 clxscore=1015
 impostorscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0
 priorityscore=1501 malwarescore=0 adultscore=0 bulkscore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011240126
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > >> 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.
>=20
> AFAIR, it does need a way to continue the loop if the user exits the
> loop.

If that feature is needed and broken, then that's true
for the command itself (`dired-do-query-replace-regexp'),
right?

It has nothing to do with whether or not that command
has a key binding, and even less to do with whether it
has the key binding `Q'.  No?

I guess you're (not saying but hinting?) that the
decision to take key `Q' away from that command also
took away the ability to continue the loop if the user
exits it.  If so, that too is (apparently) unfortunate.

But what does that have to do with giving that command a
key binding (e.g. `M-q')?

What am I missing?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 21:08:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 16:08:05 2020
Received: from localhost ([127.0.0.1]:33225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khfXg-00031C-Ti
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 16:08:05 -0500
Received: from eggs.gnu.org ([209.51.188.92]:56348)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1khfXe-00030h-U5
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 16:08:03 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52545)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1khfXU-0002Wy-Vk; Tue, 24 Nov 2020 16:07:54 -0500
Received: from [176.228.60.248] (port=3667 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1khfXS-0003NS-Vz; Tue, 24 Nov 2020 16:07:52 -0500
Date: Tue, 24 Nov 2020 23:07:49 +0200
Message-Id: <831rgitqe2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87mtz64htw.fsf@HIDDEN> (message from Juri Linkov on
 Tue, 24 Nov 2020 22:31:55 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: drew.adams@HIDDEN,  abela@HIDDEN,  31796 <at> debbugs.gnu.org
> Date: Tue, 24 Nov 2020 22:31:55 +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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 20:51:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 15:51:38 2020
Received: from localhost ([127.0.0.1]:33198 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khfHm-0002bx-Ba
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:51:38 -0500
Received: from aserp2130.oracle.com ([141.146.126.79]:41656)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1khfHk-0002bk-Om
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:51:37 -0500
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOKianl017322;
 Tue, 24 Nov 2020 20:51:23 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=TUBEwsY1JkWEk9qXvvFfFBnJyxhsCA3urTUNpI8ko+k=;
 b=myghVWtWc4v6rXAnzu+IczwdFioZGYtHJOANHBrhOBMf05pFkkHP8cE43UqHM7L1MbyM
 eSwsU6R22HXSo8H97AjMivlk+SRR5q378P4Wf1wYJ84UVocX+abiESCJ09apky6oLdCv
 9p/WJgcu9nD/tJ6h/seeK+58pTlWpAhDQer0MGlcB3VNqQEWY98W2HO0cK/A+h97H91p
 QBRnMCW/2/WEbWuTQOsDIAF+v1J2WwiTKrqrwTpiVJhHYNyCrm8oHlXeXyi5Wji3L8Mg
 EaSBOk0Zagy9qvGlMw5HufPPq+w9wihHWWNAPp2gH51ufoHRFEfjfvn4S3cYPpMLR2ex Ew== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by aserp2130.oracle.com with ESMTP id 34xrdaw2ns-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Tue, 24 Nov 2020 20:51:23 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOKouQd098682;
 Tue, 24 Nov 2020 20:51:22 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userp3030.oracle.com with ESMTP id 34yctx0b37-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 24 Nov 2020 20:51:22 +0000
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0AOKpLkr023340;
 Tue, 24 Nov 2020 20:51:21 GMT
MIME-Version: 1.0
Message-ID: <2193a4bf-8a9e-4f29-9031-e7bcd415f9b3@default>
Date: Tue, 24 Nov 2020 12:51:20 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: RE: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
 <87mtz64htw.fsf@HIDDEN>
In-Reply-To: <87mtz64htw.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5071.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 suspectscore=0
 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=999 adultscore=0
 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2011240124
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 impostorscore=0 mlxscore=0
 mlxlogscore=999 spamscore=0 phishscore=0 clxscore=1015 malwarescore=0
 lowpriorityscore=0 adultscore=0 suspectscore=0 priorityscore=1501
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011240123
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> >> 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?
>=20
> 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.

Yes.  (Now I understand the question. Thx.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 20:40:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 15:40:02 2020
Received: from localhost ([127.0.0.1]:33178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khf6X-0002Js-T0
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:40:02 -0500
Received: from relay12.mail.gandi.net ([217.70.178.232]:60467)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1khf6W-0002Jf-Km
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:40:00 -0500
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 7EE4D200002;
 Tue, 24 Nov 2020 20:39:51 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN> <838saqtsm9.fsf@HIDDEN>
Date: Tue, 24 Nov 2020 22:31:55 +0200
In-Reply-To: <838saqtsm9.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 24 Nov
 2020 22:19:42 +0200")
Message-ID: <87mtz64htw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 20:34:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 15:34:42 2020
Received: from localhost ([127.0.0.1]:33164 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khf1O-0002C5-8d
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:34:42 -0500
Received: from userp2130.oracle.com ([156.151.31.86]:43246)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1khf1M-0002Bq-B8
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:34:40 -0500
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOKYU2M016235;
 Tue, 24 Nov 2020 20:34:30 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=+gO7TKjwtSYMp0+SSNcnDozEAYMGSnhIf44v5qcnc08=;
 b=t7IFzgwo4zV4myQ7J6mpyuJJd1GDVQ9s+zXnPDiYgOkszKB7ANL9xIHrXkbPtrNWOTx4
 3Z3+jdF5cSxmqXX0wk4UmSnk9TqVuMkTcOpjk90+m2jHVgqNp24ejnRLaAU0I6ZOcM+z
 xCclS21dmFx4LSWeIJoJy6M2izT6RIxWxRJeIUBYPEeR1VnxaqeNzxe6Tqo03EUXUSH0
 L/1WU0x0jznYLYVmUZ0YD7trcuKGXXokiMuN1dMCXlgVLHInUfhQpRLJOeeNBP4NBeOf
 VI1OltHF4s1Vy/GYiLsWIq8yGau530g6GtM5bYPDYzUCee5TMJb9ENe+MpbhypvFEYtq eg== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by userp2130.oracle.com with ESMTP id 3514q8hgqp-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Tue, 24 Nov 2020 20:34:29 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOKQ1oA019282;
 Tue, 24 Nov 2020 20:34:29 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserp3030.oracle.com with ESMTP id 34ycfnt796-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 24 Nov 2020 20:34:29 +0000
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AOKYSqo007160;
 Tue, 24 Nov 2020 20:34:28 GMT
MIME-Version: 1.0
Message-ID: <8649f2cf-d6a7-4cc9-b135-444df509b2dc@default>
Date: Tue, 24 Nov 2020 12:32:27 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: RE: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <<CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>>
 <<10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>>
 <<91c98791-9df2-43ee-9aac-205c5b0de9c2@default>>
 <<87blfm6922.fsf@HIDDEN>> <<838saqtsm9.fsf@HIDDEN>>
In-Reply-To: <<838saqtsm9.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5071.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0
 mlxscore=0 spamscore=0
 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=912
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011240121
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=929
 clxscore=1015
 impostorscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0
 priorityscore=1501 malwarescore=0 adultscore=0 bulkscore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011240122
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > >  Multiple > Search >
> > >    Query Replace Using TAGS Table...   M-q
> > >    Query Replace Using `find'...       Q
> >
> > 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.
>=20
> How will this help when the command to continue the loop is not bound
> to any key?

I don't understand the question.  And which
command?  Are you asking how to use `M-q'
(`dired-do-query-replace-regexp')?

Are you saying that even though Emacs has kept
`dired-do-query-replace-regexp' it's no longer
usable for some reason?

> We didn't just change the binding of Q without a good reason.

So you say.  I've already disagreed that the
reason given was a good one.  IMHO, the new
command should have been given a new key.

Regardless of whether the existing key `Q'
should have been usurped, its previous command
still exists, and it seems to still be usable
and useful.  If so, what is wrong with giving
it its own key binding (`M-q' in my case)?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 20:19:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 15:19:50 2020
Received: from localhost ([127.0.0.1]:33142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khen0-0001ov-6F
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:19:50 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37914)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1khemy-0001oi-Mf
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:19:48 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51202)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1khems-0003M7-V2; Tue, 24 Nov 2020 15:19:42 -0500
Received: from [176.228.60.248] (port=4693 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1khems-0005Pe-C4; Tue, 24 Nov 2020 15:19:42 -0500
Date: Tue, 24 Nov 2020 22:19:42 +0200
Message-Id: <838saqtsm9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87blfm6922.fsf@HIDDEN> (message from Juri Linkov on
 Tue, 24 Nov 2020 21:28:29 +0200)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org, drew.adams@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Date: Tue, 24 Nov 2020 21:28:29 +0200
> Cc: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
> 
> >  Multiple > Search >
> >    Query Replace Using TAGS Table...   M-q
> >    Query Replace Using `find'...       Q
> 
> 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?

We didn't just change the binding of Q without a good reason.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 20:16:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 15:16:17 2020
Received: from localhost ([127.0.0.1]:33126 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khejZ-0001jJ-2Z
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:16:17 -0500
Received: from eggs.gnu.org ([209.51.188.92]:36412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1khejW-0001iz-5e
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:16:16 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51083)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1khejQ-0002r6-Jn; Tue, 24 Nov 2020 15:16:08 -0500
Received: from [176.228.60.248] (port=4472 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1khejQ-00055i-2N; Tue, 24 Nov 2020 15:16:08 -0500
Date: Tue, 24 Nov 2020 22:16:06 +0200
Message-Id: <83a6v6tss9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN> (message from
 Dmitry Gutov on Tue, 24 Nov 2020 21:43:22 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
 <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Tue, 24 Nov 2020 21:43:22 +0200
> 
> How about https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31796#23 ?

The idea sounds fine to me.

> Someone more familiar with existing ports of Grep on different systems 
> should weigh in on it.

I don't think it's necessary.  We just need to probe Grep for support
of these switches, and then use it.  The result cannot be worse than
it is now.

> >> If you're saying we can't afford to break even a minor feature like
> >> this, I don't think there are a lot of options.
> > 
> > We should try not to break any features, yes.
> 
> That's just common sense.

Of course.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 20:12:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 15:12:48 2020
Received: from localhost ([127.0.0.1]:33117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khegC-0001dD-Ir
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:12:48 -0500
Received: from userp2130.oracle.com ([156.151.31.86]:55310)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1khegB-0001d0-47
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 15:12:47 -0500
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOKAhab176136;
 Tue, 24 Nov 2020 20:12:35 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=zzT6qZdelkVZu1w5or3RfOEUwMHoAJe+HviX2o/98VY=;
 b=uYBr653C0LbkevaerevHqGJ1w7i2ii5Bk/Icr8Ywq51zkhIolMFiVSkirZ+zHkkSOZxf
 ZYAD2i2GoovlxR3sbTwsYooJ8wrNLqHG5X8+rlnS3ylZZvswg/7mZ/hVmMCTGNWmNt/a
 BSUkTtXLJJXxG9cIMzHai55ibKrX+M5La1Oa7VnjfyDuMfeuJOV2Zrm9J02Px/fmGdZ1
 f55tbT1jmcq6MlcgWsCpCr3Dhq4KlcKJDTu+8aAPgQI8PPWQiq0akXuvCzIw+XMCQCk9
 sgK4CenXnpw78G5NOw6gnwkSdXo8MatA1RTwkU9HGOYhSepvCmEhndIp99ghBIf8W8NG sA== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by userp2130.oracle.com with ESMTP id 3514q8he4c-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Tue, 24 Nov 2020 20:12:35 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AOK9xae167726;
 Tue, 24 Nov 2020 20:12:34 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserp3030.oracle.com with ESMTP id 34ycfnsna6-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 24 Nov 2020 20:12:34 +0000
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AOKCQ10018328;
 Tue, 24 Nov 2020 20:12:29 GMT
MIME-Version: 1.0
Message-ID: <c46208e5-91ec-46d5-8866-f365d0bef10d@default>
Date: Tue, 24 Nov 2020 12:12:25 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: RE: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
 <87blfm6922.fsf@HIDDEN>
In-Reply-To: <87blfm6922.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5071.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0
 mlxscore=0 spamscore=0
 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=961
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011240119
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9815
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=975
 clxscore=1015
 impostorscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0
 priorityscore=1501 malwarescore=0 adultscore=0 bulkscore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011240119
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> >  Multiple > Search >
> >    Query Replace Using TAGS Table...   M-q
> >    Query Replace Using `find'...       Q
>=20
> 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.

For the latter, I use `M-q' (not `M-%').
I suggest that vanilla Emacs do the same.

These two commands have quite similar purposes.
I suggest that they have similar keys.

Also, `M-%' has its normal meaning when Dired
has been toggled to writable (WDired).  That
key should be kept for its normal purpose, IMO.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 19:43:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 14:43:32 2020
Received: from localhost ([127.0.0.1]:33069 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kheDs-0000vk-0W
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:43:32 -0500
Received: from mail-wm1-f46.google.com ([209.85.128.46]:34717)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kheDq-0000vY-FH
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:43:30 -0500
Received: by mail-wm1-f46.google.com with SMTP id x13so79544wmj.1
 for <31796 <at> debbugs.gnu.org>; Tue, 24 Nov 2020 11:43:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=VDy81zPjyk2SJHMUJ/OJE3Dh1p0dQwKgcYrkaIU612k=;
 b=OGaoyvB9uFUDfbHPFb/PUsQEctYiminn4n4ogKOwfFI9QR9VWIAcsP/kAWutEc5rMt
 I4w2kiYp+bDRw/YTRTjfjR8wEutO4utFRO4GPJqgPrfmXyUhsRxoXsnxWpTjXWnsqcq3
 Av6z5gXw6Rf2adCRc8B4eqo5JGNz7an2J41xkz+AN7Vbr4pqdK9oWYsA72V4r3euXCSs
 lT9K3a5CSxZ3sywZQ2Ryq/4UIpmB3iNxZ6JzwY1Xw3TCCbSRq7CSRKVyH4cjSOt98gbU
 oFegOCEfTmFlEouRI63MUn795OBmbE9TZz4hngGlRbF6+LSn50q959HdaCOM1N7XW6At
 2qyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=VDy81zPjyk2SJHMUJ/OJE3Dh1p0dQwKgcYrkaIU612k=;
 b=mKkevw3yrk/1qKHxjSlNsyEgPe06Mzaxw9OjPqeUVXAYXUL1NH5WSYC8AzPJ7Scq9E
 k0RIq+ar4Uz+T2VRMI4p3BB+ZE6L+TbXvyCMBsp18vjUuPQGWRIUlYYe0p/IrEFnuNks
 H5eHxznpB+4WlPwANywlYeKT9iTUn3EtLtQlnsb1KQvE8+j50nS8wh9nfjRRKQY3h8QX
 msilfdaWago5uKSLz59/3iaeR0vXuD1APeRS779rIX3u492bF1G1C32X0qaaloR1/dWj
 dqXAUhshnuflZ2+i0DwlLAzXh6tr542cf8D5jr6DNFOQB+UsfjqizbI0PMFM3PWtQPJG
 GOng==
X-Gm-Message-State: AOAM533y/bU+j6sdKUWxEubxaVYnHEzn2Y/lckl6+mmYpB2ZSfKG4SXL
 vNgDdCSvXRSDFc+NmOXvX178jPuFDqDN0g==
X-Google-Smtp-Source: ABdhPJw765uOW0BitjPPxaXNvKpIQrcsCmhFO4EqFpqY5UON78iTZARVZRFZ1x+i27IfxbwJ8qS3oA==
X-Received: by 2002:a1c:208f:: with SMTP id g137mr726wmg.116.1606247004579;
 Tue, 24 Nov 2020 11:43:24 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id d3sm27122334wre.91.2020.11.24.11.43.23
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 24 Nov 2020 11:43:23 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Eli Zaretskii <eliz@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> <83lfequ30g.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <c7d79d76-1a66-ce30-625c-dc45c699606f@HIDDEN>
Date: Tue, 24 Nov 2020 21:43:22 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <83lfequ30g.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 24.11.2020 18:35, Eli Zaretskii wrote:
>> Cc: 31796 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@HIDDEN>
>> Date: Tue, 24 Nov 2020 17:43:53 +0200
>>
>> We've been aware of it for at least two years now. So what are we, then,
>> negligent, careless, or incompetent?
> 
> Busy.  That, and the fact that no one came up with a clear idea of how
> to fix this (at least IIRC).

How about https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31796#23 ?

Someone more familiar with existing ports of Grep on different systems 
should weigh in on it.

>> If you're saying we can't afford to break even a minor feature like
>> this, I don't think there are a lot of options.
> 
> We should try not to break any features, yes.

That's just common sense.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 19:39:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 14:39:38 2020
Received: from localhost ([127.0.0.1]:33065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kheA6-0000q0-FU
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:39:38 -0500
Received: from mail-wm1-f51.google.com ([209.85.128.51]:50720)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1kheA4-0000pm-SO
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:39:37 -0500
Received: by mail-wm1-f51.google.com with SMTP id c198so80224wmd.0
 for <31796 <at> debbugs.gnu.org>; Tue, 24 Nov 2020 11:39:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=IT6lbO47L/N61Bt2VKbO6aPaP+bo2W0T0ZVX0wpys/c=;
 b=fb6ZP4v9u7AcVFsJmBLFrGsdYk/ZJz+DddINQbt2CEB9+FLymJVP02pw0z2siysoyF
 iPLkhQtfrLW395edvcYy7ySOVHVJd+bhPGaa56wqXbgeh/XhqPBblpGzOYwEHRFAmlZs
 Axho2CNqlewlHGAzjhERif2qSbPBcO0wDTMeKlRnqsSeWmfBlUb0aCWSc/38aV2Hs7t3
 Dpcp57rVBxoP0LquWxXxje7ZECGHc2J8ZLcvIpv8NttZHa1MC86ZF1E8a8J+zjztGmDS
 tMIMxodEwO24m5xY41lcLKoT2BOVj07wkJKbSRJllbhWr0ugYLZslrR40llaXlWhHb7t
 DnAw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=IT6lbO47L/N61Bt2VKbO6aPaP+bo2W0T0ZVX0wpys/c=;
 b=mr9XxrcMb+GCobtnVU/yONoZFf9FWsTsBlWUzt3UTeApxKdMPJ8tDThpf5Hil/zo+Z
 HBChqNzr8IFHjQCTwLk2GzTksTB8+tf+VXn2J8jFnD6jzvcYK5A533Ql5Fz7wiEItrSX
 dRcgua52ismw3yuP/uZchhmf4efwuO6KcZGRG3KGP83TX86hzGOm+fDWeIT3KWf2JyIH
 X7rjzR3Au88vwo6Gi3j9R/OvPWoeSP+Pq1SVQ0LXMN/RSGitEMYI33P6y2tDpDtUzADW
 IdcBJGYYkLre533DgCFAVeLPauLDy5x1OGiAf1foHBTGL1wvCKDLMKxiekNdK8UyUjrZ
 3rrQ==
X-Gm-Message-State: AOAM533KVJy+c8VcOL+IYIP9OodU6y1BFPtN2RdrQvVqnt+Wh47jz51B
 Hu7gOx4iLS/nEi4aFZs0ysdOIhEwRLFkpg==
X-Google-Smtp-Source: ABdhPJz8xN2EDkgXhrcHsbkjeN5zPG226ChY2l+H+C+ocl0xrVJtly8Lx4hjwo7ZQJAaBSGeUXMQhg==
X-Received: by 2002:a1c:b304:: with SMTP id c4mr6981wmf.20.1606246767665;
 Tue, 24 Nov 2020 11:39:27 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id 90sm15588253wra.95.2020.11.24.11.39.25
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 24 Nov 2020 11:39:26 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Juri Linkov <juri@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <874kle68r1.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <1bc944ca-1f35-e9bf-2b38-944587698292@HIDDEN>
Date: Tue, 24 Nov 2020 21:39:24 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <874kle68r1.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 24.11.2020 21:29, Juri Linkov wrote:
>> dired-do-query-replace-regexp doesn't work with Tramp.
> Really?  I checked it and see no problems

Sorry, a clarification: it doesn't work on directories.

Which seems to be a conscious choice because with how dired-do-search 
and dired-do-query-replace-regexp are implementented, it would take a 
lot of time even when there are not too many files in such a directory. 
It has to copy each file to the local machine before doing the search.

dired-do-find-regexp and dired-do-find-regexp-and-replace handle 
directories just fine, however.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 19:29:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 14:29:28 2020
Received: from localhost ([127.0.0.1]:33044 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khe0G-0000ZM-Ku
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:29:28 -0500
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46619)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1khe0E-0000Yw-OJ
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:29:27 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A6BD5E000B;
 Tue, 24 Nov 2020 19:29:18 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
Date: Tue, 24 Nov 2020 21:29:06 +0200
In-Reply-To: <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN> (Dmitry Gutov's
 message of "Mon, 23 Nov 2020 23:28:37 +0200")
Message-ID: <874kle68r1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> dired-do-query-replace-regexp doesn't work with Tramp.

Really?  I checked it and see no problems.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 19:29:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 14:29:24 2020
Received: from localhost ([127.0.0.1]:33041 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khe0C-0000Z6-DY
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:29:24 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:39189)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1khe0A-0000Yr-QQ
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 14:29:23 -0500
X-Originating-IP: 91.129.99.98
Received: from mail.gandi.net (m91-129-99-98.cust.tele2.ee [91.129.99.98])
 (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 3CE1340003;
 Tue, 24 Nov 2020 19:29:14 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
Organization: LINKOV.NET
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
Date: Tue, 24 Nov 2020 21:28:29 +0200
In-Reply-To: <91c98791-9df2-43ee-9aac-205c5b0de9c2@default> (Drew Adams's
 message of "Mon, 23 Nov 2020 08:16:26 -0800 (PST)")
Message-ID: <87blfm6922.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>  Multiple > Search >
>    Query Replace Using TAGS Table...   M-q
>    Query Replace Using `find'...       Q

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 16:35:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 11:35:24 2020
Received: from localhost ([127.0.0.1]:32823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khbHn-0000ZT-St
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 11:35:24 -0500
Received: from eggs.gnu.org ([209.51.188.92]:59662)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1khbHl-0000ZE-EY
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 11:35:21 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47191)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1khbHe-0003FK-Jw; Tue, 24 Nov 2020 11:35:14 -0500
Received: from [176.228.60.248] (port=2776 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1khbHd-0000eV-AM; Tue, 24 Nov 2020 11:35:13 -0500
Date: Tue, 24 Nov 2020 18:35:11 +0200
Message-Id: <83lfequ30g.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN> (message from
 Dmitry Gutov on Tue, 24 Nov 2020 17:43:53 +0200)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
 <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: abela@HIDDEN, 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 31796 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Tue, 24 Nov 2020 17:43:53 +0200
> 
> We've been aware of it for at least two years now. So what are we, then, 
> negligent, careless, or incompetent?

Busy.  That, and the fact that no one came up with a clear idea of how
to fix this (at least IIRC).

> If you're saying we can't afford to break even a minor feature like 
> this, I don't think there are a lot of options.

We should try not to break any features, yes.  AFAIK, no one has yet
claimed that this cannot be fixed.  So the decision whether we can or
cannot stay with this broken doesn't have to be made yet.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 15:44:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 10:44:05 2020
Received: from localhost ([127.0.0.1]:60952 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khaU8-0005dx-Uv
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 10:44:05 -0500
Received: from mail-wm1-f42.google.com ([209.85.128.42]:33369)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1khaU7-0005dN-49
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 10:44:03 -0500
Received: by mail-wm1-f42.google.com with SMTP id p19so2301138wmg.0
 for <31796 <at> debbugs.gnu.org>; Tue, 24 Nov 2020 07:44:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=5uEZm0O/WN8QJKhPy4w2sR8ShMOCBKX5DzR/kdTJXeU=;
 b=UB3amYT8BwMZeZbzJaJlPiPypr8GnZIFUhA5yqGL23zbQOBm7QtETPlu47HOtghu5e
 i/Vz230Zo2mY60XJLNYfy7W9wT9yvl8m4iyjAWOv03Zg5DansFKBUwQg6TcAhY7/MC1a
 zgOQskasW0cQKMBqDi9lErxjN9u7AfVWIqk8pqZ1YdWxfjKjYcOkwR8A9dDGU315rHe7
 NUgCcWwx5r4+TE6kau4j14PHZmEG9zZqn4ubm5AXLhw6Qzn4GWd/a1pC5qex7nidsF9Q
 i1wmz0zcCFbkJ0Cq4XJcd6AGcaUQ5cV/qQmihyo9UMFcgJaEgWex94ZYqsNOJsRkQ6c3
 XFZA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=5uEZm0O/WN8QJKhPy4w2sR8ShMOCBKX5DzR/kdTJXeU=;
 b=dje0O8v/J2G1hV6Xlh+pdUhev1St96ATgduk3kuJJ7mIuBkWlIIGXMhteqvuNpaQbi
 s1D5P/ZDJDQpKCZJWOgMsYwkm49OOXhr2APsbI8/KeC7t9M2MSxN8M4BC5eFICylmbEZ
 zbYITJ1iyL6xehIN9VrynXLVi71xzmkNR2XFdhe/CZ3JE6xiilSc+mxxRsQxXR9luAwX
 JdLsFA7pJ+SUqO6We/zGCaEexIxG+pxwq6cnbK/yg+qF0U5+jrG7wUjz/3cwfTex8VEx
 mvq9D5TKZHrOSJ0SGKa9nCRIqQKbOyzAWRXcsqBOePR2sysfO0q7TRo/mpLpjYF5cykJ
 gpbw==
X-Gm-Message-State: AOAM533ImWySjOHcaxvI/IUD6ysWpV6ZVOrncCJAzChDMFkMypmOHbkL
 rO1+V2B2TQkZJgE7JTt7zGsVLAt8L7t9rA==
X-Google-Smtp-Source: ABdhPJz7lNHpejvncFHmq8WhKGwX8iS9h9kyXmTvMn9qlF+7l1MvthR3YBSLZ/p1bHj5CoLBIAi4TA==
X-Received: by 2002:a05:600c:ce:: with SMTP id
 u14mr5250322wmm.150.1606232636704; 
 Tue, 24 Nov 2020 07:43:56 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id u81sm6716862wmb.27.2020.11.24.07.43.54
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 24 Nov 2020 07:43:55 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Eli Zaretskii <eliz@HIDDEN>, Andreas Abel <abela@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> <831rgivl7l.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <c418090f-1c04-d431-5ef4-c3273958ef7d@HIDDEN>
Date: Tue, 24 Nov 2020 17:43:53 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <831rgivl7l.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 24.11.2020 17:16, Eli Zaretskii wrote:

> In fact, some of the passion in Dmitry's response wasn't directed at
> you, it was directed at myself and other senior maintainers who
> frequently object to changes and/or request complicated
> backward-compatibility shims, for that very reason.

In a way, perhaps. Even though I've been on the other side of these 
discussions as well.

But I was mostly pointing out a logical incompatibility to a user who 
installs a new release, but doesn't want to see anything change, ever.

> So please don't assume we don't care about stability, or don't care
> enough.  It would be simply unfair to make such assumptions.  We
> certainly don't need lectures about keeping Emacs stable and
> compatible.

That's true.

> What you see in this case is not the result of negligence or
> carelessness, it is the result of not being aware of this (relatively
> rare) use case becoming broken when we changed the UI of this and
> similar commands to a more convenient one.  It took time for people to
> report the problem, and it takes us more time to come up with a good
> solution.  That's all.

We've been aware of it for at least two years now. So what are we, then, 
negligent, careless, or incompetent?

If you're saying we can't afford to break even a minor feature like 
this, I don't think there are a lot of options.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 15:16:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 24 10:16:56 2020
Received: from localhost ([127.0.0.1]:60886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kha3s-0004wD-2E
	for submit <at> debbugs.gnu.org; Tue, 24 Nov 2020 10:16:56 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38998)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kha3q-0004w1-Tg
 for 31796 <at> debbugs.gnu.org; Tue, 24 Nov 2020 10:16:55 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45821)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kha3l-0006P0-3I; Tue, 24 Nov 2020 10:16:49 -0500
Received: from [176.228.60.248] (port=1966 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kha3k-0003rs-55; Tue, 24 Nov 2020 10:16:48 -0500
Date: Tue, 24 Nov 2020 17:16:46 +0200
Message-Id: <831rgivl7l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andreas Abel <abela@HIDDEN>
In-Reply-To: <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN> (message from
 Andreas Abel on Tue, 24 Nov 2020 00:49:24 +0100)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: 31796 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andreas Abel <abela@HIDDEN>
> Date: Tue, 24 Nov 2020 00:49:24 +0100
> 
> We value stability and conservativity over everything else.

We do, too.  If you stick around for a while, you will see how many
discussions here are due to the determination not to introduce even
the slightest risk of breaking compatibility with existing behavior.
In fact, some of the passion in Dmitry's response wasn't directed at
you, it was directed at myself and other senior maintainers who
frequently object to changes and/or request complicated
backward-compatibility shims, for that very reason.

So please don't assume we don't care about stability, or don't care
enough.  It would be simply unfair to make such assumptions.  We
certainly don't need lectures about keeping Emacs stable and
compatible.

What you see in this case is not the result of negligence or
carelessness, it is the result of not being aware of this (relatively
rare) use case becoming broken when we changed the UI of this and
similar commands to a more convenient one.  It took time for people to
report the problem, and it takes us more time to come up with a good
solution.  That's all.

If you have practical ideas for how to support these use cases with
the current command, please describe them.  TIA.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 01:19:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 20:19:48 2020
Received: from localhost ([127.0.0.1]:51717 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khMzj-00067u-QK
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 20:19:48 -0500
Received: from mail-wr1-f52.google.com ([209.85.221.52]:35834)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1khMzi-00067j-Sc
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 20:19:47 -0500
Received: by mail-wr1-f52.google.com with SMTP id r3so2360190wrt.2
 for <31796 <at> debbugs.gnu.org>; Mon, 23 Nov 2020 17:19:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:from:to:references:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=OiQf52hjsX+z1cO3uv7ZHEdqnogZCUJfwnv9F/RgHUo=;
 b=ZOPL5NP3ud/LPxKjvFtGX6LxOBE6obB3XLj8GiGLtFOkOUFfN0NvEzWTICj++32VxX
 vayyO2Mi/717f69mvVY9BMGXcOdfuTm5sNQPMhzOtYmxJnA7LWb9cdGQpF4dKoiUuRmq
 El9u4ZRekqDOIn544VJpit1N/poce9bSW8kcVEro2Yy4B/ZEEgSC68UuN26W1RYfV1lJ
 CkNJ1uDUMXeEGPyORthM8aWdCoh4k177ig6nXvdxZn36QF990N64RWGYOwh6VTHwLNSD
 8FCUiX9iJlWBHg31IKPtadiZ0MY5Bfy0qwlsSpGLZPYl5VoOKounUogfSe8sbxh6t92o
 aTvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:from:to:references:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=OiQf52hjsX+z1cO3uv7ZHEdqnogZCUJfwnv9F/RgHUo=;
 b=ZSOKZDM/I9rNCgU6NEk73gqjoxGFxORdVsL6tEuRngc1vRWUwQj5SbdcgNfqd4Z7jp
 bqkmWHXjqOdZeqyjhHb8hYZROUf5DRFL6PbhVJzLHlVkNGeyNMN2X3GCtrDmnZmgCPl0
 hDHKe9Ixw8ZFETl2aN8ZuXcqkxsED4aFLkryVxMeutv8NGBA9DknUF8Qxq2zdZbDbdeg
 2Y1nl/s1dx1Y5MUKAdEm+tqJUvWlh6eRmWJksZ92zuPjohiSjqKoz0xmShTtq6P7MOIm
 XzAE6r/AdHBwUM6H4p3Wbpr7WGNsNHlFYLH5olydtNe1/SwZK1Z5a7re3prahGk7SZot
 n9ZA==
X-Gm-Message-State: AOAM532tzyebblnzGLio1ETgKLMYjl5M2WvdXAqtE545nh7ier6IsfDW
 SbYqnYRJuCRWBD9RqgLt7vsXIzqCYTrvpw==
X-Google-Smtp-Source: ABdhPJxwe1Wq9KyOquDO0A3rCO+FtcMmJU6TzuA8FCDMGxg/xQ5U2osJR+v3tNAb4Ph8zJ31VWxDvA==
X-Received: by 2002:adf:fc48:: with SMTP id e8mr2473739wrs.313.1606180780853; 
 Mon, 23 Nov 2020 17:19:40 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id o4sm2021005wmh.33.2020.11.23.17.19.38
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 23 Nov 2020 17:19:39 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
From: Dmitry Gutov <dgutov@HIDDEN>
To: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
 <2c881d16-e7e7-833d-4287-95b152b305b8@HIDDEN>
Message-ID: <4d06e309-33c4-0c62-3630-06d03f95ce66@HIDDEN>
Date: Tue, 24 Nov 2020 03:19:38 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <2c881d16-e7e7-833d-4287-95b152b305b8@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 24.11.2020 02:13, Dmitry Gutov wrote:
> switch to the new  interface which removed the default binding for 
                     ^ xref

Specifically, the new bindings for 'M-.' and 'M-,'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 24 Nov 2020 00:13:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 19:13:29 2020
Received: from localhost ([127.0.0.1]:51648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khLxZ-0004X1-7B
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 19:13:29 -0500
Received: from mail-wr1-f47.google.com ([209.85.221.47]:38076)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1khLxY-0004Wp-5G
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 19:13:28 -0500
Received: by mail-wr1-f47.google.com with SMTP id p8so20571037wrx.5
 for <31796 <at> debbugs.gnu.org>; Mon, 23 Nov 2020 16:13:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=ZLkXXMFbEQy8x8rpSZbxmPLiOx7E13FJfODMcQaQGsU=;
 b=KemJn0ZpQOVAO+6jEAsHZsBuNsC//wfK7fZ3VoyQCDn05cFkEnIrdPobj37+qMoy4N
 Sxz1K2d63bu5yXBy1TIuY4+rNX50IeK+rF+25PIJ/LyZbgxzgsFpX0JgjXhvk3XmH314
 343wp2CDt9oFLsjMa4e072wnJoBjpllosampPtg8+LVWdgRtnUkoZxrbLHzHuG9flGWR
 uRQAuUF/EYtiaGpsJD/Klt3DI/tfu+dJdIJV2hYGoOP66qO92RxSZr94A+ma3GneGI43
 rjKrQOALGpIU4FKvJeeSxIuDXATjIf6MwKmex+6q+RJykLOPXQMZiQEDk20CMfhPHT9l
 2BEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=ZLkXXMFbEQy8x8rpSZbxmPLiOx7E13FJfODMcQaQGsU=;
 b=im8W80/aimY5cMO/uf0kvHNjSYzEV4DCCvVhQc/HQIjz0w34I46MrrRsvIQmCAJvNl
 yHw3jbQgbXYwZVhQL4JJVNR6Rv/yZSqrrlnUxSQ8QgDepY9o8CMGY2kGlsVbWF9FpVvO
 ZoWo2kFLq3cq5gloDc9Ot3lgtLoO3FtHrxnm62CfQoLaugT+shOKqajimT4nVUHFtJsS
 TzLuZUr5GGERlSg2V1VcsNxJEad1gGfhUnO57eexJCXgYbApb61Lg2rP18Rrb9sjjkgC
 SCWSMeHt3cNGbJgPQeyJenR+kfuybqDqPLsks7gn18DQwbOchA2wxxnwcqtySDwm4nlI
 CEHw==
X-Gm-Message-State: AOAM533pWSUfVR3DFEKlUhi2iw1/6xSJ7GC0c5onrk18iaYrk1y8CLcY
 fZ5Kik3gxTOGtS5KaXnHx+1jKxx4/WpdPw==
X-Google-Smtp-Source: ABdhPJy2dK9cE9dsv6AVQ+/WV/QEw0zhO/KsXgO0DbFThb1Gr08M1RCxyASnRzF6A4gp824c5HQoig==
X-Received: by 2002:adf:f888:: with SMTP id u8mr2092489wrp.381.1606176802143; 
 Mon, 23 Nov 2020 16:13:22 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id d128sm1813117wmc.7.2020.11.23.16.13.20
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 23 Nov 2020 16:13:21 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
 <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <2c881d16-e7e7-833d-4287-95b152b305b8@HIDDEN>
Date: Tue, 24 Nov 2020 02:13:19 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 24.11.2020 01:49, Andreas Abel wrote:
> With a software as old as emacs the most important feature is
> 
>    1. backwards-compatibility
> 
> The second most important feature is
> 
>    2. backwards-compatibility
> 
> The third most important feature is
> 
>    3. backwards-compatibility

No.

That's a road toward irrelevance.

> It is like with C and LaTeX.  If you cannot ensure that things keep 
> working as they did, don't change anything.
> 
> Tramp?  I had to google this term.

Tramp has been with us for ~20 years, and ~10 years a part of Emacs. It 
has a significant number of users.

Anyway, that Tramp fix was a happy side-effect. Now that I think back, 
the main reason was the switch to the new interface which removed the 
default binding for tags-loop-continue (now called fileloop-continue).

Which made using dired-do-search a little less convenient, and people 
asked for analogous commands which used the xref UI. The original 
commands are still with us, though.

> How often do programmers work on their local files in their day-to-day 
> business, how often with remote files via tramp?
> 
> If you contribute a new feature for 0.1% percent of the use cases but 
> disrupt something (even minor) for 99.9% of the use cases, then with an 
> old tool like emacs the choice is: don't replace the old functionality 
> with your new functionality.
> 
> Just don't break things.  Please.

I'm sorry for the inconvenience, really. But not being able to break 
anything, even, is an ever-growing cost on keeping Emacs relevant toward 
contemporary expectations, or otherwise making it better.

> If you want fancy functionality that works with remote files, this is 
> fine.  There are enough keys on the keyboard you can bind the new 
> functionality to.
> 
> Please don't break things that worked.
> 
> There are gazillion emacs users out there that dread each new emacs 
> version because it will break their setup, their workflows, their 
> habits.  We do not want to spend days after upgrades to get our work 
> environment back.

But you still upgrade to the new version? Expecting something new from 
it, right?

> We value stability and conservativity over everything else.

And then Emacs users get older, change jobs, or entirely leave the 
profession. If Emacs stays as it was 30 years ago, it will appeal only 
to users who started with it 30+ years ago. And many of those have 
already left.

Emacs users are an admirably faithful bunch, but there are forces of 
nature we have to contend with as well.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 23:49:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 18:49:35 2020
Received: from localhost ([127.0.0.1]:51630 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khLaR-0003xw-K6
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 18:49:35 -0500
Received: from targaryen.ita.chalmers.se ([129.16.226.133]:46097)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.abel@HIDDEN>) id 1khLaP-0003xh-45
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 18:49:34 -0500
Received: from Andreass-MacBook-Pro.local (129.16.10.245) by
 targaryen.ita.chalmers.se (129.16.226.133) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.1.1913.5; Tue, 24 Nov 2020 00:49:25 +0100
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Dmitry Gutov <dgutov@HIDDEN>, <31796 <at> debbugs.gnu.org>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
From: Andreas Abel <abela@HIDDEN>
Message-ID: <e637b0c0-25b3-8fd5-9e5a-b064b243c776@HIDDEN>
Date: Tue, 24 Nov 2020 00:49:24 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
 Gecko/20100101 Thunderbird/78.4.3
MIME-Version: 1.0
In-Reply-To: <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Originating-IP: [129.16.10.245]
X-ClientProxiedBy: tyrell.ita.chalmers.se (129.16.226.132) To
 targaryen.ita.chalmers.se (129.16.226.133)
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 31796
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

With a software as old as emacs the most important feature is

   1. backwards-compatibility

The second most important feature is

   2. backwards-compatibility

The third most important feature is

   3. backwards-compatibility

It is like with C and LaTeX.  If you cannot ensure that things keep 
working as they did, don't change anything.

Tramp?  I had to google this term.

How often do programmers work on their local files in their day-to-day 
business, how often with remote files via tramp?

If you contribute a new feature for 0.1% percent of the use cases but 
disrupt something (even minor) for 99.9% of the use cases, then with an 
old tool like emacs the choice is: don't replace the old functionality 
with your new functionality.

Just don't break things.  Please.

If you want fancy functionality that works with remote files, this is 
fine.  There are enough keys on the keyboard you can bind the new 
functionality to.

Please don't break things that worked.

There are gazillion emacs users out there that dread each new emacs 
version because it will break their setup, their workflows, their 
habits.  We do not want to spend days after upgrades to get our work 
environment back.

We value stability and conservativity over everything else.

Thanks to everyone who contributes to emacs.  --Andreas

On 2020-11-23 22:28, Dmitry Gutov wrote:
> On 23.11.2020 11:09, Andreas Abel wrote:
>> - Why isn't the more robust
>>
>>    dired-do-query-replace-regexp
>>
>> bound to Q?
> 
> Which is the "more robust", though? dired-do-query-replace-regexp 
> doesn't work with Tramp. dired-do-find-regexp-and-replace does.
> 
> And even if the former is fixed to work, the latter will work much 
> faster remotely. It's also going to be faster in many "local" cases too.
> 
> If we don't manage to find a portable enough solution to do multiline 
> searches, we could at least warn the user interactively about 
> unsupported features, though.

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

andreas.abel@HIDDEN
http://www.cse.chalmers.se/~abela/




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 21:28:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 16:28:47 2020
Received: from localhost ([127.0.0.1]:51446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khJOB-0006rl-Lo
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 16:28:47 -0500
Received: from mail-wm1-f46.google.com ([209.85.128.46]:40014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1khJO9-0006rX-G0
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 16:28:45 -0500
Received: by mail-wm1-f46.google.com with SMTP id a3so856486wmb.5
 for <31796 <at> debbugs.gnu.org>; Mon, 23 Nov 2020 13:28:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=dbX2toB3dXKnSoQPLLwhgobTk1WQ+yjeN+ER8BffYE4=;
 b=kFGbq4KAiHMUIRHIlLHzg42mlb4QcTcGS+1e2AYb+7D4MNPSlHhXV/BEvbL0kYZMVI
 cQ99CIaMtfWsxjzJQZPTVVbtivUNHaTr95rI1yzWQIOqVjj8FIGesYVI4QWkmws3pjrf
 t3xWhz4O6KuE9Bj8pgnLLQsxwco2W3dLRVGSLOXj6olMe+d/bBCjX4unJaBhMI4g66bc
 J5Gs9+rgrjDkakpRnELHUabmLCtffFsxZiwV3QrinWH2+O/GOzla9m+h30G0eb2tgzeT
 1t+QrpdLFBAAanV33Kps0Q0CNrqgfSPAAY5UjZA0Ekx6rNhY8AUbcWjEkf8tKpS39CeV
 uf5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=dbX2toB3dXKnSoQPLLwhgobTk1WQ+yjeN+ER8BffYE4=;
 b=JHEXXubmDx8aaNcpimmZciz6gOpyV8edpKxSuLuFJpqpR+/EF4sz7R5ghieOV/bfvO
 rDaXUj6AN7lTykne56AAE0/h4pO1kBiD+FBOiRYlbu+MdMCrgi6tpnYwtleM82PdYN3U
 XQ24EE/HlcJ/TCioepIBS3xhCPM14KE+EDJxYQZKL+Hyyu+fCeupaJTd1IjxHS0Hl3IO
 AH6iLSxoUYcKACt/7xVjfUPWb2OOYlN8ikZgkt7gdMHa2KOH5ytBh4NN37xU7C6LpJSG
 VWchfqRGBjasMcFmsB8a8eNV7dBUYB5Y2pmfsfx1QzxI5JYJFL4M2lbPcqWbdtgPXYSM
 jbqQ==
X-Gm-Message-State: AOAM530bRs4+zuYTvmnrT193Ex8QmumujlweSZHqnm1vE1dLyWrht6Lv
 69PvUwve/aSs8wWK0VgmNMlL+MxMdcAA7g==
X-Google-Smtp-Source: ABdhPJzaNEn5fnLI4ykHC3HmBiIj+z09+HPN0GVuUSlW941QoOGRGwsGIzLFZrFOUxRPLFPxKH+2iA==
X-Received: by 2002:a1c:9ad0:: with SMTP id c199mr870389wme.46.1606166919352; 
 Mon, 23 Nov 2020 13:28:39 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id f23sm922517wmb.43.2020.11.23.13.28.38
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 23 Nov 2020 13:28:38 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <fc4fa744-1b45-042e-905c-4baf0cf5d952@HIDDEN>
Date: Mon, 23 Nov 2020 23:28:37 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 23.11.2020 11:09, Andreas Abel wrote:
> - Why isn't the more robust
> 
>    dired-do-query-replace-regexp
> 
> bound to Q?

Which is the "more robust", though? dired-do-query-replace-regexp 
doesn't work with Tramp. dired-do-find-regexp-and-replace does.

And even if the former is fixed to work, the latter will work much 
faster remotely. It's also going to be faster in many "local" cases too.

If we don't manage to find a portable enough solution to do multiline 
searches, we could at least warn the user interactively about 
unsupported features, though.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 21:26:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 16:26:09 2020
Received: from localhost ([127.0.0.1]:51441 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khJLd-0006o9-8u
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 16:26:09 -0500
Received: from mail-wr1-f43.google.com ([209.85.221.43]:35639)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1khJLb-0006nw-Jb
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 16:26:08 -0500
Received: by mail-wr1-f43.google.com with SMTP id r3so1938609wrt.2
 for <31796 <at> debbugs.gnu.org>; Mon, 23 Nov 2020 13:26:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=KlK1FjEzqF6nGxuXor53OiGWQPqf7q2r8sgEKMbjwrw=;
 b=DmsFf8BOtRR/wA3n3C98UqwQN/JOxcEomVFrzpHPdleLUVtf0rHUu/tePw9cbRFDGN
 Z9gXERNyq9PEtvQy1dLgaOGQphhGZawp4vGrhAmAHM/9omP60s4SBVMtf1twQRyFfh4G
 iIVGM+fP+XdqLZ1mUAvLP8ysoN86MRsp8KZSFeuv38mUhv2BKReAwpMU2Q47+OUS1qXE
 5uHBteQqPUe/2y/quFRGXu6/UMzgRH1W24HxqYAlWkB4jGBqp2jX3FnmPsscu/syyeMH
 DIqKAWKsbF1LDaIyBPXMwJYu2vYqBA9g8MKH+mfL+IfQskZj1Hh6RnTeCF6Rmvri6DUR
 G0Fw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=KlK1FjEzqF6nGxuXor53OiGWQPqf7q2r8sgEKMbjwrw=;
 b=UES/VBDjm46hAMX4CVuMlcjhrL6ei0OXaC+ECngf/BLo3dbBhUK7TAZFH2Qg+tGNCX
 ofOUcfyzn6jRI3AQkc+R2vf9e7sHcJKqsjFC9OniayZCi9FGXS9Da2yTjFHeVvCSux/q
 NzhnRWYlbp2php3ezsDEyTZASn8RKd+tLd7CMTSA3PF+m4tHatkNd1aZ35dclgLb3DYl
 YM2Z6Hj+rnl3WNPPuL0BzKbo3THkCtl3lDqCB7fN6O9eiAJNQWKoRW0/UK1a+vnE+He7
 xbT5FqYz9Y/EFiYRFQjPU3c3zMNjBw76SS9llVITYO9vNkCjIm82r+UZqWzS8YkGoHMn
 Oqpw==
X-Gm-Message-State: AOAM533BTQXmxCkCR3BIca5qwcorJ0oaVCDCnBGWSI2B6jitZCXcnyBG
 fLxJuiDXIFm+mg3dFq58vrck0k+may/UnQ==
X-Google-Smtp-Source: ABdhPJyKOhJJzWbtrt+4Wj6iuG0BKKb1UwUKA6m7M3pNpHwSmjxwUL2M9P/6qA9QM3SUGedI8K0Awg==
X-Received: by 2002:adf:ed46:: with SMTP id u6mr1612252wro.287.1606166761740; 
 Mon, 23 Nov 2020 13:26:01 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id a144sm1076298wmd.47.2020.11.23.13.26.00
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 23 Nov 2020 13:26:00 -0800 (PST)
Subject: Re: bug#31796: 26.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Noam Postavsky <npostavs@HIDDEN>, =?UTF-8?Q?=c5=bdygimantas_Bruzgys?=
 <me@HIDDEN>
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <87zi00xq9z.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <4d3df6d0-bc9c-2aa3-c7b1-0d448573c405@HIDDEN>
Date: Mon, 23 Nov 2020 23:25:59 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <87zi00xq9z.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
Cc: 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 12.06.2018 13:17, Noam Postavsky wrote:
> As the docstring of dired-do-find-regexp-and-replace says:
> 
>      REGEXP should use constructs supported by your local ‘grep’ command.
> 
> grep matches single lines, so multiline matching won't work.

*Apparently* 'grep -P -z' can do multiline matches. But I don't know how 
portable that is, and the grep manual calls this combination "experimental".

But if we can, and if we change grep-regexp-alist somehow to support 
\0-delimited results (-P without -z doesn't do multiline), 
xref-matches-in-files could use these flags and get multiline results.

[[:space:]] still wouldn't work, though: it's an Emacs-only extension.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 21:22:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 16:22:11 2020
Received: from localhost ([127.0.0.1]:51422 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khJHn-0006hc-DN
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 16:22:11 -0500
Received: from mail-wr1-f52.google.com ([209.85.221.52]:39945)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1khJHm-0006hR-CC
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 16:22:10 -0500
Received: by mail-wr1-f52.google.com with SMTP id m6so20218314wrg.7
 for <31796 <at> debbugs.gnu.org>; Mon, 23 Nov 2020 13:22:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=0gHi/W//P52aTMBnzguGRPDWavoYZYJVofYE/FcU3nk=;
 b=MKnLfSm9sOTB4NzYwe+GrIJwNlyeCqfaQDxt3gaXeg1O/Ex735AuHcVIbqlJKDzsbY
 3AH+Ezp84womrhilBKF5BZUvb3/GEAsSZpRA+9pbu4FmIgjQFN/xY9Bk9bx+pXpvPKII
 SV+pXsi2OwJfjFdd9zbwA2QbYEsF7cZSPMxDE4/NK98UdXJU5cl6vh8v+rzNHZf8xYJ3
 WVatUxbY5tJY9g7NikUyAGavrQEkCkwGI7pTKOm0PV/1huPGfzInbGiIxwYlUH5vlC9q
 TUO2cJ7dIg6CEeXxep6f2Yibimxwv/tg9PLAdYbsavkiOZD8H32t4G0WBGAbUu3ygAfP
 yqEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=0gHi/W//P52aTMBnzguGRPDWavoYZYJVofYE/FcU3nk=;
 b=bwNeLhFuD6aMxHR8GAaBtcmQW7ZtHDAldCyyyXMvcIfMnZrYujidz/Hiol6t8+HAYp
 W4PLITYdhHq7CAzXKPrR4jmKwzck8fH6WSdrlfXYJ/rcbLRC1LG/lEetTrsjp1Rk9wlV
 V17fRoN9efTPu/QUCK26L3HV4UkANM0CniWHs9U3osJFiF2fvQ3QUAVMaaPTxrTDVrSS
 6EtZih2B1k53HYqC162w0v61CtHhRvuSDQOAsnAX6CCqqnlhYjLkenvBRuNA8WhZhqVn
 +RP5Hlkjy1WcFqBtppV0dperEB/98R6pjXDYSI4Vx8UhevWTZL5xRQ9Ffg+zCVCxSmy0
 /hWg==
X-Gm-Message-State: AOAM533+1OyJkYGZLpHBsEYaDXSFT5k9Gjvg/+jvZIr0jm+TooSOJD0b
 KdGqc5Ll3T673VVVz+Sy6aDlXZzXrsmvgw==
X-Google-Smtp-Source: ABdhPJwFBP3w3qOnUKga4XM/2wlxmmsoKtRjjPIhzjBkv4NR5JrnONAnTX1d6mXGNfpQ3Ve7lySuWw==
X-Received: by 2002:a5d:544e:: with SMTP id w14mr1640236wrv.227.1606166524167; 
 Mon, 23 Nov 2020 13:22:04 -0800 (PST)
Received: from [192.168.0.4] ([66.205.71.3])
 by smtp.googlemail.com with ESMTPSA id t15sm966302wmn.19.2020.11.23.13.22.02
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 23 Nov 2020 13:22:03 -0800 (PST)
Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
To: Drew Adams <drew.adams@HIDDEN>, Andreas Abel <abela@HIDDEN>,
 31796 <at> debbugs.gnu.org
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
 <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <6ce0aec1-ea5f-d8f8-276b-bc3cf1a5421e@HIDDEN>
Date: Mon, 23 Nov 2020 23:22:01 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 31796
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 23.11.2020 18:16, Drew Adams wrote:
> But the inventor
> of `dired-do-find-regexp-and-replace' decided to give
> that binding to his command.

It wasn't me who made this decision.

> (I argued in vain in
> favor of giving the new command a different binding,
> keeping `Q' as it was.  Similarly for `A'.)

...but there would be no reason for me to write it, if that was the 
change proposed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 16:18:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 11:18:49 2020
Received: from localhost ([127.0.0.1]:50838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khEYC-0005Gc-T1
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 11:18:49 -0500
Received: from aserp2120.oracle.com ([141.146.126.78]:45886)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1khEY9-0005GN-St
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 11:18:48 -0500
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1])
 by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0ANGIWJN106158;
 Mon, 23 Nov 2020 16:18:32 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=RkJ1fxcLZpVH0NkczpmG40VZP53ix3lOZmHz8l4Qh/s=;
 b=G/f5+CCl5nGBOjyZSbZFSOwMjh7hPGuFPGss7CbGTb0wrT5b9bwhNinFYpxKPtg32uwk
 qHof/YwxOltCA9PAloXUpMuubxZGCOiJC4MliMom/9uT7NhkqRgReYMF/VKJqmykTbYE
 pcDU19RxgT2U4pAmxmd38JYtUXY7ePIKEaPZ2L0ZOwkyBKNfhyUy5xbU7ZdzRPgSP9ET
 TLtQDaX/WBRCLIKC4V2UvicDvo4xSNnJatZBC4QhZdI99ExT8YALgQRKBAo7nVf3GU4K
 6UX2ck/EcgmMBoG8V+1Emj4a/hofQ77N3o3PWeRc/qhGDSsSFK/K80wILA9uMj2HOaRe ow== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by aserp2120.oracle.com with ESMTP id 34xtukx10b-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Mon, 23 Nov 2020 16:18:32 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0ANGFox8134385;
 Mon, 23 Nov 2020 16:16:31 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by userp3020.oracle.com with ESMTP id 34ycnr4h70-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 23 Nov 2020 16:16:31 +0000
Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0ANGGRbx006066;
 Mon, 23 Nov 2020 16:16:29 GMT
MIME-Version: 1.0
Message-ID: <91c98791-9df2-43ee-9aac-205c5b0de9c2@default>
Date: Mon, 23 Nov 2020 08:16:26 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Andreas Abel <abela@HIDDEN>, 31796 <at> debbugs.gnu.org
Subject: RE: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find
 multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
In-Reply-To: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5071.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9813
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 suspectscore=0
 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 adultscore=0
 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2011230110
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9813
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 lowpriorityscore=0
 malwarescore=0 mlxlogscore=999 impostorscore=0 spamscore=0 mlxscore=0
 phishscore=0 clxscore=1011 suspectscore=0 bulkscore=0 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2011230110
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> The dired-do-find-regexp-and-replace command does not seem
> to parse the regex entered by the user correctly.  If the
> regex string contains a newline character (^Q^J), it seems
> that the parsing stops there.  At least I have seen errors
> like "unmatched bracket" and the like.
>=20
> Anyhow, I did not get it to replace multiline text.
> I found an answer here:
>=20
> https://emacs.stackexchange.com/questions/30437/dired-search-and-replace-=
is-throwing-no-results
>=20
> The solution is to manually invoke
> dired-do-query-replace-regexp (instead of pressing just Q).
>
> However, this solution is hard to discover, because it is
> unexpected that the official regex-replace feature (key Q)
> contains such a blunder.
>=20
> - Why isn't the more robust dired-do-query-replace-regexp
>   bound to Q?

It _was_ bound to `Q' - for decades.  But the inventor
of `dired-do-find-regexp-and-replace' decided to give
that binding to his command.  (I argued in vain in
favor of giving the new command a different binding,
keeping `Q' as it was.  Similarly for `A'.)

> - Why not fix the bug in dired-do-find-regexp-and-replace?
> It has been reported for version 26 already, and it is not
> a minor issue. Replacing interactively in several files is
> an **extremely** useful feature, and I would not want to
> do something like that outside of emacs.

+1.

___

FWIW, Dired+ binds `dired-do-query-replace-regexp'
to `M-q' (respecting the new binding of `Q' to
`dired-do-find-regexp-and-replace', though I
disagree with it).  And Dired+ has both commands
on the menus:

 Multiple > Search >
   Query Replace Using TAGS Table...   M-q
   Query Replace Using `find'...       Q

https://www.emacswiki.org/emacs/DiredPlus




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 15:23:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 10:23:21 2020
Received: from localhost ([127.0.0.1]:50728 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1khDgX-0003oU-AZ
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 10:23:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:35214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1khDgU-0003oG-Ov
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 10:23:19 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45684)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1khDgP-0007u9-6M; Mon, 23 Nov 2020 10:23:13 -0500
Received: from [176.228.60.248] (port=1437 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1khDgO-0005Lm-Gf; Mon, 23 Nov 2020 10:23:12 -0500
Date: Mon, 23 Nov 2020 17:23:07 +0200
Message-Id: <83ft50w10k.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andreas Abel <abela@HIDDEN>
In-Reply-To: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN> (message from
 Andreas Abel on Mon, 23 Nov 2020 10:09:38 +0100)
Subject: Re: bug#31796: 27.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 31796
Cc: 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Andreas Abel <abela@HIDDEN>
> Date: Mon, 23 Nov 2020 10:09:38 +0100
> 
> - Why not fix the bug in dired-do-find-regexp-and-replace?  It has been 
> reported for version 26 already, and it is not a minor issue.

I think we'd love to fix this, but we don't know how.  Patches are
welcome.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 09:09:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 23 04:09:55 2020
Received: from localhost ([127.0.0.1]:48921 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kh7r9-0004EJ-2L
	for submit <at> debbugs.gnu.org; Mon, 23 Nov 2020 04:09:55 -0500
Received: from targaryen.ita.chalmers.se ([129.16.226.133]:18512)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.abel@HIDDEN>) id 1kh7r6-0004Ds-J9
 for 31796 <at> debbugs.gnu.org; Mon, 23 Nov 2020 04:09:53 -0500
Received: from Andreass-MacBook-Pro.local (129.16.10.245) by
 targaryen.ita.chalmers.se (129.16.226.133) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.1.1913.5; Mon, 23 Nov 2020 10:09:45 +0100
To: <31796 <at> debbugs.gnu.org>
From: Andreas Abel <abela@HIDDEN>
Subject: 27.1; dired-do-find-regexp-and-replace fails to find multiline regexps
Message-ID: <10120030-8b8d-b702-add4-8f099f934ed5@HIDDEN>
Date: Mon, 23 Nov 2020 10:09:38 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
 Gecko/20100101 Thunderbird/78.4.3
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Originating-IP: [129.16.10.245]
X-ClientProxiedBy: martell.ita.chalmers.se (129.16.226.134) To
 targaryen.ita.chalmers.se (129.16.226.133)
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 31796
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

The dired-do-find-regexp-and-replace command does not seem to parse the 
regex entered by the user correctly.  If the regex string contains a 
newline character (^Q^J), it seems that the parsing stops there.  At 
least I have seen errors like "unmatched bracket" and the like.

Anyhow, I did not get it to replace multiline text.  I found an answer 
here:

 
https://emacs.stackexchange.com/questions/30437/dired-search-and-replace-is-throwing-no-results

The solution is to manually invoke dired-do-query-replace-regexp 
(instead of pressing just Q).

However, this solution is hard to discover, because it is unexpected 
that the official regex-replace feature (key Q) contains such a blunder.

- Why isn't the more robust

   dired-do-query-replace-regexp

bound to Q?

- Why not fix the bug in dired-do-find-regexp-and-replace?  It has been 
reported for version 26 already, and it is not a minor issue.  Replacing 
interactively in several files is an **extremely** useful feature, and I 
would not want to do something like that outside of emacs.

Thanks for all the good work going into emacs.

Best,
Andreas

P.S.: Your approach to issue tracking (by email) must be considered 
stone-age by now.  How about switching to GitHub / GitLab or the like?

(Unless you want to keep the bar up, of course.  But this is hardly in 
the spirit of open source.)

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

andreas.abel@HIDDEN
http://www.cse.chalmers.se/~abela/




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at 31796 <at> debbugs.gnu.org:


Received: (at 31796) by debbugs.gnu.org; 12 Jun 2018 10:17:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 12 06:17:38 2018
Received: from localhost ([127.0.0.1]:44116 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fSgMs-0006V3-2d
	for submit <at> debbugs.gnu.org; Tue, 12 Jun 2018 06:17:38 -0400
Received: from mail-io0-f174.google.com ([209.85.223.174]:38000)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fSgMp-0006Uq-NU
 for 31796 <at> debbugs.gnu.org; Tue, 12 Jun 2018 06:17:36 -0400
Received: by mail-io0-f174.google.com with SMTP id l19-v6so27389007ioj.5
 for <31796 <at> debbugs.gnu.org>; Tue, 12 Jun 2018 03:17:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=/0TvH8b06ZwuZm/RMjPWKhC4s/ydR5gEcK+I6ty1ZMs=;
 b=veu3qoHomy6NCGmFZ2HB4K41mi9arOj3PcmWiwIvhz3SHm7IHD76RAEp4Lc7R5FhNK
 JADeGUYgCjG4NuRzoo3rzi5jmD3MzG4OdFJdwLr6/e0yNrJXSNBze+DcAvBecI29vWPq
 0GJJkBeZrNNEB3VhfmrjCkSeoEt4AI54ZovjCzGC1kgbrzYT8h5JYruy7gTw1RawMOSY
 Luk5XZljNrFW33iai16G5txFmTtH8BajOa3Jaa9Xqc9sbGiJYWQaYyWekNWvpehK0Bb3
 athKiBrh53BaDbRxg/Mzv/RaHqNWv3yWE6HRV/L/xbS89pm8SrbNF8Lq8aO+pm/O++8N
 pOCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=/0TvH8b06ZwuZm/RMjPWKhC4s/ydR5gEcK+I6ty1ZMs=;
 b=hKOJ4pfHKLooovtN6bsK1x7QwLZE4YMllD6gMgdSQdLm1O4PX1MFdgZOkNRz01J0Be
 9z/vlk7nUuPFwfu0zsWIiF1ph6XXonZHbt7u9mG1igs8EQQ1mee9lly5Rac29Kk8RbP4
 WiIy8r+u3UaI491abEqCl2jPQTsmUb4RF6esn9G8n+B+OBp3rbNOwQ+HOdbqWV1tq4hA
 BaF5uvM829kZI2VBmcnOxcq5eNCLEUbJnaVqxMmE9TacZD86ZkFgeEypLhfb8UGSN9PQ
 S8BAdZJYUunJvAs/rcuDXZe77G5wC93SIBSaoNsP7MyNUtCjYXCwqctYOQnOmTgAC9mg
 jVvA==
X-Gm-Message-State: APt69E3bE1PE5VVEPYrT5xVOheRR2vaHNHjy/Y9OCMzONSXeuHz9eFmS
 klHMHR5FynW4Uav7m2KFeO8KjQ==
X-Google-Smtp-Source: ADUXVKJ19Z0gPLHgYat42gsgeeEyKTePlYpBfKq4NocLvP1QDB5sqbIur3cAJRCpFHgqWFDm4FZiBg==
X-Received: by 2002:a6b:6e0e:: with SMTP id
 d14-v6mr2648050ioh.57.1528798650100; 
 Tue, 12 Jun 2018 03:17:30 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 80-v6sm18758itk.12.2018.06.12.03.17.29
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 12 Jun 2018 03:17:29 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: =?utf-8?Q?=C5=BDygimantas?= Bruzgys <me@HIDDEN>
Subject: Re: bug#31796: 26.1;
 dired-do-find-regexp-and-replace fails to find multiline regexps
References: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
Date: Tue, 12 Jun 2018 06:17:28 -0400
In-Reply-To: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
 (=?utf-8?Q?=22=C5=BDygimantas?= Bruzgys"'s message of "Mon, 11 Jun 2018
 20:58:28 +0200")
Message-ID: <87zi00xq9z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31796
Cc: 31796 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

=C5=BDygimantas Bruzgys <me@HIDDEN> writes:

> 1) Create ~/test with a file with following contents:
> multi
> line
>
> 2) Visit directory using dired: C-f ~/test
> 3) Initiate regexp-replace by hitting Q
> 4) multi[[:space:]]line RET singeline RET
> 5) See that dired regexp replace failed reporting that no results were
> found
> 6) Visit a file you have just created.
> 7) Initiate query-replace-regexp with C-M-%
> 8) Accept the suggested (previous) query-replace by hitting RET
> 9) See that the query is actually correct and finds the result.

As the docstring of dired-do-find-regexp-and-replace says:

    REGEXP should use constructs supported by your local =E2=80=98grep=E2=
=80=99 command.

grep matches single lines, so multiline matching won't work.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jun 2018 07:55:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 12 03:55:47 2018
Received: from localhost ([127.0.0.1]:44001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fSe9a-0000lh-Sn
	for submit <at> debbugs.gnu.org; Tue, 12 Jun 2018 03:55:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57760)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bounce+8aba66.030442-bug-gnu-emacs=gnu.org@HIDDEN>)
 id 1fSS1w-0002Bt-R9
 for submit <at> debbugs.gnu.org; Mon, 11 Jun 2018 14:59:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bounce+8aba66.030442-bug-gnu-emacs=gnu.org@HIDDEN>)
 id 1fSS1q-00017v-30
 for submit <at> debbugs.gnu.org; Mon, 11 Jun 2018 14:58:59 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47348)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71)
 (envelope-from <bounce+8aba66.030442-bug-gnu-emacs=gnu.org@HIDDEN>)
 id 1fSS1p-00017n-V0
 for submit <at> debbugs.gnu.org; Mon, 11 Jun 2018 14:58:57 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48700)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bounce+8aba66.030442-bug-gnu-emacs=gnu.org@HIDDEN>)
 id 1fSS1o-0006k2-2Z
 for bug-gnu-emacs@HIDDEN; Mon, 11 Jun 2018 14:58:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bounce+8aba66.030442-bug-gnu-emacs=gnu.org@HIDDEN>)
 id 1fSS1k-00014U-Sr
 for bug-gnu-emacs@HIDDEN; Mon, 11 Jun 2018 14:58:56 -0400
Received: from mail-s66.mailgun.info ([184.173.153.194]:39578)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71)
 (envelope-from <bounce+8aba66.030442-bug-gnu-emacs=gnu.org@HIDDEN>)
 id 1fSS1k-000144-MR
 for bug-gnu-emacs@HIDDEN; Mon, 11 Jun 2018 14:58:52 -0400
DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=zygi.xyz; q=dns/txt;
 s=mailo; 
 t=1528743531; h=Content-Type: To: Subject: Message-ID: Date: From:
 MIME-Version: Sender; bh=Sa3aHhqFJsJIGnYR/AS84Kw5KhjbGOS3pPkBQytTdYg=;
 b=X932yvp1ZGibXX3ostmZL8mpC+mylQIqMS5slajFWSr0Jz9HNQwDghgDPfkF18zP4wVN2nVS
 qkAplXX9j6OT+6HkIY6B+pNb6NqzY4enDfihk57QjALv3J9t+es+YiGyiQCU1sD14qcG9UFP
 TQCst+A/MG3wYVhZDtLv3jxI3JE=
X-Mailgun-Sending-Ip: 184.173.153.194
X-Mailgun-Sid: WyI1MGY1OSIsICJidWctZ251LWVtYWNzQGdudS5vcmciLCAiMDMwNDQyIl0=
Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43])
 by mxa.mailgun.org with ESMTP id 5b1ec66a.7fd21763ba70-smtp-out-n01;
 Mon, 11 Jun 2018 18:58:50 -0000 (UTC)
Received: by mail-wm0-f43.google.com with SMTP id o13-v6so16416727wmf.4
 for <bug-gnu-emacs@HIDDEN>; Mon, 11 Jun 2018 11:58:50 -0700 (PDT)
X-Gm-Message-State: APt69E0vpKtpRvCXPazxOeLveHXTjV96352Y0dyWomvr/IJnM3Mo8kK/
 kZgIlQf/NeYO/QtU9eiDewu4V/wP79EbWvfoizE=
X-Google-Smtp-Source: ADUXVKKsrKyJm8QvR6KW0FHvNzjlNEcjnRIBQEuD5QLOwY1PxCTKS6EU9NUz22ssFP32PJCICFq5FLPRAN9AQUdX0BY=
X-Received: by 2002:a1c:c3c6:: with SMTP id
 t189-v6mr121513wmf.41.1528743528788; 
 Mon, 11 Jun 2018 11:58:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a1c:3cc6:0:0:0:0:0 with HTTP; Mon, 11 Jun 2018 11:58:28
 -0700 (PDT)
From: =?UTF-8?Q?=C5=BDygimantas_Bruzgys?= <me@HIDDEN>
Date: Mon, 11 Jun 2018 20:58:28 +0200
X-Gmail-Original-Message-ID: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
Message-ID: <CADy8Bt=f=LOE6ODLhhW7ZS6qXRQCzd15Hd0eFKVO8qok98ni8w@HIDDEN>
Subject: 26.1; dired-do-find-regexp-and-replace fails to find multiline regexps
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000fc7a6b056e62568d"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 12 Jun 2018 03:55:45 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--000000000000fc7a6b056e62568d
Content-Type: text/plain; charset="UTF-8"

1) Create ~/test with a file with following contents:
multi
line

2) Visit directory using dired: C-f ~/test
3) Initiate regexp-replace by hitting Q
4) multi[[:space:]]line RET singeline RET
5) See that dired regexp replace failed reporting that no results were
found
6) Visit a file you have just created.
7) Initiate query-replace-regexp with C-M-%
8) Accept the suggested (previous) query-replace by hitting RET
9) See that the query is actually correct and finds the result.


In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12000000
Recent messages:
user-error: No matches for: multi[[:space:]]line
Mark set
Replaced 1 occurrence

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LC_COLLATE: de_CH.UTF-8
  value of $LC_MONETARY: de_CH.UTF-8
  value of $LC_NUMERIC: de_CH.UTF-8
  value of $LC_TIME: lt_LT.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq format-spec rfc822
mml mml-sec password-cache epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils cl-extra help-mode easymenu find-dired
semantic/fw mode-local find-func xref cl-seq project eieio byte-opt
bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs grep
compile comint ansi-color ring thingatpt dired-aux cl-loaddefs cl-lib
dired dired-loaddefs elec-pair leuven-theme time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 123229 14374)
 (symbols 48 22491 4)
 (miscs 40 103 176)
 (strings 32 34463 1497)
 (string-bytes 1 948663)
 (vectors 16 16681)
 (vector-slots 8 526030 13780)
 (floats 8 78 135)
 (intervals 56 300 0)
 (buffers 992 14))

--000000000000fc7a6b056e62568d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">1) Create ~/test with a file with following contents:<br>m=
ulti<br>line<br><br>2) Visit directory using dired: C-f ~/test<br>3) Initia=
te regexp-replace by hitting Q<br>4) multi[[:space:]]line RET singeline RET=
<br>5) See that dired regexp replace failed reporting that no results were<=
br>found<br>6) Visit a file you have just created.<br>7) Initiate query-rep=
lace-regexp with C-M-%<br>8) Accept the suggested (previous) query-replace =
by hitting RET<br>9) See that the query is actually correct and finds the r=
esult.<br><br><br>In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Ver=
sion 3.22.30)<br>=C2=A0of 2018-05-29 built on juergen<br>Windowing system d=
istributor &#39;The X.Org Foundation&#39;, version 11.0.12000000<br>Recent =
messages:<br>user-error: No matches for: multi[[:space:]]line<br>Mark set<b=
r>Replaced 1 occurrence<br><br>Configured using:<br>=C2=A0&#39;configure --=
prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib<br>=C2=A0--locals=
tatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-modules<br>=C2=A0&=
#39;CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protector-s=
trong<br>=C2=A0-fno-plt&#39; CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2<br>=C2=A0LDFL=
AGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now&#39;<br><br>Configu=
red features:<br>XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSET=
TINGS NOTIFY<br>ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKI=
T_SCROLL_BARS<br>GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2<br><br>Important=
 settings:<br>=C2=A0 value of $LC_COLLATE: de_CH.UTF-8<br>=C2=A0 value of $=
LC_MONETARY: de_CH.UTF-8<br>=C2=A0 value of $LC_NUMERIC: de_CH.UTF-8<br>=C2=
=A0 value of $LC_TIME: lt_LT.UTF-8<br>=C2=A0 value of $LANG: en_US.UTF-8<br=
>=C2=A0 locale-coding-system: utf-8-unix<br><br>Major mode: Dired by name<b=
r><br>Minor modes in effect:<br>=C2=A0 tooltip-mode: t<br>=C2=A0 global-eld=
oc-mode: t<br>=C2=A0 electric-indent-mode: t<br>=C2=A0 mouse-wheel-mode: t<=
br>=C2=A0 tool-bar-mode: t<br>=C2=A0 menu-bar-mode: t<br>=C2=A0 file-name-s=
hadow-mode: t<br>=C2=A0 global-font-lock-mode: t<br>=C2=A0 font-lock-mode: =
t<br>=C2=A0 blink-cursor-mode: t<br>=C2=A0 auto-composition-mode: t<br>=C2=
=A0 auto-encryption-mode: t<br>=C2=A0 auto-compression-mode: t<br>=C2=A0 bu=
ffer-read-only: t<br>=C2=A0 column-number-mode: t<br>=C2=A0 line-number-mod=
e: t<br>=C2=A0 transient-mark-mode: t<br><br>Load-path shadows:<br>None fou=
nd.<br><br>Features:<br>(shadow sort mail-extr emacsbug message rmc puny se=
q format-spec rfc822<br>mml mml-sec password-cache epa derived epg epg-conf=
ig gnus-util rmail<br>rmail-loaddefs mm-decode mm-bodies mm-encode mail-par=
se rfc2231<br>mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf=
-drums<br>mm-util mail-prsvr mail-utils cl-extra help-mode easymenu find-di=
red<br>semantic/fw mode-local find-func xref cl-seq project eieio byte-opt<=
br>bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs grep<br=
>compile comint ansi-color ring thingatpt dired-aux cl-loaddefs cl-lib<br>d=
ired dired-loaddefs elec-pair leuven-theme time-date mule-util tooltip<br>e=
ldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel<br>term/x=
-win x-win term/common-win x-dnd tool-bar dnd fontset image<br>regexp-opt f=
ringe tabulated-list replace newcomment text-mode elisp-mode<br>lisp-mode p=
rog-mode register page menu-bar rfn-eshadow isearch timer<br>select scroll-=
bar mouse jit-lock font-lock syntax facemenu font-core<br>term/tty-colors f=
rame cl-generic cham georgian utf-8-lang misc-lang<br>vietnamese tibetan th=
ai tai-viet lao korean japanese eucjp-ms cp51932<br>hebrew greek romanian s=
lovak czech european ethiopic indian cyrillic<br>chinese composite charscri=
pt charprop case-table epa-hook jka-cmpr-hook<br>help simple abbrev obarray=
 minibuffer cl-preloaded nadvice loaddefs<br>button faces cus-face macroexp=
 files text-properties overlay sha1 md5<br>base64 format env code-pages mul=
e custom widget hashtable-print-readable<br>backquote dbusbind inotify lcms=
2 dynamic-setting system-font-setting<br>font-render-setting move-toolbar g=
tk x-toolkit x multi-tty<br>make-network-process emacs)<br><br>Memory infor=
mation:<br>((conses 16 123229 14374)<br>=C2=A0(symbols 48 22491 4)<br>=C2=
=A0(miscs 40 103 176)<br>=C2=A0(strings 32 34463 1497)<br>=C2=A0(string-byt=
es 1 948663)<br>=C2=A0(vectors 16 16681)<br>=C2=A0(vector-slots 8 526030 13=
780)<br>=C2=A0(floats 8 78 135)<br>=C2=A0(intervals 56 300 0)<br>=C2=A0(buf=
fers 992 14))<br><br></div>

--000000000000fc7a6b056e62568d--




Acknowledgement sent to Žygimantas Bruzgys <me@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#31796; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 6 Dec 2020 21:30:02 UTC

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