GNU logs - #27896, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 01 Aug 2017 04:18:02 +0000
Resent-Message-ID: <handler.27896.B.150156105629555 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 27896 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.150156105629555
          (code B ref -1); Tue, 01 Aug 2017 04:18:02 +0000
Received: (at submit) by debbugs.gnu.org; 1 Aug 2017 04:17:36 +0000
Received: from localhost ([127.0.0.1]:35975 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dcOch-0007gc-Le
	for submit <at> debbugs.gnu.org; Tue, 01 Aug 2017 00:17:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42074)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1dcOcf-0007gN-Fi
 for submit <at> debbugs.gnu.org; Tue, 01 Aug 2017 00:17:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1dcOcZ-0001eo-7W
 for submit <at> debbugs.gnu.org; Tue, 01 Aug 2017 00:17:28 -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 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:34590)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <drew.adams@HIDDEN>)
 id 1dcOcZ-0001ek-3x
 for submit <at> debbugs.gnu.org; Tue, 01 Aug 2017 00:17:27 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33039)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1dcOcX-00077d-VD
 for bug-gnu-emacs@HIDDEN; Tue, 01 Aug 2017 00:17:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1dcOcT-0001di-UC
 for bug-gnu-emacs@HIDDEN; Tue, 01 Aug 2017 00:17:25 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:44452)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <drew.adams@HIDDEN>)
 id 1dcOcT-0001cG-Jx
 for bug-gnu-emacs@HIDDEN; Tue, 01 Aug 2017 00:17:21 -0400
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 v714HHNo015012
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Tue, 1 Aug 2017 04:17:18 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v714HHdt015736
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Tue, 1 Aug 2017 04:17:17 GMT
Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v714HGfJ022705
 for <bug-gnu-emacs@HIDDEN>; Tue, 1 Aug 2017 04:17:17 GMT
MIME-Version: 1.0
Message-ID: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
Date: Mon, 31 Jul 2017 21:17:15 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6770.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.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: -5.0 (-----)
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 (-----)

emacs -Q

In *scratch*:

1. Duplicate the two lines of text, to get this:

;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.

2. Activate the region from before the `T' in the first `This' to after
   the `f' in the second `file', with point before the `T'.  Then `M-x
   rectangle-mark-mode'.

3. `C-M-%' and type `e.*t' for the regexp and `AA' for the replacement
   text.

I was expecting both occurrences of "eat" (inside "create") to be
candidates for replacement, since they are both within the rectangle and
they both match the regexp - but only the second occurrence is a
candidate for replacement.

(If you use regexp `e.t' instead, there is no such error.)

It seems that what is happening is that the regexp is being checked
against the full region, i.e., before the region is limited to the
rectangular portion.

Is that the design?  I think a user would expect the rectangle to define
the region of possible query-replacing, not just define a clipping area
from the full region of searching.  IOW, I think a user would expect the
rectangular limits to be established first, and then searching to be
limited to that rectangular space.

If nothing else, if this is the intended design then I think the doc
should be clear about it.  It should say, in that case, that matches are
sought throughout the full, non-rectangular region, and only those
matches that are wholly (?) within the rectangle are then retained as
possible matches.

My guess of what's happening is supported by this: If you do the same
thing (same region) but without using `rectangle-mark-mode' then you see
that rectangle mark mode just retains the matches for the normal,
non-rectangular region, that are wholly within the rectangle.

Here are the matches for the normal, non-rectangular region:

;; This buffer is for text that is not saved, and for Lisp evaluation.
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;; To create a file, visit it with C-x C-f and enter text in its buffer.
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;; This buffer is for text that is not saved, and for Lisp evaluation.
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;; To create a file, visit it with C-x C-f and enter text in its buffer.
        ^^^

This should be documented, as it is not, I think, what someone expects
by searching a rectangular region (a region delimited by a rectangle).
I think someone would expect that the search domain is limited by the
rectangle, and then query-replace applies to matches within that domain.

That's very different from the current behavior, which is to leave the
search domain as the full region (undelimited by the rectangle) and then
filter out (remove) any matches from that that are not wholly within the
rectangle.



In GNU Emacs 25.2.1 (x86_64-w64-mingw32)
 of 2017-04-24 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --without-dbus --without-compress-install 'CFLAGS=3D-O2
 -static -g3''




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Drew Adams <drew.adams@HIDDEN>
Subject: bug#27896: Acknowledgement (25.2; `C-M-%' with `rectangle-mark-mode')
Message-ID: <handler.27896.B.150156105629555.ack <at> debbugs.gnu.org>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
X-Gnu-PR-Message: ack 27896
X-Gnu-PR-Package: emacs
Reply-To: 27896 <at> debbugs.gnu.org
Date: Tue, 01 Aug 2017 04:18:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 27896 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
27896: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27896
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 02 Aug 2017 22:23:02 +0000
Resent-Message-ID: <handler.27896.B27896.150171255719232 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 27896 <at> debbugs.gnu.org
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.150171255719232
          (code B ref 27896); Wed, 02 Aug 2017 22:23:02 +0000
Received: (at 27896) by debbugs.gnu.org; 2 Aug 2017 22:22:37 +0000
Received: from localhost ([127.0.0.1]:39020 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dd22H-000508-0y
	for submit <at> debbugs.gnu.org; Wed, 02 Aug 2017 18:22:37 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:35355)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1dd22E-0004zu-WC
 for 27896 <at> debbugs.gnu.org; Wed, 02 Aug 2017 18:22:35 -0400
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 v72MMSXG029556
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <27896 <at> debbugs.gnu.org>; Wed, 2 Aug 2017 22:22:29 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v72MMSeh013377
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <27896 <at> debbugs.gnu.org>; Wed, 2 Aug 2017 22:22:28 GMT
Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v72MMR0W028416
 for <27896 <at> debbugs.gnu.org>; Wed, 2 Aug 2017 22:22:28 GMT
MIME-Version: 1.0
Message-ID: <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
Date: Wed, 2 Aug 2017 15:22:26 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
In-Reply-To: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6770.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0021.oracle.com [156.151.31.71]
X-Spam-Score: -5.1 (-----)
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.1 (-----)

Clearly the current design of using a rectangular region to
limit replacing does not limit search for the replacement
commands in the same sense that the (normal) region limits
search.

The (normal) region limits the text that replacement search
tries to match, by bounding it.  The rectangular region keeps
the ordinary region as the domain of text that search tries
to match, and it filters the matches against that domain to
remove any matches that are not wholly within the limits of
the rectangle.

That's the design, and it's OK.  But it is misleading in
that we don't distinguish the two "region" behaviors.  It is
all too easy to expect that the rectangular region bounds
search in the same way that the ordinary region does.

To provide a different design, where the rectangular region
really limits the domain of text that we try to search,
would require some work.  It's OK that we stick to what we
have, at least for now, since it is anyway useful.

But I do think that users should be told what to expect (e.g.,
wrt regexp searching, in particular).  Currently there seems
to be NO doc about replacement over the rectangular region.

The code for this feature seems to have been added without
also providing doc and, as bug #27897 points out, it was
apparently only half-added.  Arg REGION-NONCONTIGUOUS-P
should also be added to other replacement commands, such as
`replace-string', `replace-regexp', `query-replace-regexp-eval',
and `map-query-replace-regexp'.  They too can benefit from
the new feature, and adding support for it is trivial (add
the optional arg and pass it to `perform-replace').

