unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
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 23:12:21 +0100	[thread overview]
Message-ID: <87lf10xbne.fsf@gnus.org> (raw)
In-Reply-To: <m2k0gkrtyi.fsf@ntnu.no> (Tor Kringeland's message of "Sat, 04 Dec 2021 21:33:25 +0100")

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	other threads:[~2021-12-04 22:12 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
2021-12-04 20:33   ` Tor Kringeland
2021-12-04 22:12     ` Lars Ingebrigtsen [this message]
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

  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=87lf10xbne.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 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).