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#55234: 28.1; replace-string in rectangle regio Date: Wed, 01 Jun 2022 22:23:29 +0300 Organization: LINKOV.NET Message-ID: <86tu94193i.fsf@mail.linkov.net> References: <868rrj6r37.fsf@mail.linkov.net> <87bkvcboei.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9425"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Paulo Sousa , 55234@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 01 21:26:23 2022 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 1nwTz4-0002Mw-Gn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 21:26:22 +0200 Original-Received: from localhost ([::1]:53992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwTz3-0005rW-Cl for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jun 2022 15:26:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwTyk-0005rH-Aj for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57965) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwTyk-0003N7-2I for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwTyj-0003cb-Qb for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2022 15:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2022 19:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55234 X-GNU-PR-Package: emacs Original-Received: via spool by 55234-submit@debbugs.gnu.org id=B55234.165411155713911 (code B ref 55234); Wed, 01 Jun 2022 19:26:01 +0000 Original-Received: (at 55234) by debbugs.gnu.org; 1 Jun 2022 19:25:57 +0000 Original-Received: from localhost ([127.0.0.1]:51862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwTyf-0003cI-LP for submit@debbugs.gnu.org; Wed, 01 Jun 2022 15:25:57 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:53603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwTyd-0003c4-K7 for 55234@debbugs.gnu.org; Wed, 01 Jun 2022 15:25:56 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id E166E240008; Wed, 1 Jun 2022 19:25:47 +0000 (UTC) In-Reply-To: <87bkvcboei.fsf@web.de> (Michael Heerdegen's message of "Wed, 01 Jun 2022 13:42:45 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233507 Archived-At: >> So the question is why `region-beginning` and `region-end` >> don't return rectangular region boundaries. > > This is implemented with `rectangle--mark-crutches', right? Note that > these positions can be purely "virtual" (i.e., not exist in the buffer). I thought that the implementation of region-beginning could be: (mapcar 'car (region-bounds)) or better for backward-compatibility: (caar (region-bounds)) and region-end: (cdar (last (region-bounds))) Please try these on the original bug report - they completely fix the problem. > BTW, my solution to the original problem: I implemented a command > that lets me edit a rectangular region in a separate buffer (similar to > `string-edit'). Isn't this a workaround? PS: I'll reply to your other posts after more testing of search/replace problems.