unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Juri Linkov <juri@linkov.net>
Cc: Paulo Sousa <de.sousa.paulus@gmail.com>, 55234@debbugs.gnu.org
Subject: bug#55234: 28.1; replace-string in rectangle regio
Date: Thu, 02 Jun 2022 14:20:43 +0200	[thread overview]
Message-ID: <87zgivntno.fsf@web.de> (raw)
In-Reply-To: <86tu94193i.fsf@mail.linkov.net> (Juri Linkov's message of "Wed,  01 Jun 2022 22:23:29 +0300")

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





  reply	other threads:[~2022-06-02 12:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 22:36 bug#55234: 28.1; replace-string in rectangle regio Paulo Sousa
2022-05-03  6:57 ` Juri Linkov
2022-06-01 11:42   ` Michael Heerdegen
2022-06-01 19:23     ` Juri Linkov
2022-06-02 12:20       ` Michael Heerdegen [this message]
2022-06-02 17:19         ` Juri Linkov
2022-06-03  7:46           ` Juri Linkov
2022-06-03 18:09             ` Juri Linkov
2022-06-04 13:20               ` Michael Heerdegen
2022-06-06  7:43                 ` Juri Linkov
2022-06-09 11:12                   ` Michael Heerdegen
2022-06-09 17:05                     ` Juri Linkov
2022-06-02 17:23         ` Juri Linkov
2022-06-03  9:37           ` Michael Heerdegen
2022-06-08 17:10 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgivntno.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=55234@debbugs.gnu.org \
    --cc=de.sousa.paulus@gmail.com \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).