emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Abbrevs and Org Tables


From: Carsten Dominik
Subject: Re: [Orgmode] Abbrevs and Org Tables
Date: Tue, 22 Apr 2008 05:32:17 +0200


On Apr 20, 2008, at 11:44 AM, Chris Randle wrote:

Hi

I define an Emacs abbrev of, say, "hnbc" to exapand to "how now brown
cow", and then type "hnbc[space]" inside an org table cell. After it has expanded it pushes the trailing cell divider away, even though the cell
width was adequate. Tabbing out of the cell doesn't re-fit the cell
divider - it stays "stuck" where it was after the expansion.

It's slightly odd, because if I type lots of leading spaces before the
abbrev and then tab, org happily moves the expanded text back to the
beginning of the cell, but still doesn't move the trailing divider.

C-c C-c fixes it, and also moving the cursor over to the trailing cell
divider and backspace one char and tab.

Any other workarounds or suggestions?

Hi Chris, Jose,

maybe it is useful to explain a bit how the table editor works. Each time you press a character, Org checks if you are doing this inside a table. If yes, Org is checking if it can insert the character into the current field., it it fits in there. If yes it does so. If not, it raises a flag that the next TAB should trigger a re-alignment of the table. Org goes through all this to avoid having the re-align the table always, each time you press TAB, because for large tables this can lead to a significant slowdown.

Now, the two things mentioned in this thread, abbrev expansion and hiding of emphasis markers, happen outside the control of normal editing. Both happen by some hook, and the corresponding change in field width is not noticed by Org. It is not easy to fix this without endangering the mechanism that suppresses constant table alignment. It seems to me that these two cases are rare enough that it is not too much to ask to quickly fix things with C-c C-c.

I this really bothers you, take a look at the variable `org-enable- table-editor'. The default for this variable is `optimized', which leads to the discussed behavior. If you set it to t, each TAB will re- align the table.

HTH

- Carsten




reply via email to

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