emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Using org-protocol to (org-)capture files for read/review?
@ 2011-02-24  9:27 Albin Stjerna
  2011-03-06 17:52 ` David Maus
  0 siblings, 1 reply; 2+ messages in thread
From: Albin Stjerna @ 2011-02-24  9:27 UTC (permalink / raw)
  To: emacs org-mode mailing list

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?

Thanks in advance,
  Albin

PS. Sorry if I've insufficiently R:d TFM, but I really did try.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using org-protocol to (org-)capture files for read/review?
  2011-02-24  9:27 Using org-protocol to (org-)capture files for read/review? Albin Stjerna
@ 2011-03-06 17:52 ` David Maus
  0 siblings, 0 replies; 2+ messages in thread
From: David Maus @ 2011-03-06 17:52 UTC (permalink / raw)
  To: Albin Stjerna; +Cc: emacs org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 2049 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-06 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24  9:27 Using org-protocol to (org-)capture files for read/review? Albin Stjerna
2011-03-06 17:52 ` David Maus

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).