From: Brad Knotwell <bknotwell@yahoo.com>
To: emacs-orgmode@gnu.org
Subject: reliably using org-capture with table-line
Date: Mon, 9 Apr 2018 18:03:28 +0000 (UTC) [thread overview]
Message-ID: <1778945075.862984.1523297008764@mail.yahoo.com> (raw)
In-Reply-To: 1778945075.862984.1523297008764.ref@mail.yahoo.com
[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]
Good day all--
I just found the capture feature and I've set it up for a couple of things but I'm having trouble with table-line. There is some pattern of usage that breaks it and (despite numerous trials) I can't find the magic that makes it work reliably. I have a definition like the following (usecase: add a row every time off request is approved):
("Tp" "PTO" table-line (file "~/notes/pto.org") "| %(read-string \"Who: \") | %(org-read-date nil nil nil \"Start:\") | %(org-read-date nil nil nil \"End:\") |" :kill-buffer t)
I'm trying to create a table like the following:
| *Who* | *Start* | *End* ||---------+------------+------------|| | | || Larry | 2018-04-12 | 2018-04-16 || Curly | 2018-04-09 | 2018-04-13 || Moe | 2018-04-13 | 2018-04-20 |
It sort of works. If I start without a table, it'll create the first row (sans headers) fine. Likewise, I can add a rows to the table and that seems to be stable. However, if I edit the file in some way, it's likely (not always as far as I can tell) that the next entry is written as a new single-row table which indicates org-capture.el:org-capture-place-table-line couldn't find the first table in the file. Furthermore, when I save the capture, I'll get an error message "Capture process aborted, but target buffer could not be cleaned up correctly."
Finally, I've read the documentation for :table-line-pos numerous times and still don't know what it does.
Since the second table it added to the file, I can workaround this by hand-merging the two tables occasionally.
Now that I've described all this, my question: how do others reliably use this feature?
Thx.
--Brad
[-- Attachment #2: Type: text/html, Size: 2427 bytes --]
parent reply other threads:[~2018-04-09 18:03 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1778945075.862984.1523297008764.ref@mail.yahoo.com>]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1778945075.862984.1523297008764@mail.yahoo.com \
--to=bknotwell@yahoo.com \
--cc=emacs-orgmode@gnu.org \
/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 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).