emacs-devel
[Top][All Lists]
Advanced

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

align mysteries


From: Lars Ingebrigtsen
Subject: align mysteries
Date: Thu, 14 Oct 2021 20:59:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

I've never looked looking into how `align' works (because I don't
usually align anything), but it's kinda weird?

With the following in a text-mode buffer:

foo bar zot
lalala y indeed

`M-x align RET'

with that in the region does nothing.  `C-u M-x align RET' does align...
something...  And I get:

foo     bar     zot
lalala  y indeed

That is, it made all the spaces in the first line into TABs, and the
first space on the second line into a TAB.  ¯\_(ツ)_/¯

The prefix isn't mentioned in the `align' doc string, and it's not
referred to in the function itself, so it's probably reacted to in a
function called by `align'?  (I didn't try to debug it.)

So we should at least have a doc string fix here.  But is this how
`align' is supposed to work?  It seems awfully quirky.

The other thing I wondered about is -- do we have a sexp-aware
alignment command somewhere?  That is, that would use `forward-sexp' to
compute the columns?

-- 
(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]