all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Chris Randle <chris@amlog.co.uk>, Jose Robins <jorobins@yahoo.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Abbrevs and Org Tables
Date: Tue, 22 Apr 2008 05:32:17 +0200	[thread overview]
Message-ID: <981A2882-7550-4DD5-A912-CBC83FCAEF29@science.uva.nl> (raw)
In-Reply-To: <008b01c8a2cb$2ff9f3f0$6580a8c0@CUBE>


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

      parent reply	other threads:[~2008-04-22  3:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-20  9:44 Abbrevs and Org Tables Chris Randle
2008-04-20 14:09 ` Jose Robins
2008-04-21 13:15   ` Carsten Dominik
2008-04-21 14:09     ` Jose Robins
2008-04-22  3:32 ` Carsten Dominik [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=981A2882-7550-4DD5-A912-CBC83FCAEF29@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=chris@amlog.co.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=jorobins@yahoo.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.