Normally org-capture
lets one insert a templated subtree somewhere into an existing Org file or tree node.
Is it possible to use org-capture
to instead add a row to an existing Org-mode table?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityNormally org-capture
lets one insert a templated subtree somewhere into an existing Org file or tree node.
Is it possible to use org-capture
to instead add a row to an existing Org-mode table?
Yes, it is. For example, with this org file:
* my table
| blah | blah |
And this elisp:
(custom-set-variables
'(org-capture-templates
(quote
(("t" "Table" table-line
(file+headline "" "my table")
"|%?| Blah |")))))
I can run org-capture
and it appends a line to the table.
If it doesn't find your org file, you may need to replace the ""
in the file+headline
form with a file path (I don't remember what the ""
defaults to, but it finds my main org-mode file).