Please consider this bug report (#27896) to be a request
to add doc (in the Emacs manual) about replacing text over
a rectangular region.  That doc would be a good place to
point out that the rectangle limits do not limit the area
where searching is tried; they just provide post-matching
filtering to remove any matches that are not (wholly)
within the rectangle.

I think it's important to make this clear to users.  This
info should perhaps also be added to the doc strings of
the relevant commands.  (That's especially true if you
decide not to document this feature in the Emacs manual.)

> I think a user would expect the rectangle to define
> the region of possible query-replacing, not just define a clipping area
> from the full region of searching.  IOW, I think a user would expect the
> rectangular limits to be established first, and then searching to be
> limited to that rectangular space.
>=20
> If nothing else, if this is the intended design then I think the doc
> should be clear about it.  It should say, in that case, that matches are
> sought throughout the full, non-rectangular region, and only those
> matches that are wholly (?) within the rectangle are then retained as
> possible matches.
>=20
> My guess of what's happening is supported by this: If you do the same
> thing (same region) but without using `rectangle-mark-mode' then you see
> that rectangle mark mode just retains the matches for the normal,
> non-rectangular region, that are wholly within the rectangle.
>=20
> Here are the matches for the normal, non-rectangular region:
>=20
> ;; This buffer is for text that is not saved, and for Lisp evaluation.
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ;; To create a file, visit it with C-x C-f and enter text in its buffer.
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ;; This buffer is for text that is not saved, and for Lisp evaluation.
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ;; To create a file, visit it with C-x C-f and enter text in its buffer.
>         ^^^
>=20
> This should be documented, as it is not, I think, what someone expects
> by searching a rectangular region (a region delimited by a rectangle).
> I think someone would expect that the search domain is limited by the
> rectangle, and then query-replace applies to matches within that domain.
>=20
> That's very different from the current behavior, which is to leave the
> search domain as the full region (undelimited by the rectangle) and then
> filter out (remove) any matches from that that are not wholly within the
> rectangle.
>=20
>=20
>=20
> In GNU Emacs 25.2.1 (x86_64-w64-mingw32)
>  of 2017-04-24 built on LAPHROAIG
> Windowing system distributor 'Microsoft Corp.', version 6.1.7601
> Configured using:
>  'configure --without-dbus --without-compress-install 'CFLAGS=3D-O2
>  -static -g3''
>=20
>=20
>=20




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 05 Feb 2021 11:59:01 +0000
Resent-Message-ID: <handler.27896.B27896.161252632722319 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: 27896 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161252632722319
          (code B ref 27896); Fri, 05 Feb 2021 11:59:01 +0000
Received: (at 27896) by debbugs.gnu.org; 5 Feb 2021 11:58:47 +0000
Received: from localhost ([127.0.0.1]:43004 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l7zl9-0005nv-Cc
	for submit <at> debbugs.gnu.org; Fri, 05 Feb 2021 06:58:47 -0500
Received: from quimby.gnus.org ([95.216.78.240]:40440)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1l7zl7-0005nh-A7
 for 27896 <at> debbugs.gnu.org; Fri, 05 Feb 2021 06:58:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=rBJJYlcaglJSSZN//0Lekm2P4igrVF2ivOCOIEj9la8=; b=HVP1W95FeZaMlNg9s3O0b/+yxV
 hDaVO6WJZsf9Lkl3UG6h3qKwTdM5rD6VwNNTrypMqmw8mgJrzTSScDM31JbhT3Dt7fFvgf7wcR/p8
 IEbvLPlvLHgJ5QYAruS5znOWYPGklOTwIjIAMHSWdADCh1LgoraOkkc4rdN01TfZvdN4=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1l7zkw-00029y-Sr; Fri, 05 Feb 2021 12:58:38 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
X-Now-Playing: Mia Doi Todd's _Songbook_: "Pancho & Lefty"
Date: Fri, 05 Feb 2021 12:58:33 +0100
In-Reply-To: <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default> (Drew Adams's
 message of "Wed, 2 Aug 2017 15:22:26 -0700 (PDT)")
Message-ID: <87pn1eiv4m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Drew Adams <drew.adams@HIDDEN> writes: > The (normal)
 region limits the text that replacement search > tries to match, by bounding
 it. The rectangular region keeps > the ordinary region as the domain of text
 that search tries > to match, a [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
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 (-)

Drew Adams <drew.adams@HIDDEN> writes:

> The (normal) region limits the text that replacement search
> tries to match, by bounding it.  The rectangular region keeps
> the ordinary region as the domain of text that search tries
> to match, and it filters the matches against that domain to
> remove any matches that are not wholly within the limits of
> the rectangle.

Yup.  It's a pretty odd design decision, though -- I wonder whether it
this happened on purpose or whether that was just the simplest way to
implement this.

I've added Juri to the CCs; perhaps he can clarify.

(The problem is that if you ask to replace "foo.*bar", and you have

foo bar bar

then `query-replace' will match the entire line, and then filter out
that match (given that we have a rectangular region that covers just
"foo bar") and not replace anything.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 05 Feb 2021 16:20:02 +0000
Resent-Message-ID: <handler.27896.B27896.161254196023939 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Juri Linkov <juri@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161254196023939
          (code B ref 27896); Fri, 05 Feb 2021 16:20:02 +0000
Received: (at 27896) by debbugs.gnu.org; 5 Feb 2021 16:19:20 +0000
Received: from localhost ([127.0.0.1]:44569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l83pH-0006E3-OK
	for submit <at> debbugs.gnu.org; Fri, 05 Feb 2021 11:19:20 -0500
Received: from userp2120.oracle.com ([156.151.31.85]:35978)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1l83pE-0006Do-Uz
 for 27896 <at> debbugs.gnu.org; Fri, 05 Feb 2021 11:19:18 -0500
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 115GFj9G057328;
 Fri, 5 Feb 2021 16:19:10 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2020-01-29;
 bh=MwazYiHXlz9rAsT6A5tWBF6X0K6IvUYa850cwCFNnxo=;
 b=tY2t0xsUbPo0mSfc3QWYqb6lWK9AtHpjQtRv2TAeN6fRMo08cne9US0HzhL3aYkgLEPU
 8aV1vnmvFsqugecKnmO5kkiJxdS2CdKyE3IMjqqLAVMUbnKjrr5yZ1U+h89vVhA2F20N
 FwaYkr2Z+g20JdHiXZNfSi/zuziku5afBl7HblYYYnU82NGVslqRic0/mfvGSKeynryq
 wLWiYgpMGqKahyqK2ad+IPSGyIcJP+CwH1iuYtq+AQyMdWskH96VqnkOlu6q0zO9q910
 kw+IUPNFdAcxOQg/rHD3fjOb4SreqSbOTK75mq6Wafr1twttWPlDJKLwvtLWsHOCLfju Rw== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by userp2120.oracle.com with ESMTP id 36gfw8tccq-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 05 Feb 2021 16:19:09 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 115GFAFW041217;
 Fri, 5 Feb 2021 16:19:09 GMT
Received: from nam10-mw2-obe.outbound.protection.outlook.com
 (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108])
 by aserp3020.oracle.com with ESMTP id 36dhc4cd25-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 05 Feb 2021 16:19:08 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=A0LeBcs5aKbePMvhSrgiRh9TKDSt+x5lseH8u83GF+AS2cuhrWl1RC8V3olUP/U/pbPJRUF+zY5Cm8mWVOagiY33NyBKcer4+PkF4780qyBcPi1Hq6wNo7xHGrAOPuGLgwBIYI8WLHhr4bB+cPr0MQBDpVLId6XFkcD3t0BH7wraH6Absr7eAPwv3ELHP2ngQ0oP52wWZZBnJr6kHcmDLrewCW4Apo5L1LCbstljyfr39nYB0ohI/b5gbfWJhvcLYfSQKE4CS7omOJlqVwar+Ss2m/iMYakcdU9wIEtc442gjsCV8FME/xAARp8bLTEw+oi45+ZLD4r1cdSc7mKCmQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=MwazYiHXlz9rAsT6A5tWBF6X0K6IvUYa850cwCFNnxo=;
 b=fKucd+Cx3wAOj/w0fkHlgVMHdmSQHMpiqbymmqncDE2nB0+KVti48ZoemL08RcYXuv31QpuGBvG1mNDMgmOVtWntS7PROCWStuDntZKIDThjJKEHgs5TAnszKGxL+eGAEdopPry5XWWc3W+QnHUnMdv64++xut2A3BdYgqpUMH7OE0Oi+5bhGsBGjbappaLVs8CIBIlzXMC+zK4jMzTtm2UwrIrAwY7JpeFS8CKpI6AfmP1GaGMCVANYVHvEC6emOXkRn53BwAFaX0SWWTsfsYYTb/bRt11+0q0q+WNTAu0aTAQIPMNH9rMcZpbSrmW1a2LdA9Qxl5203O8Ah/f3vg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=MwazYiHXlz9rAsT6A5tWBF6X0K6IvUYa850cwCFNnxo=;
 b=D7w3jwsgLkcBF8nIAwA81Y4H/3EE4qoYqHXZt8qZExwEKerlDMC/4cDdGx6D3xC0AOiSJ5iaPK6yIk++bCRfEEucAlNNSiHyUpfPSKwA5cSs7Hvv4Jf/euND7n9gQKbV5MAwz9KMnYaxsjf/fIDGAvgTFsLvNmb6Fr4xPAMag3c=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SN6PR10MB3005.namprd10.prod.outlook.com (2603:10b6:805:cc::29)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.17; Fri, 5 Feb
 2021 16:19:06 +0000
Received: from SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::dc4d:9cd0:2010:daa2]) by SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::dc4d:9cd0:2010:daa2%7]) with mapi id 15.20.3825.024; Fri, 5 Feb 2021
 16:19:06 +0000
