emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: Albin Stjerna <albin.stjerna@gmail.com>
Cc: emacs org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Using org-protocol to (org-)capture files for read/review?
Date: Sun, 06 Mar 2011 18:52:02 +0100	[thread overview]
Message-ID: <87ei6km919.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <87r5axsrxc.fsf@hecate.student.uu.se>

[-- 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 --]

      reply	other threads:[~2011-03-06 17:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24  9:27 Using org-protocol to (org-)capture files for read/review? Albin Stjerna
2011-03-06 17:52 ` David Maus [this message]

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=87ei6km919.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=albin.stjerna@gmail.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).