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

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

bug#52265: Wishlist: Behavior of rectangles when last line is short


From: Lars Ingebrigtsen
Subject: bug#52265: Wishlist: Behavior of rectangles when last line is short
Date: Sat, 04 Dec 2021 23:12:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Tor Kringeland <tor.a.s.kringeland@ntnu.no> writes:

> I should have been more clear.  I used `kill-rectangle' to kill the
> region so that I can yank it as a column to the right of the three first
> lines; this is done using `yank-rectangle' at the end of the first line,
> after inserting a number of spaces.

Oh, I see.  😀  Well, that makes more sense, then.

> The behavior in the second point is more geared toward this specific
> example, but it's also a general one.  Basically it's about allowing the
> user to optionally specify what column separator to use.  The default
> one is tabs and spaces for visual alignment.  In my CSV example a comma
> would be used.  And you could /e.g./ use a vertical bar for `org-mode'
> tables.

I think there's a separate package for doing this...  er...  something
about tabular mode, but I forget what it's called.  It mogrifies text
into a table, and from that you can export into various formats.  Or was
it table.el?  It's been a long while since I used it last.

> As a sidenote, `org-mode' already sidesteps this last issue by having
> the command `org-table-create-or-convert-from-region' which can create a
> table from the resulting columns after yanking the rectangle.  Maybe
> something similar could be done in `csv-mode'?  It would solve the issue
> wrt. my second point, though I still think there is some general use in
> being able to specify the column separator.

I think selecting prefix characters etc just isn't general enough.  When
creating a CSV file, for instance, you want to get rid of the spaces,
too.  So creating a table and then exporting (via various rules) seems
more useful.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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