emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* execute lisp function after enter a cell in a org-table
@ 2011-10-31 13:50 Torsten Wagner
  0 siblings, 0 replies; only message in thread
From: Torsten Wagner @ 2011-10-31 13:50 UTC (permalink / raw)
  To: Org Mode Mailing List

Hi,
I make my tiny steps in learning elisp by trying to improve org-mode
for my own needs.
Recently, I came across the needs to execute a small lisp function
whenever I enter the next / previous column in a org-mode table.
I thought it might be interesting if I could try to keep this as
general as possible. Think about calling a certain lisp function
whenever you enter a certain column in a table.
For my needs it would be (set-input-method 'foo) to change
automatically the input method. This would allow to type in two
different languages within the table. However, it could be anything
else, from validating input data, change between different minor modes
or automatic table formatting of the table itself (think about tables
with a fixed narrow column width and an automatic extension of the
current selected column),

I'm still in the middle of implementing this and want to ask
a) is there a general interest for such a feature?
b) for some guidance from the org-mode wizards ;)

I read a bit in org-table.el and there is a function
"org-table-current-column" which does already half of the job.
If I understand right I would have to create a new lisp function which
executes the given lisp snippets for a given column (I would like to
add them like normal table functions).
This new function would been a hook function? As far as I read throw
all possible hook functions, I could not find any which would be
called within tables for each jump into a cell or column.
I thought the tab-function itself (which let the cursor jump into the
next column) might be used. but I am unsure about this. Similar the
present way of tables to execute lisp functions is limited to updates
of the table. However as far as I could understand the simple movement
of the cursor does not trigger an table update.

Any ideas, help and pointers to org-mode code would be nice. For
learning purpose, I really want to go through this by myself, so
please no "add this to your .emacs" stuff ;)

Totti

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-31 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-31 13:50 execute lisp function after enter a cell in a org-table Torsten Wagner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).