I have tried this code. I made it as simple as possible to clarify my question.
(defun add-word ()
(interactive)
'(org-table-put (@2 $2 "word!")))
and execute in a buffer having a table already. It did not work at all.
But also I kept wondering what could happen if there are two separate tables in the same buffer? I checked cells with C-c?, then realized that the cell locations are not unique in more than one table. So, there must be a way to identify the table in question.
Thanks again.
soichi
2010/12/3 ishi soichi
<address@hidden>
Thanks for such a quick response!
soichi
2010/12/3 Carsten Dominik
<address@hidden>
Hi Ishi,
On Dec 3, 2010, at 10:00 AM, ishi soichi wrote:
Hi. I'm trying to write an elisp code to enter words into a table of org-mode.
after designating a buffer, which already contains a table, I simply wrote,
'(insert "test!" @2$2)
does not work obviously.
indeed.
Do I need to move the "point" to the particular cell before inserting?
You could to that, using the functions org-table-goto-line and then org-table-goto-column.
However, it is easier to use, for programmatic access to fields, the functions
`org-table-put' and `org-table-get'.
- Carsten