From: Lars Ingebrigtsen <larsi@gnus.org>
To: Tor Kringeland <tor.a.s.kringeland@ntnu.no>
Cc: 52265@debbugs.gnu.org
Subject: bug#52265: Wishlist: Behavior of rectangles when last line is short
Date: Sat, 04 Dec 2021 20:50:39 +0100 [thread overview]
Message-ID: <87y25040a8.fsf@gnus.org> (raw)
In-Reply-To: <m2czmdthir.fsf@ntnu.no> (Tor Kringeland's message of "Sat, 04 Dec 2021 00:06:52 +0100")
Tor Kringeland <tor.a.s.kringeland@ntnu.no> writes:
> Suppose we have the following text
>
> text123
> more text
> text
> first
> second
> third
>
> and want to turn it into
>
> text123,first
> more text,second
> text,third
>
> using rectangles.
I'm not sure I understand. Does Emacs have a rectangle command that
does this? And if so, what is it called?
> 1. When moving POINT to the the empty line below the line containing
> "third" and killing the region starting on the line with "first",
> nothing happens. How about having the whole region killed as a
> rectangle in this case?
Killing the region (i.e., using `C-w') works fine for me...
> 2. Having a user option or prefix argument affecting `yank-rectangle'
> which when active would /e.g./ prompt the user for a string to
> insert, instead of filling the space between the lines and the yanked
> rectangle with tabs/spaces. Optionally, just place the given string
> in front of the rectangle and put it at the end of the lines, without
> worrying about visual alignment (so you wouldn't have to worry about
> the first line being the longest).
I think this is way outside the scope of rectangles. Your use case
seems to be to turn a series of lines into CSV columns -- but that's
better expressed through a CSV command. You might want to group them by
two or three or four lines into columns, for instance.
So I don't think using rectangles for something like this is totally the
wrong tool, and it can't possibly work very well. Unless I'm
misunderstanding something, which I might well be doing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-12-04 19:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 23:06 bug#52265: Wishlist: Behavior of rectangles when last line is short Tor Kringeland
2021-12-04 19:50 ` Lars Ingebrigtsen [this message]
2021-12-04 20:33 ` Tor Kringeland
2021-12-04 22:12 ` Lars Ingebrigtsen
2021-12-06 0:25 ` Tor Kringeland
2021-12-06 1:30 ` Lars Ingebrigtsen
2021-12-04 21:18 ` Alan Third
2021-12-06 0:12 ` Tor Kringeland
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y25040a8.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=52265@debbugs.gnu.org \
--cc=tor.a.s.kringeland@ntnu.no \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.