unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* align mysteries
@ 2021-10-14 18:59 Lars Ingebrigtsen
  2021-10-14 19:58 ` dick
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-14 18:59 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-10-16 17:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 18:59 align mysteries Lars Ingebrigtsen
2021-10-14 19:58 ` dick
2021-10-14 20:59   ` Lars Ingebrigtsen
2021-10-14 21:19     ` H. Dieter Wilhelm
2021-10-14 21:35       ` Lars Ingebrigtsen
2021-10-14 21:41         ` Lars Ingebrigtsen
2021-10-15  6:20           ` Eli Zaretskii
2021-10-15 10:01             ` Lars Ingebrigtsen
2021-10-16 17:48           ` H. Dieter Wilhelm
2021-10-14 22:04 ` Stefan Monnier
2021-10-15 10:00   ` Lars Ingebrigtsen
2021-10-15  9:32 ` Teemu Likonen
2021-10-15 10:10   ` Lars Ingebrigtsen

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).