GNU bug report logs - #55234
28.1; replace-string in rectangle regio

Previous Next

Package: emacs;

Reported by: Paulo Sousa <de.sousa.paulus <at> gmail.com>

Date: Mon, 2 May 2022 23:34:02 UTC

Severity: normal

Found in version 28.1

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 55234 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Juri Linkov <juri <at> linkov.net>
Cc: Paulo Sousa <de.sousa.paulus <at> gmail.com>, 55234 <at> debbugs.gnu.org
Subject: Re: bug#55234: 28.1; replace-string in rectangle regio
Date: Thu, 02 Jun 2022 14:20:43 +0200
Juri Linkov <juri <at> linkov.net> writes:

>   (mapcar 'car (region-bounds))

Sounds reasonable.

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

A different approach.  Why I did this is: first, it's sometimes nice to
have a separate buffer that is like the buffer "narrowed to the
rectangular region".  Second, depending on the text structure, in some
cases the end result should be a proper rectangle again, or even a
rectangle of exactly the same dimensions.  But when you query replace,
rectangle lines may become different lengths, some may be empty, some
even longer than before etc.  My commands asks me what to do in such a
situation.

Michael.




This bug report was last modified 3 years and 43 days ago.

Previous Next


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