From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode' Date: Mon, 08 Feb 2021 20:12:48 +0200 Organization: LINKOV.NET Message-ID: <87r1lqlbzj.fsf@mail.linkov.net> References: <8b30a5cc-24db-4bca-94bd-50c79e65b43a@default> <87pn1eiv4m.fsf@gnus.org> <87eehrwyd8.fsf@mail.linkov.net> <87im73y51q.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25935"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: "27896@debbugs.gnu.org" <27896@debbugs.gnu.org> To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 08 23:48:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l9FL1-0006dm-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 23:48:59 +0100 Original-Received: from localhost ([::1]:36352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9FL0-00062C-Cy for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 17:48:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9BCd-0003WE-Iw for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9BCc-0006Hq-Mj for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9BCc-0006Y3-H1 for bug-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Feb 2021 18:24:02 +0000 Resent-Message-ID: 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.161280861025118 (code B ref 27896); Mon, 08 Feb 2021 18:24:02 +0000 Original-Received: (at 27896) by debbugs.gnu.org; 8 Feb 2021 18:23:30 +0000 Original-Received: from localhost ([127.0.0.1]:51892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9BC5-0006X4-TZ for submit@debbugs.gnu.org; Mon, 08 Feb 2021 13:23:30 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9BC3-0006Wa-AX for 27896@debbugs.gnu.org; Mon, 08 Feb 2021 13:23:27 -0500 X-Originating-IP: 91.129.108.204 Original-Received: from mail.gandi.net (m91-129-108-204.cust.tele2.ee [91.129.108.204]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id D98A91C0004; Mon, 8 Feb 2021 18:23:19 +0000 (UTC) In-Reply-To: <87im73y51q.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 07 Feb 2021 21:52:01 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199633 Archived-At: > 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.