From: Drew Adams <drew.adams@HIDDEN>
Thread-Topic: [External] : Re: bug#27896: 25.2; `C-M-%' with
 `rectangle-mark-mode'
Thread-Index: AQHW+7ZDPOF1Jhpkz0WI2q7xPv6jNqpJsNLA
Date: Fri, 5 Feb 2021 16:19:06 +0000
Message-ID: <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default> <87pn1eiv4m.fsf@HIDDEN>
In-Reply-To: <87pn1eiv4m.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: gnus.org; dkim=none (message not signed)
 header.d=none;gnus.org; dmarc=none action=none header.from=oracle.com;
x-originating-ip: [73.170.83.28]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: af89d3d8-f296-4619-cdac-08d8c9f1c2b2
x-ms-traffictypediagnostic: SN6PR10MB3005:
x-microsoft-antispam-prvs: <SN6PR10MB300534CD7687D6830FFE8E50F3B29@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Q0bsah6jFDMwSNdhmbXLDIqMWsq2m0ftaYZ4bvFsAom5PCpXiQVSIUrsu7UQj2D4ni49wN+ntVEP43SEgbFCc2d+WPMKof2qUSxDysBNWZEp/aUAB4wdd9MV1umW/Pw4WG/mbuQkAMxbdPEJTLUZ+Mjmb97xYVMKtP2+iIPqKg7gEhPFIR2tOeOla4D5tNCSI3ggYX83SOibTJ4qUp2HUhCFeja2jZPlYbAyYNhEat7wZo66vqc+9Nb2pG580rz/WvizMbaJAJj+LLxdClJ0r48KYbubLf7MoxRwokyaAfTeYGeA6wgn2SXZwU55BtLWc60K/Aet3JdIK4610KPkkZPZWWT/siwlCop2czVVbGuzNWD+f65IZVUc2pPe7WkpME83ETFN9BN4y+TM30id8u4nQ7Sn6iqsS5EdTvinCCYNRLkMt97YD3ol5hfzARY+88t8kuN6dle0dO45SQJhOj5Sd0bl08uhxa0NM7OZXAuIABXAwO4Sh1/IIlgIWBxYI8Qp9VSufFWJ7OGPRLELYI7//Tj4TmcWLjLoNBaaGARhEDA1UfU3CZ9FgLaG7l0W
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(396003)(376002)(346002)(136003)(366004)(39860400002)(76116006)(66556008)(6916009)(6506007)(26005)(64756008)(66946007)(8936002)(2906002)(4326008)(83380400001)(66446008)(55016002)(186003)(8676002)(316002)(9686003)(44832011)(52536014)(5660300002)(86362001)(54906003)(33656002)(478600001)(71200400001)(7696005)(66476007)(81973001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: 9ihJQ4l/aWO916k++lOBzG9laMLUGL0bmzNpFoYfK8vzvPBxzaFPrbQUwlYJf9XOMGF/xr2a3715oytqtIUW4fs1P8MjSJmucS2qPtJoSsqKYGqfB6lcAp/ZGlY7iMezvWYjCDFiu3BJqmp2z0T/u9TSifzPso/poNzoTqUYBgKwNkcjqp5GcFQGBSNPWcC+bueYaMCIPdAR5K6K5j+nnDK18L/cV2Q/2YfzpJnN4lsCNAnbGO72340TetN6ez8pFHod1HkHQqfFiPzG3Ynww9aAzl9d+ynOOomvcV52T67XyGzEhoo5JGKVDFCewZMbGdsrOdAIeJzWQ2Trwn4+rDgnoKjJQjLXGNHUoca6Ul/hpEW1JmKUm7oiNQ9wO3aTXtdYV8WvBINdetaljaTfB4F+Sey3Lk1f+U/c2HTPQYNTb1avBADxgC/e7fVp48sARKwtE9nEIJZmgQmP7VMo3kBSb8RKcTGVeKDDMWPVLGXqd6F7WH+AfwDjI8qQ17Y7Lpe+M2G3zDkEAZhSX+3DfWfEH3SVimJa6TVNwdiQNA5mxhntRS9Ps5ZthbTxBUoZ1Z3GYrysFyqfF5IZbK7KCGCjbGk3I9bBh9wkYdzdE/Y78lh2r2wBXd9drTvFFJGntjBnhM4+wrZ4xlTuB0uvh9KiG4c32muvCiPcfIwKTcZKfCfHw1IXL9XbMAf+jtLOjvuZNjpN/0XEU9Xm5rleAeg27FEQQUsFwPg6okZm120P+rp1sgkuq7D+zAuWQe9bRB7Lc3p7yDmXK2rpI2RlsOhGjuEKqp9aDgNPwjgZd5ECJjung1dxXv2lGSzMiKTY1NdEroxdipNTEuwLjob7lhLT/jv/en9pNV0eNefSkbZQmZK3eVatahCDRfM9fhNs0b4R6dlmCEEHxdJlCri0s5QZzTQjayxR+k9qXVQyO+Sl6/uc3ckz2fGx0nxO0eZ4r7wFsd9THI89RW/pViknQudYXWLAYG1sqcy0Wri3IaowofAw2DUksFqgm7DwRrbbAbexXXVx0ssfOA1+zBXw7HGQH+i2iol4hRUR4eZ4gBW5Ywx58nDWW4ZZP8UYpcoEvX7VhWJx05ZuZKF0iumcGF2SqJz6aOyCd9QaRenw8tnJLrt2D23PSDxiHwolofL/DMT5GjLC20/DpHQ52//w7HOJknuc4zqNcEe0V8isBCgPO69Vwf/fNxjlX77iPG2606oAfPfUtaHlvGiNBivS1TR1qmiUMd5j4987LaLjgv1YBvH94ZqAAMMDg4dFnjl4d3mPedYsfJlAgqvHlbDrfq9zKwXz+UMl0fGdhYuP82QnjLFLYhYztbDknZAp+WzF
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: af89d3d8-f296-4619-cdac-08d8c9f1c2b2
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2021 16:19:06.3356 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: FB6UcoT2oznqvAxlfFiYnAX8hRbchLkBth41ZO55FZQS+YP+NMEwKsCF1yw8CSwXMC4mPtmjq/ROIW0k7e4u4w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB3005
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9885
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0
 adultscore=0 suspectscore=0
 spamscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 phishscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2102050105
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9885
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 spamscore=0 bulkscore=0
 impostorscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 malwarescore=0
 suspectscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2102050105
X-Spam-Score: -2.3 (--)
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 (---)

Thanks for looking at this feature request.

> > The (normal) region limits the text that replacement search
> > tries to match, by bounding it.  The rectangular region keeps
> > the ordinary region as the domain of text that search tries
> > to match, and it filters the matches against that domain to
> > remove any matches that are not wholly within the limits of
> > the rectangle.
>=20
> Yup.  It's a pretty odd design decision, though --
> I wonder whether it this happened on purpose or
> whether that was just the simplest way to implement this.

I'm pretty sure it was done this way just because
that's much simpler to do.  Filtering is after
the fact - after matching.  And matching respects
only the buffer restriction (`point-(min|max)').

In search+.el I make it possible (via an option)
to actually limit search to the active region.
That is, search matches cannot extend beyond the
region limits.

That feature required quite a few changes to the
Isearch code, even if most of them were simple.

(The general idea is to bind two vars for active
region begin and end and respecting the option,
and then replace calls to `point-(min|max)' by
those vars.  IOW, instead of limiting search to
the buffer restriction, limit it to the region.)

What this request is about amounts to doing
something similar, but doing that with all of the
begin and end bits of a noncontiguous region.

I haven't yet had the time (or motivation) to do
that in my code.

I think it would greatly help Emacs to have such
a feature, i.e., to truly treat the limits of each
zone of a noncontiguous region as search limits.

Now, a question arises as to whether, if we did
have such a feature, it would _also_ be good to
still have the behavior that we have now, i.e.
still be able to have a filter work on matches
for the full buffer, that is, to _not_ limit the
search tries to the region.

I'm guessing that it _would_ be good to conserve
the current behavior, i.e., to have a variable
that chooses which behavior to use.  But I don't
have a good idea of why I think both can be useful.

One reason to keep (also) the current behavior
might be backward compatibility, of course.  But
my gut whispers that there are other reasons.
I haven't really thought about it much.

> I've added Juri to the CCs; perhaps he can clarify.
> (The problem is that if you ask to replace "foo.*bar", and you have
>   foo bar bar
> then `query-replace' will match the entire line, and then filter out
> that match (given that we have a rectangular region that covers just
> "foo bar") and not replace anything.)

It's more important than that.  But yeah, that at
least illustrates one difference.

The point is this: the search boundaries are
currently `point-min' and `point-max', which
respect only narrowing.  If you want to limit
search to a region then you need to narrow to it.

With isearch+.el you can have search respect the
region limits without narrowing (so you can see
the surrounding text while searching - you can
even optionally dim that surrounding text).

