bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55234: 28.1; replace-string in rectangle regio


From: Juri Linkov
Subject: bug#55234: 28.1; replace-string in rectangle regio
Date: Thu, 02 Jun 2022 20:23:24 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

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

Does this approach have more side-effects?  It seems e.g. the undo history
of replacements is not maintained: when copied back from the temporary buffer
to the original buffer, the undo command will undo the whole rectangular region,
not each replacement?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]