At Thu, 24 Feb 2011 10:27:59 +0100, Albin Stjerna wrote: > > Hello, notmuch-org! > > I'm using org-mode to structure most of my life, but I haven't been able > to incorporate my list of PDFs (or other documents) to read/review in > org-mode, so currently I'm just putting them in ~/read-review. > > However, I thought I'd use org-protocol and emacsclient to add links to > these files to org-mode, but I'm unable to figure out how to do it. I'd > like to map the full path to a file, and then have that file appended to > a plain list in a given org file with the TODO tag set (something like > »* TODO [[file:/path/to/filename.pdf]]«) given a run of »emacsclient > org-protocol:/capture:/r/path/to/filename.pdf/«. > > I can then implement pushing to my read/review stack with a simple shell > command that a) moves the new file to ~/read-review and b) adds a link > to the file on my org-mode read/review stack using the above mentioned > emacsclient command. > > So far, I've tried adding the following to org-capture-templates: > ("r" "read/review" entry (file "~/org/read-review.org") > "* TODO read %c" > :immediate-finish t) > > Obviously »%c« wrong here -- but what should I replace it with? C-h v org-capture-templates RET ... The template defines the text to be inserted. Often this is an org-mode entry (so the first line should start with a star) that will be filed as a child of the target headline. It can also be freely formatted text. Furthermore, the following %-escapes will be replaced with content: ... %a annotation, normally the link created with `org-store-link' ... So %a inserts the link. However, for your function to work properly you need to percent escape the slashes in /path/to/file as org capture uses the slash to separate the different link components. "Percent escaping" is the same es "URL Encoding", e.g. there should be something for your shell and/or preferred application to fire capture. Best, -- David