And in this case the region bounds act just like
the buffer bounds: _matching_, itself, (not just
filtering) is limited to the region text.

Also with Isearch+ you can search a set of zones,
i.e., a noncontiguous region (while showing or
hiding the antizones).  But in this case, the
limits of those region pieces (zones) aren't used
for matching; they're used only for filtering.

IOW, with my code searching within zones has the
same fault that vanilla Isearch has for searching
within a region using a filter that restricts to
the region: it _matches_ beyond what should be
the search space, and _then it filters_ out any
matches that extend beyond the search space.

In a nutshell, the requested feature is to be
able (but not be required) to not only _filter_
out matches that go beyond zone limits but also
to not allow those matches in the first place.
That is, _limit matching_ itself to be within
such bounds.

(Note: a noncontiguous region need not be
rectangular.  This feature would apply to any
sequence of buffer zones.)




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Feb 2021 19:49:02 +0000
Resent-Message-ID: <handler.27896.B27896.16127273376520 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Lars Ingebrigtsen <larsi@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.16127273376520
          (code B ref 27896); Sun, 07 Feb 2021 19:49:02 +0000
Received: (at 27896) by debbugs.gnu.org; 7 Feb 2021 19:48:57 +0000
Received: from localhost ([127.0.0.1]:48884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8q3F-0001h6-6i
	for submit <at> debbugs.gnu.org; Sun, 07 Feb 2021 14:48:57 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52205)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1l8q3D-0001gq-3R
 for 27896 <at> debbugs.gnu.org; Sun, 07 Feb 2021 14:48:56 -0500
X-Originating-IP: 91.129.108.204
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 761391C0003;
 Sun,  7 Feb 2021 19:48:46 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
Date: Sun, 07 Feb 2021 20:58:39 +0200
In-Reply-To: <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 (Drew Adams's message of "Fri, 5 Feb 2021 16:19:06 +0000")
Message-ID: <87eehrwyd8.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-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 (-)

>> > The (normal) region limits the text that replacement search
>> > tries to match, by bounding it.  The rectangular region keeps
>> > the ordinary region as the domain of text that search tries
>> > to match, and it filters the matches against that domain to
>> > remove any matches that are not wholly within the limits of
>> > the rectangle.
>>
>> Yup.  It's a pretty odd design decision, though --
>> I wonder whether it this happened on purpose or
>> whether that was just the simplest way to implement this.
>
> I'm pretty sure it was done this way just because
> that's much simpler to do.

Indeed.  A proper implementation would require
too much changes in core code.  Just imagine
how to properly replace multi-line regexps in the
rectangular region using current search functions.

As a workaround, to imitate rectangular narrowing,
you can copy the rectangular region with C-x r k
to a temporary buffer, query-replace in it, and
paste the result back with C-x r y.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Feb 2021 20:53:01 +0000
Resent-Message-ID: <handler.27896.B27896.161273113620618 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Drew Adams <drew.adams@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161273113620618
          (code B ref 27896); Sun, 07 Feb 2021 20:53:01 +0000
Received: (at 27896) by debbugs.gnu.org; 7 Feb 2021 20:52:16 +0000
Received: from localhost ([127.0.0.1]:48971 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8r2V-0005MT-AP
	for submit <at> debbugs.gnu.org; Sun, 07 Feb 2021 15:52:16 -0500
Received: from quimby.gnus.org ([95.216.78.240]:39754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1l8r2T-0005MH-VK
 for 27896 <at> debbugs.gnu.org; Sun, 07 Feb 2021 15:52:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=I2yeTY4OM2lzw5mjW/xUL2bH7/b8pLPbYVkZOQNFPZU=; b=X1nZ0sZIggLAQize3OtrcL0gye
 OHK8MEB+/dTCN1Ogqmzxfnh1Me/XP5mHacfxI6IbDvlKqK5Gsw/Jvvssc7hzWoSCkqTj4QRax1XOa
 MfNUWMQdk9MSvqG7Blijk0O+/kANJghjMM+bGe3JPd5ulwy7H614sFtUvvnsjIUlZfqU=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1l8r2I-0004oG-PQ; Sun, 07 Feb 2021 21:52:07 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAM1BMVEUAAAEWFhUlJSUF
 AxdOTk4zMTZubmx+f3tgYGGMjYkfHx9NSjczLkUiHDcSDC2ZmDT////IVuXkAAAAAWJLR0QQlbIN
 LAAAAAd0SU1FB+UCBBYKOcK+W+YAAAFWSURBVEjH7VTbdsIwDKuvNSVp//9vJ6cwyg47NU97GDo0
 LUGypaRkmv4IxMxSJbOaKWuOViiNjxBuROMaYHpJZHc1nz0iaGZ1Zw18uThG/PpDFDyRGbNhMCNF
 CF1QG1PZAwQ9ljfzoAVPad5cNTICBsIz57yj/UMiOmNi9BQgS46B7B6AYr4RbvCL5yraFdazWCgu
 xzKFZwAQYuajpyC3Qx64iYC7R02b6BhimJlgAJnRRRWr4zGeBnh6iTDNvLgZJAr9TrffBE/bfSmQ
 nhX0puC96rv1ag9pra9Ai8LLClBbB39tq7aKwNbeQO9r72ur/CFQ2vpO76LngkV66wmFMennuyGS
 7AZjXeDs3NPeAG76yoYo5wJYR2z4sW3bloKlXJ9cWLlCUDlrxh6Mndg2Wwr7IHIXwFXp7UhBBk9F
 7fSTb0H1tByuQC+frvtpU2d/8ME/hXwB5W8NHHkY9qUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEt
 MDItMDRUMjI6MTA6NTcrMDA6MDB2ytaIAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTAyLTA0VDIy
 OjEwOjU3KzAwOjAwB5duNAAAAABJRU5ErkJggg==
X-Now-Playing: Kid Creole & The Coconuts's _I'm A Wonderful Thing, Baby_:
 "I'm A Wonderful Thing, Baby (Brothers In Rhythm 7" Instrumental)"
Date: Sun, 07 Feb 2021 21:52:01 +0100
In-Reply-To: <87eehrwyd8.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 07 Feb 2021 20:58:39 +0200")
Message-ID: <87im73y51q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > Indeed. A proper
 implementation
 would require > too much changes in core code. Just imagine > how to properly
 replace multi-line regexps in the > rectangular region using current search
 functions. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
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 (-)

Juri Linkov <juri@HIDDEN> writes:

> Indeed.  A proper implementation would require
> too much changes in core code.  Just imagine
> how to properly replace multi-line regexps in the
> rectangular region using current search functions.

Yes, that sounds tough...

But we could somewhat easily change `C-M-%' to be slightly less
surprising, and document its limitations.  That is, we say that no
multi-line matches are impossible in rectangle mode, and we implement it
by just narrowing to each successive line part, and executing the
query-replace-regexp once per line.  (With some magic to handle `!' etc,
I guess.)

Would that work?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 08 Feb 2021 18:24:02 +0000
Resent-Message-ID: <handler.27896.B27896.161280861025118 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Drew Adams <drew.adams@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161280861025118
          (code B ref 27896); Mon, 08 Feb 2021 18:24:02 +0000
Received: (at 27896) by debbugs.gnu.org; 8 Feb 2021 18:23:30 +0000
Received: from localhost ([127.0.0.1]:51892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9BC5-0006X4-TZ
	for submit <at> debbugs.gnu.org; Mon, 08 Feb 2021 13:23:30 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52981)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1l9BC3-0006Wa-AX
 for 27896 <at> debbugs.gnu.org; Mon, 08 Feb 2021 13:23:27 -0500
X-Originating-IP: 91.129.108.204
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id D98A91C0004;
 Mon,  8 Feb 2021 18:23:19 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN> <87im73y51q.fsf@HIDDEN>
Date: Mon, 08 Feb 2021 20:12:48 +0200
In-Reply-To: <87im73y51q.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sun,
 07 Feb 2021 21:52:01 +0100")
Message-ID: <87r1lqlbzj.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-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 (-)

> But we could somewhat easily change `C-M-%' to be slightly less
> surprising, and document its limitations.  That is, we say that no
> multi-line matches are impossible in rectangle mode, and we implement it

The current limitation is inability to use some greedy
regexps in rectangle mode.  This is not much worse than
limiting query-replace to non-multi-line matches only.

> by just narrowing to each successive line part, and executing the
> query-replace-regexp once per line.  (With some magic to handle `!' etc,
> I guess.)

Actually not narrowing in the sense of narrow-to-region,
but temporarily setting the LIMIT arg of 'replace-search'
to the end of the region of the current line.

