From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Lars Ingebrigtsen <larsi@gnus.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#27896: [External] : Re: bug#27896: 25.2;
 `C-M-%' with `rectangle-mark-mode'
Date: Sun, 07 Feb 2021 21:52:01 +0100
Message-ID: <87im73y51q.fsf@gnus.org>
References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default>
 <cf0b64a5-dab3-4a71-b49b-fd9b20e77b41@default>
 <87pn1eiv4m.fsf@gnus.org>
 <SA2PR10MB44741A63A4C7EA23A6F63421F3B29@SA2PR10MB4474.namprd10.prod.outlook.com>
 <87eehrwyd8.fsf@mail.linkov.net>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="27834"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Cc: "27896@debbugs.gnu.org" <27896@debbugs.gnu.org>
To: Juri Linkov <juri@linkov.net>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 07 21:53:21 2021
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1l8r3Y-00076g-MT
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 21:53:20 +0100
Original-Received: from localhost ([::1]:34384 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1l8r3X-0004dS-Dl
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 15:53:19 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51784)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1l8r3G-0004cy-7B
 for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 15:53:02 -0500
Original-Received: from debbugs.gnu.org ([209.51.188.43]:37425)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1l8r3F-0003T3-V0
 for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 15:53:01 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1l8r3F-0005NS-U8
 for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 15:53:01 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Lars Ingebrigtsen <larsi@gnus.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 07 Feb 2021 20:53:01 +0000
Resent-Message-ID: <handler.27896.B27896.161273113620618@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 27896
X-GNU-PR-Package: emacs
Original-Received: via spool by 27896-submit@debbugs.gnu.org id=B27896.161273113620618
 (code B ref 27896); Sun, 07 Feb 2021 20:53:01 +0000
Original-Received: (at 27896) by debbugs.gnu.org; 7 Feb 2021 20:52:16 +0000
Original-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@debbugs.gnu.org>)
 id 1l8r2V-0005MT-AP
 for submit@debbugs.gnu.org; Sun, 07 Feb 2021 15:52:16 -0500
Original-Received: from quimby.gnus.org ([95.216.78.240]:39754)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@gnus.org>) id 1l8r2T-0005MH-VK
 for 27896@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=;
Original-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@gnus.org>)
 id 1l8r2I-0004oG-PQ; Sun, 07 Feb 2021 21:52:07 +0100
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)"
In-Reply-To: <87eehrwyd8.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 
 07 Feb 2021 20:58:39 +0200")
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:199567
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/199567>

Juri Linkov <juri@linkov.net> 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