emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Automatic formatting of the table as you type


From: Nicolas Goaziou
Subject: Re: Automatic formatting of the table as you type
Date: Fri, 27 Mar 2020 19:55:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello,

ndame <address@hidden> writes:

> The other day a code was posted on Reddit which automatically formats
> the table as you type:
>
> https://i.imgur.com/lorIDhY.gif
>
>
> The code looks pretty simple, the actual formatting code is only a few lines
> and it might even be possible to rewrite it to simplify it even more:
>
> https://reddit.com/r/emacs/comments/fosdi2/orgtableautoalignmode_minor_mode_for_auto/
>
>
> Org should provide this feature out of the box as an optional minor
> mode like org-indent-mode. It provides a much nicer user experience
> than the current behavior where the table falls apart when you type in
> it until you press TAB or such.

The idea is nice, and probably a step in the right direction, but
`org-at-table-p' and `org-table-align' are not lightweight functions. In
some common situations, e.g., when the table is a bit large, or when it
is located away from the start of a section, typing in the table may
feel sluggish.

Therefore, I wonder if Org should include it unless it is optimized in
most situations.

As a side note, the table doesn't realign when you add a space in
a cell.

Regards,

-- 
Nicolas Goaziou



reply via email to

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