I invite anyone who uses the rectangle mode to try
different use cases to see whether this works well.
Maybe this also helps in cases like described in bug#6362.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Feb 2021 08:11:02 +0000
Resent-Message-ID: <handler.27896.B27896.16128582123845 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Drew Adams <drew.adams@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.16128582123845
          (code B ref 27896); Tue, 09 Feb 2021 08:11:02 +0000
Received: (at 27896) by debbugs.gnu.org; 9 Feb 2021 08:10:12 +0000
Received: from localhost ([127.0.0.1]:52499 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9O67-0000zv-Rb
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 03:10:12 -0500
Received: from quimby.gnus.org ([95.216.78.240]:55956)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1l9O66-0000zd-78
 for 27896 <at> debbugs.gnu.org; Tue, 09 Feb 2021 03:10:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Z3liTIBTIUOUC698dWmwG3YwWjOnj61hQs+llL/oIHw=; b=XbTO4BBGrlb/CYEcu5OLbmGFJm
 WYLi2DkpY1SgmLEYDUwih6nCojEJjGfRivckGs09CouSxeH9zyZUTPXPnFoaRL8rJo13hKWfz79Gy
 QZwLSjGTx8JPKs0JjF7ix5976nzafhTU8efMr8JhaJXFngYwTUBxi8e2s8dQWRxDyJh0=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1l9O5o-0000IF-St; Tue, 09 Feb 2021 09:10:03 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN> <87im73y51q.fsf@HIDDEN>
 <87r1lqlbzj.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAM1BMVEX+/v7M4OuczuLr
 7vC0t525aUnpXyhce5NEns33SxhXp9HWOxanNxvimDXXrEhJn2j///8PZfWcAAAAAWJLR0QQlbIN
 LAAAAAd0SU1FB+UCCQgIDTXum3YAAAC+SURBVEjH7ZPdDoMwCEallEp/aN//bYV6sS1LVrzZVU9I
 TPQ7AbQex2az+Q2EEAD98UiUTubgzAfKhhrF1UTztVqdhYtrntRqyq3NHo6pgkgy1GiFeZnHKNPI
 VQ1ihvVEchvaoqqxnAli72ZE0R41j6WA0fJqaNWcXAJNow/JRGO5wwFdDTJhEJHjQ9hMRLMF5dNz
 OsC2sM27uPL3i5pC8Z4+hKiUsl74pSA8+B02mz/x7FAiaiF+3fy4vj1QLntgB3hy/AkSAAAAJXRF
 WHRkYXRlOmNyZWF0ZQAyMDIxLTAyLTA5VDA4OjA4OjEyKzAwOjAwoJqIMwAAACV0RVh0ZGF0ZTpt
 b2RpZnkAMjAyMS0wMi0wOVQwODowODoxMiswMDowMNHHMI8AAAAASUVORK5CYII=
X-Now-Playing: Kid Creole & The Coconuts's _I'm A Wonderful Thing (baby)_:
 "I'm A Wonderful Thing, Baby Don't Take My Coconuts"
Date: Tue, 09 Feb 2021 09:09:51 +0100
In-Reply-To: <87r1lqlbzj.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 08 Feb 2021 20:12:48 +0200")
Message-ID: <871rdpll0w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: >> But we could
 somewhat
 easily change `C-M-%' to be slightly less >> surprising, and document its
 limitations. That is, we say that no >> multi-line matches are impossible
 in rectangle mode, and we i [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
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 (-)

Juri Linkov <juri@HIDDEN> writes:

>> But we could somewhat easily change `C-M-%' to be slightly less
>> surprising, and document its limitations.  That is, we say that no
>> multi-line matches are impossible in rectangle mode, and we implement it
>
> The current limitation is inability to use some greedy
> regexps in rectangle mode.  This is not much worse than
> limiting query-replace to non-multi-line matches only.

Aren't multi-line replacements already disallowed in rectangle mode by
the filtering function?

>> by just narrowing to each successive line part, and executing the
>> query-replace-regexp once per line.  (With some magic to handle `!' etc,
>> I guess.)
>
> Actually not narrowing in the sense of narrow-to-region,
> but temporarily setting the LIMIT arg of 'replace-search'
> to the end of the region of the current line.

Yup.

But I guess it's not that easy to get this to work sensibly -- it'd only
highlight matches in one line at a time, which would be odd.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Feb 2021 09:59:01 +0000
Resent-Message-ID: <handler.27896.B27896.161286468630360 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Drew Adams <drew.adams@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161286468630360
          (code B ref 27896); Tue, 09 Feb 2021 09:59:01 +0000
Received: (at 27896) by debbugs.gnu.org; 9 Feb 2021 09:58:06 +0000
Received: from localhost ([127.0.0.1]:52718 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9PmX-0007tc-NB
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 04:58:05 -0500
Received: from relay12.mail.gandi.net ([217.70.178.232]:57075)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1l9PmV-0007sl-JH
 for 27896 <at> debbugs.gnu.org; Tue, 09 Feb 2021 04:58:04 -0500
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 04955200011;
 Tue,  9 Feb 2021 09:57:55 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN> <87im73y51q.fsf@HIDDEN>
 <87r1lqlbzj.fsf@HIDDEN> <871rdpll0w.fsf@HIDDEN>
Date: Tue, 09 Feb 2021 11:24:46 +0200
In-Reply-To: <871rdpll0w.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 09 Feb 2021 09:09:51 +0100")
Message-ID: <87a6sd1txh.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-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 (-)

>>> But we could somewhat easily change `C-M-%' to be slightly less
>>> surprising, and document its limitations.  That is, we say that no
>>> multi-line matches are impossible in rectangle mode, and we implement it
>>
>> The current limitation is inability to use some greedy
>> regexps in rectangle mode.  This is not much worse than
>> limiting query-replace to non-multi-line matches only.
>
> Aren't multi-line replacements already disallowed in rectangle mode by
> the filtering function?

Except in a degenerate case when a rectangular region covers lines
completely from beginning to end.

>>> by just narrowing to each successive line part, and executing the
>>> query-replace-regexp once per line.  (With some magic to handle `!' etc,
>>> I guess.)
>>
>> Actually not narrowing in the sense of narrow-to-region,
>> but temporarily setting the LIMIT arg of 'replace-search'
>> to the end of the region of the current line.
>
> Yup.
>
> But I guess it's not that easy to get this to work sensibly -- it'd only
> highlight matches in one line at a time, which would be odd.

Maybe it's possible to add special handling for lazy-highlighting
as well, but unfortunately implementing all this takes too much time.

So this is a question of priorities: does it make sense to spend
much time implementing this.  Are there any users of this feature?

I mean the feature of regexp and multi-line replacements in rectangle mode,
because non-regexp single-line string replacements already work fine
in rectangle mode.

Or it's enough to explain the current limitation in the documentation.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Feb 2021 17:35:02 +0000
Resent-Message-ID: <handler.27896.B27896.161289208125224 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161289208125224
          (code B ref 27896); Tue, 09 Feb 2021 17:35:02 +0000
Received: (at 27896) by debbugs.gnu.org; 9 Feb 2021 17:34:41 +0000
Received: from localhost ([127.0.0.1]:54494 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9WuP-0006Ym-BV
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 12:34:41 -0500
Received: from aserp2130.oracle.com ([141.146.126.79]:52188)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1l9WuM-0006YW-0J
 for 27896 <at> debbugs.gnu.org; Tue, 09 Feb 2021 12:34:39 -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 119GxtC6097062;
 Tue, 9 Feb 2021 17:34:31 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2020-01-29;
 bh=/4zr/qfz44SbhCNexnqyEIHxSUMnM2j8RY+5Vl38WgM=;
 b=CAa2xESPde6SqkcIQfoCxneh74otp//W0aTU//O17E/E6Hi2Itm0zc4WYixK5vgKYqsP
 jf59o2miuF/Ch2q6WKM3uKYeny/M+FbdLU4kJoBGKOCXKFLPh2oFf57D7tRQJiWaa4FC
 Jh5uqoyhcZjbAyxmY4iINr0Awl71qIhUpFE8WQP4FIgPDiQ42xxWHMGAdpH1WoqsHvPb
 hAUG/9BFY2rn+bf1Vkfjgm8XqvgLgbp59iCXikj3b+QwC7NDuuxvbmYICyGreHWYXArz
 RuuEaD2vC/oYqXCjoRa01NCyBItDZmc0zDBookSdaB7f8CTL/smaRLSdA7+XDrQBGx+D TQ== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by aserp2130.oracle.com with ESMTP id 36hgmaggch-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 09 Feb 2021 17:34:31 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 119GtTTb055037;
 Tue, 9 Feb 2021 17:34:31 GMT
Received: from nam10-bn7-obe.outbound.protection.outlook.com
 (mail-bn7nam10lp2102.outbound.protection.outlook.com [104.47.70.102])
 by aserp3020.oracle.com with ESMTP id 36j511h73n-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 09 Feb 2021 17:34:31 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=HEhyZuWyRbXvzTVyAhSUEbQVGAIDqnzcf0v0Wk+uaFe4vz052QxdpxflRLJC/RqLo3TaYM82bvfG8qFVYgNfDUoFa6vlkYgl0FYCl5LLNVzBMChHLt9QsvrD5j/4x+l6q12cAupl/qCivMPCsN0JgmqVe/QTWlBGtpbpNomZh9BlGZAHm03pxTRw+j/9e7r8WRHrWGz8M+H+SxpB7ffu8CHadWZ4ta3XMOkA851XT9lV0MwPrycCMM/U+e9TDaJRZyUN9NVJFMdwT8KpF1t2nzdef90iIMmRytbMifZJlZigWh5EXKi7t35G+dKP6zXPvxzI0vvvqXvVKJsVOVn/Pg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=/4zr/qfz44SbhCNexnqyEIHxSUMnM2j8RY+5Vl38WgM=;
 b=DAlEqqFIJC+eavxKfUi0eP+9VI+rD2h8GQ0V3hj5lLwYzxfIuo/I2i8PcEIsEE7Qdv4nV1w2QcnUcQyS3QkK/DazlOJg3fEcL1hTvoal9UI/I8YWn5/7O2nCPdhQzhimJ3UUAFeCmkFzPtnx36e151tmJq4nDj8EOM7eShSGTKHZIykOZwloCXxe8ASaXeEDiD4Hz7KyydTKCwXNeLfJDYloucC7D+8EEbbNSAqjseVZYx4k/Oyu9ImNYJkNPDDacOlu7Hy8d4wsLnEGtpuWq05stiVH6KyWYr5Uz1jWeBpS3xj70H1HA7j9QG7/aGb6lciMzKc/xbB4zMF92sjKzw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=/4zr/qfz44SbhCNexnqyEIHxSUMnM2j8RY+5Vl38WgM=;
 b=l2+jUgzcOFQiwQhIBbEPjjDv2YjOg9f+a+4oLB5cmJBLpREpya59ey/B7D6H0dlOL6jbULYxzVhzOB9nKGI//uZ3y0i4NPB4wZ6LPGVxBl5yocsBYVoSfVY4Xh3t4wjnWPMOaAzdSCo06KUvp+MBEKFfH9BRLT69mGfz8c8g2aE=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SA2PR10MB4810.namprd10.prod.outlook.com (2603:10b6:806:11c::7)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.24; Tue, 9 Feb
 2021 17:34:29 +0000
Received: from SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::dc4d:9cd0:2010:daa2]) by SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::dc4d:9cd0:2010:daa2%7]) with mapi id 15.20.3825.030; Tue, 9 Feb 2021
 17:34:29 +0000
From: Drew Adams <drew.adams@HIDDEN>
Thread-Topic: [External] : Re: bug#27896: 25.2; `C-M-%' with
 `rectangle-mark-mode'
Thread-Index: AQHW/soQdX3sNCRXAkC3oQVD5UoKuapQEw+g
Date: Tue, 9 Feb 2021 17:34:29 +0000
Message-ID: <SA2PR10MB4474BA6E3EE5A80416FFB979F38E9@HIDDEN>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>	<87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN> <87im73y51q.fsf@HIDDEN>
 <87r1lqlbzj.fsf@HIDDEN> <871rdpll0w.fsf@HIDDEN>
 <87a6sd1txh.fsf@HIDDEN>
In-Reply-To: <87a6sd1txh.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: linkov.net; dkim=none (message not signed)
 header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com;
x-originating-ip: [73.170.83.28]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: e3b98fd5-8962-4265-084f-08d8cd20f456
x-ms-traffictypediagnostic: SA2PR10MB4810:
x-microsoft-antispam-prvs: <SA2PR10MB4810BD3256223BC6E814CDDCF38E9@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: YWRLU1a5MJmgtkefxN2CDcy4W8o8F2gywbfUzeH2lsdEu0s41M3WMRKLNUpiuPl/N3dY9oOKyb3hP5n8XjUdklFIXgQAsYBW3QhBRzxmk/hb1jaB6gFatbzHCVt2lT80j8+n92RGUzrwlnlUWKrU0NYn1gC8cK0aHa7AKJnbmRZPDy1Fykn0zivehMGxLpNujNUlLFXi4sFJ3CScJPBvBihyTc7d9ZzlOpDcmSaY0HQEeMQIUqmEXhuIaUJuSAlrgI7aIcB1gEZ+p1ISsI/oFFrQv+asLSZpvMgQx4JmCcBeetII2XAG8wVoVaUI4wGy6Hz7xp3fVv1p0Px7yDW70dZbUqvj68PTQlnsD++bGO4hpdJqkpqD+jbAauVCyGBRKX/4iZVMrLzeVxoSsRFGGVP+5dpaL+xMuPwxbz3tlxuwIClbXvXjgCwJSq3YKfmcq4/z1bLcIjFTy500koMsd2HNCCl9tHTEehohrxU4eZztuZa6IXcwHtrDTOpBNFMoB/6qPLtPoBjirVyK4Sh/+u7JZuTejBMD9uRPSw7oIH9/kibtUNdmCT1Qro7UyuF7
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(136003)(366004)(396003)(346002)(39860400002)(376002)(66556008)(64756008)(86362001)(316002)(4326008)(2906002)(478600001)(6506007)(83380400001)(5660300002)(8936002)(66946007)(71200400001)(26005)(33656002)(66446008)(76116006)(55016002)(8676002)(44832011)(110136005)(66476007)(186003)(7696005)(9686003)(52536014)(81973001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: UxPAJyn/KLpoR0PncVSSd2g8ADP2cSaVGTmeBGRZ0SSR7obKCw7nQwek26pIqStr8ZKoPL3htP9ui7Ds7J9L4XLUyAEL5kbERAZFQavK39k/I6I4JguIQ/RM2cY0qNJyWpjOvwKUyELq1h8VZrK0DJEsZA3xQiCofBhRVjW1CeQrSsUEXcvOAak87sTJ7PNc0xp9IdSYW8H9HTjEq2fe/enb4OxfOb25/UTRlbTsBwG/e2Gbm0FA5/rX7Y3uVbETO/Jhar+4D3tv6EE5NxlfuDFXnJRVphbTiuVg6zBT5+kYWc+X3HjLQCz4duAPUTWITBy0rLIA8SoVbiBOXhr8uzI7i5zsD6K3IM2m+Wbc61indaQv6q2idm0nhZ8dWimnWH523JhnyebETMhT1jAtIutqWwnyc//UUVEiH+pb7mwOe3SI8qbcWAxXz1I573NMS+oD2hkbqOKC3AKEhgeSO2K6Se90H0ivLluqDEnyxfxgWFhHRc/ZNw+pV44HZGreEZkRvpzD+W1cmEc0sjtQE+GEazMrr9a5RlO7eFXTFUjkgixgRmTXa5Jrc1Y38u5i2Q9/Q3o8pGcKZjCaEhFJ+WSoDvPpsQc3dwbqXaZNrOildNp0mQyO9frbytFsMXAH6DPJmNlvwoFLSONS5HrfDv02eI6UljWq6jhDkIBNQInlld+E0SXO6EjhPW7XqOz8bdtSeTvghn2zliojMpvtOWp5IrXNtxZFrRao6Gk+nq0=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e3b98fd5-8962-4265-084f-08d8cd20f456
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2021 17:34:29.3676 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: bRFbmKaAHJDJ7VG1P7J+MzMBXITqMsLkGJgVuROKW0pjxF+McPD3R2eIvbO3Lzd1Tl4ZGfJ98zQoIgQ27UrqLQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4810
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9890
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0
 bulkscore=0 adultscore=0
 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2102090083
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9890
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 spamscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 impostorscore=0
 suspectscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 bulkscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000
 definitions=main-2102090083
X-Spam-Score: -2.3 (--)
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 (---)

> So this is a question of priorities: does it make sense to spend
> much time implementing this.  Are there any users of this feature?
>=20
> I mean the feature of regexp and multi-line replacements in rectangle
> mode, because non-regexp single-line string replacements already work=20
> fine in rectangle mode.

I won't suggest what anyone should work on.
We all have limited time and (different)
limited interests.

I'll just say this: the ability for a user
to do this (search any noncontiguous region
properly) would greatly enhance Emacs, IMO.

It's powerful to be able to search zones
(aka noncontiguous regions in a general way,
and that includes limiting _matching_ to the
zones to be searched, not matching against
the whole buffer restriction and then
filtering.

However, this must _not_ be limited to the
assumption of a _rectangular_ noncontiguous
region.  That would defeat the purpose.
That's just one (albeit important) use case.

(And you can already see that from your
discussion of the only exception - for
rectangles - being the rare case when the
rectangle width includes whole lines.  The
case for arbitrary zones is very different.)

I've long had in mind doing this myself,
and started to do so more than once, but I
haven't gotten around to accomplishing it.

If someone does it (in a general way, with
no assumptions of rectangularity) then
great.  If not, that will be for some
indefinite future.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Feb 2021 18:16:01 +0000
Resent-Message-ID: <handler.27896.B27896.161289452929116 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Lars Ingebrigtsen <larsi@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161289452929116
          (code B ref 27896); Tue, 09 Feb 2021 18:16:01 +0000
Received: (at 27896) by debbugs.gnu.org; 9 Feb 2021 18:15:29 +0000
Received: from localhost ([127.0.0.1]:54548 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9XXt-0007ZY-Gb
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 13:15:29 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:44231)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1l9XXr-0007Z1-NF
 for 27896 <at> debbugs.gnu.org; Tue, 09 Feb 2021 13:15:28 -0500
X-Originating-IP: 91.129.108.204
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 1FCCE1C0005;
 Tue,  9 Feb 2021 18:15:19 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN> <87im73y51q.fsf@HIDDEN>
 <87r1lqlbzj.fsf@HIDDEN> <871rdpll0w.fsf@HIDDEN>
 <87a6sd1txh.fsf@HIDDEN>
 <SA2PR10MB4474BA6E3EE5A80416FFB979F38E9@HIDDEN>
Date: Tue, 09 Feb 2021 19:54:21 +0200
In-Reply-To: <SA2PR10MB4474BA6E3EE5A80416FFB979F38E9@HIDDEN>
 (Drew Adams's message of "Tue, 9 Feb 2021 17:34:29 +0000")
Message-ID: <87zh0d5dpu.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-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 (-)

> I've long had in mind doing this myself,
> and started to do so more than once, but I
> haven't gotten around to accomplishing it.
>
> If someone does it (in a general way, with
> no assumptions of rectangularity) then
> great.  If not, that will be for some
> indefinite future.

In the most general case, a noncontiguous region
is just a set of subregions (or as you call this -
'zones') that for the commands that operate on it
should look as just one contiguous string.
How to implement this, I have no idea.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Feb 2021 18:39:01 +0000
Resent-Message-ID: <handler.27896.B27896.161289593031359 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Lars Ingebrigtsen <larsi@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161289593031359
          (code B ref 27896); Tue, 09 Feb 2021 18:39:01 +0000
Received: (at 27896) by debbugs.gnu.org; 9 Feb 2021 18:38:50 +0000
Received: from localhost ([127.0.0.1]:54607 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9XuU-00089j-3L
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 13:38:50 -0500
Received: from aserp2120.oracle.com ([141.146.126.78]:56100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1l9XuP-00089R-Ml
 for 27896 <at> debbugs.gnu.org; Tue, 09 Feb 2021 13:38:49 -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 119ITSJJ193750;
 Tue, 9 Feb 2021 18:38:37 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2020-01-29;
 bh=IAS12kgpBU+f2uOiSZW0rjcmtXnyCDdJnK1DO72JC1Y=;
 b=hNC3laik9ExYRFCGwrNlDtzosgfOttYts2e06q/GNYJgUWnOURfJtmvPcKsPVg8by9dY
 UMNuY8DQe84PLeCKnGthW5daTJpN0UEAp1QE3npFRmM7JJi3vrVqdO03tMaOO8KA2N6L
 Ht/41gx3o1Odf+IZrGkklKs+yck9ecXsy1XrIaHT7tMnRgr92kePdJhq3YJAea1Yv88Y
 RYKYhDBtvwIGP3B3PrQQ8vRL7Oiq138ZZY0oCswio++nwdvaMU0LKd9kDEbkOTl5QDI6
 PLU/cftr5BCq9ZVI8NmHMv+4WNKe06TulpI50NnoYltzc/04QUPdESQS+JOa7G2sA7O/ bg== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by aserp2120.oracle.com with ESMTP id 36hk2kgkr4-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 09 Feb 2021 18:38:37 +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 119IPupL028511;
 Tue, 9 Feb 2021 18:38:37 GMT
Received: from nam10-dm6-obe.outbound.protection.outlook.com
 (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109])
 by aserp3030.oracle.com with ESMTP id 36j4pp3d0s-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 09 Feb 2021 18:38:36 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=V200LhAQh5LCeOCn/Cv9NaCAWH+6H9F0SRcLDG4DvRSbreDSCo0dCNMADTWqMMJO1DM6nbNOLjYt7esDEWnlh6cHzbjiTHuqBORRpnt7X4ARuUrE/DKvCNcFMYSQn+f6KnD4PiZZ8aea7i7ZUgKdRUTYRFCJLsJK6NkBTSiCbiWT1dmQdQR4MjSXIxZCgQ07Ta7bOzkl9LY0ZrrB8jSjP9fCtt2QBHUiubDGBMAwbdFfGueKUzzT3FqF5aaeG1Y5eShcczSqniJSYPHgoMeg907FKOmFei2C9VbvCnuwdi6PWt9gDt12sqsmKe9gBohDcBzAZ3uy5qBdTP1mekz7AA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=IAS12kgpBU+f2uOiSZW0rjcmtXnyCDdJnK1DO72JC1Y=;
 b=MWI9QTP/aGfpG5Jv8whuI+vcn0Ui/q0E0lp0EjvZXVhCmtfWFSBAdoOODiueRIqcOGD5GlGRrDXEr7eNAGwKeNadYHB5I4Bm4bfACmCAzv+ALNob7mbOV7QcS52F+8dLu2GeKnYAJTnblo37toEIw+lV3kimzpYsQhXGna9q0YUy4jscIqLyFolYcF40iQ+zEy9MP004GRz85Az6gFwEEE0NZj6rKOAsU0HAwymzBT1GPobZT2Clc5PZe1zwMvuuCkc3WutusZblSL1XogqjDBHAEvD3MhcV6EwhNxJiI5uU5RFbxN8Fhyy/1ip28MorBL/4pdUDVxj2D9rczKItYw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=IAS12kgpBU+f2uOiSZW0rjcmtXnyCDdJnK1DO72JC1Y=;
 b=DThEoO4DNOm0to7QPaZetPRCPxrgkvBgoxLlPUsi0IhJSsKydYndyvgRabOq79stukwzQJxDmCKmOj3Hn1DsSW2ukwEWv1kG69X+KTMteQ0X6P/oPj79KiDRXKzmHnzfgVvqhZBpihGbztugkCfEIvcOAQzq7/NXY2UWwPpF/d8=
Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15)
 by SN6PR10MB2432.namprd10.prod.outlook.com (2603:10b6:805:46::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.26; Tue, 9 Feb
 2021 18:38:34 +0000
Received: from SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::dc4d:9cd0:2010:daa2]) by SA2PR10MB4474.namprd10.prod.outlook.com
 ([fe80::dc4d:9cd0:2010:daa2%7]) with mapi id 15.20.3825.030; Tue, 9 Feb 2021
 18:38:34 +0000
From: Drew Adams <drew.adams@HIDDEN>
Thread-Topic: [External] : Re: bug#27896: 25.2; `C-M-%' with
 `rectangle-mark-mode'
Thread-Index: AQHW/w+RiRnZmyWwXU+zvdZIgrqi1apQJcNA
Date: Tue, 9 Feb 2021 18:38:34 +0000
Message-ID: <SA2PR10MB447405DF224DF0D19DD5C90DF38E9@HIDDEN>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>	<87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN> <87im73y51q.fsf@HIDDEN>
 <87r1lqlbzj.fsf@HIDDEN> <871rdpll0w.fsf@HIDDEN>
 <87a6sd1txh.fsf@HIDDEN>
 <SA2PR10MB4474BA6E3EE5A80416FFB979F38E9@HIDDEN>
 <87zh0d5dpu.fsf@HIDDEN>
In-Reply-To: <87zh0d5dpu.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: linkov.net; dkim=none (message not signed)
 header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com;
x-originating-ip: [73.170.83.28]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 8ab3ccb3-c0bd-4c95-c1b6-08d8cd29e865
x-ms-traffictypediagnostic: SN6PR10MB2432:
x-microsoft-antispam-prvs: <SN6PR10MB24328C413932C3588AF71059F38E9@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: B9XvwBb55S2AZll/MJbbbgIYXbK5sso7pvE4gKXI4buUrTHgpjjCH0aPbDFELVCJ6x44dmcxMZbUrL/+P+MtjhOu4uWO+m+wPTdyZkeTM6zGk6wTJ+D2zVIoefv9plDBUFH1tYR/XXhFvVKB/7bLeZOLGVTcBqVGW4yA6CrFvsu//um7525bH1w6nEI+uHj2F0/7YcXIJ3ZhjkhyiIEsy9cs4qdsTPnPqX/g/n3eWC+scPk1yfq9UoNxPPBznlFh28uJNpcXsl+cu5vI+3HkvX8zJXsXa7oje1xwGe7SPJLaYLWYKMaL0W75J79UCti3QqcMf8kSG+dd3kfwVnPYinwzNv6YpXJMG1TgXrBJ8qgdPCTwGOn0GKxsCLAFMVBWygET9kxBrP7fCkzGDzkaW0LYtaWqR6/7JaQlonMMITj+0HkrPW9Xjs+a8Db9nrVY3qbuj4HZzUjnMvK6Q3cBmOoHlit2AapaUz5cWLuxR+x2Az92Wm/OtAI6+G2oJjjiPDkW0lBUKH9nB5YTimysZxU8ZLov+6RNouOzSv1I+1X3U0FRc+NrF83xvCftIszK
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(39860400002)(136003)(366004)(396003)(376002)(346002)(55016002)(71200400001)(5660300002)(6506007)(86362001)(83380400001)(8936002)(186003)(26005)(7696005)(2906002)(316002)(54906003)(478600001)(9686003)(4326008)(52536014)(44832011)(33656002)(8676002)(66946007)(66476007)(66556008)(64756008)(66446008)(76116006)(6916009)(81973001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata: m7qgYqQJrCFahZK1Cel+7Bef3o2trheEe4Mwq+QlENvC/HHz5y1jsylVKOeKyIBqVjtZxPuBmjSLACnA5gEnFpmjBq8upGElUFpG1QHispk/tqY0uhrlr/EUaOICVHlx6pxkRebZJNfigQaa5n3Z+DZ7iW12e2TYImCwwjsXUMKQS8+w5yJvP91UUOMuHYn1hlGylsx4uv1InkrVWrLiGtoNg4H6RpKx6aj7vud33fhb7yt8sGzZfWqkSzU166tUsMxx/kYhbRxPGGcqxZc9FP/lZQh9jabbQNbS1V5iG3CUOS+eTSo3KRmCfvVu7WZm6OJUieJy+6Rh86CQz8MqN6EGnMfRn7p+V8KlfV8kXTQgO3wntc+GF5ne7v1+B8hvFFeCsbkeFoywPAZkQT3LJsztpKMLfPujUfMDQOpkrQH4SbXleYZrpwYIGzTaT4ZRc0WW5GDztSNWyOh4wT+Fv1F1oqvkj5gF1r9OjdC7WgCE2ktzPscohcB6RtnQPuYBI6s+35P8XhGJRJmhXaAaBqtGtLX2oDoHALSc6oOAguPLHOtL55ssSm1h+KmsjepNRwcHssU2g/fBHhv53SYd689XBuUSGfd7EM0KAFmzminPGBNmAdx3CnJ42oUyvdEY59xOxLz59JgS9cmrNTawY8M3ltF0U0U8IkmafNCPj4LsZJoJx+xSJa/0ffjRuBA93fQbz+RYvDwNhKHcvh5YuHLGNhlZhQclaXIhWVIaj7GMNUVhU7E43Td0pZvlG8NxyMxkmX4nZjx1hCkPONsq9o9WSyN5cnR0YNwnmOFDHEGSBNhOOJrX56sXKb+VEJs/gmaReMuHLKsKblXc5NKL4wGo0cS77f9OqLXqL6wzLcgfAHmLI+7hgNc1/w3wblx6HQ4g3kzfO04+mW3kpq83W5xQL6cBL+pAqli8O9IhOTU3ZJoFNwGwGsmDSZE7prh0XBiff6jaFRanCi/l6YZTLVaWptT8Lfv7bwazVziQ4LU3GEfFqe8P9xGPuc9WcYfsjksSWm8k72KK0UEB/NoJQhLr64hznLSGmB24uNB4SGQctHyHPGrK+eVnn9czKSgavIO5LzCRHRFXn1uge95jO00kV0H0fNo6e5rFNi9FSveV0GbItiTXsCmSabC4CdMBKoYFZ4L+10A2VYBgeu8bkUXHsBZj0ToUcWrRLeZu5/b8ghEnG7/OeKQUsBOUmB1oaITuSFrvOmF6myHvWZ+8t9LPe4qrAb81pPcFtYTVTNKkgOauglahZtkZCAn83A/6RVWlLqTcpSAAIinq+3xcuCTd3LDUr32skWtNPFrIR+/GRbAJnGN0t8P0yfwtwKKT
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8ab3ccb3-c0bd-4c95-c1b6-08d8cd29e865
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2021 18:38:34.8494 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: S2r3J7picPtiKqC/j1pRuGPF32G6a/oq+wan8zNFQw9bZEXZoISsUTJzlvAbS+d+suPef1FIozlhNCMLz6y5Ow==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2432
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9890
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 adultscore=0
 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0
 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2102090088
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9890
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0
 malwarescore=0
 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0
 bulkscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0
 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2102090088
X-Spam-Score: -2.3 (--)
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 (---)

> > I've long had in mind doing this myself,
> > and started to do so more than once, but I
> > haven't gotten around to accomplishing it.
> >
> > If someone does it (in a general way, with
> > no assumptions of rectangularity) then
> > great.  If not, that will be for some
> > indefinite future.
>=20
> In the most general case, a noncontiguous region
> is just a set of subregions (or as you call this -
> 'zones') that for the commands that operate on it
> should look as just one contiguous string.

Well, no.  It depends on the command, of
course.  But _most_ commands will want to
treat a set of zones as just that.

They'll perform operations on one or more
of the zones - either separately or in
combination in some way.

Operations on zones need not even treat
_any_ (let alone all) of the zones as a
string.

> How to implement this, I have no idea.

My approach is to do, for each zone,
what I currently do for the active region
as a whole, which is what vanilla Emacs
does for the buffer as a whole.

IOW, instead of always using `point-min'
and `point-max' for _matching_, use the
limits of each zone.  IOW, just limit
matching to the search space.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Feb 2021 19:26:02 +0000
Resent-Message-ID: <handler.27896.B27896.161289875011320 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: "27896 <at> debbugs.gnu.org" <27896 <at> debbugs.gnu.org>, Lars Ingebrigtsen <larsi@HIDDEN>
Received: via spool by 27896-submit <at> debbugs.gnu.org id=B27896.161289875011320
          (code B ref 27896); Tue, 09 Feb 2021 19:26:02 +0000
Received: (at 27896) by debbugs.gnu.org; 9 Feb 2021 19:25:50 +0000
Received: from localhost ([127.0.0.1]:54674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9Ydx-0002wW-Gf
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 14:25:50 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:38081)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1l9Ydt-0002vu-P7
 for 27896 <at> debbugs.gnu.org; Tue, 09 Feb 2021 14:25:46 -0500
X-Originating-IP: 91.129.108.204
Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204])
 (Authenticated sender: juri@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 2CF49FF80B;
 Tue,  9 Feb 2021 19:25:37 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@HIDDEN>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@HIDDEN>
 <87eehrwyd8.fsf@HIDDEN> <87im73y51q.fsf@HIDDEN>
 <87r1lqlbzj.fsf@HIDDEN> <871rdpll0w.fsf@HIDDEN>
 <87a6sd1txh.fsf@HIDDEN>
 <SA2PR10MB4474BA6E3EE5A80416FFB979F38E9@HIDDEN>
 <87zh0d5dpu.fsf@HIDDEN>
 <SA2PR10MB447405DF224DF0D19DD5C90DF38E9@HIDDEN>
Date: Tue, 09 Feb 2021 21:19:29 +0200
In-Reply-To: <SA2PR10MB447405DF224DF0D19DD5C90DF38E9@HIDDEN>
 (Drew Adams's message of "Tue, 9 Feb 2021 18:38:34 +0000")
Message-ID: <87sg65122m.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-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 (-)

> My approach is to do, for each zone,
> what I currently do for the active region
> as a whole, which is what vanilla Emacs
> does for the buffer as a whole.
>
> IOW, instead of always using `point-min'
> and `point-max' for _matching_, use the
> limits of each zone.  IOW, just limit
> matching to the search space.

Is this similar to how multiple major modes work?
i.e. https://www.emacswiki.org/emacs/MultipleModes





Last modified: Tue, 9 Feb 2021 19:30:02 UTC

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