From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Using org-protocol to (org-)capture files for read/review? Date: Sun, 06 Mar 2011 18:52:02 +0100 Message-ID: <87ei6km919.wl%dmaus@ictsoc.de> References: <87r5axsrxc.fsf@hecate.student.uu.se> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Mar__6_18:52:02_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=41327 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwI7k-0001Ki-Lj for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:52:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwI7j-0006wX-Hg for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:52:08 -0500 Received: from mail.app1.xlhost.de ([213.202.242.114]:32825 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwI7j-0006uy-6r for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 12:52:07 -0500 In-Reply-To: <87r5axsrxc.fsf@hecate.student.uu.se> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Albin Stjerna Cc: emacs org-mode mailing list --pgp-sign-Multipart_Sun_Mar__6_18:52:02_2011-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable At Thu, 24 Feb 2011 10:27:59 +0100, Albin Stjerna wrote: >=20 > Hello, notmuch-org! >=20 > 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. >=20 > 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 > =C2=BB* TODO [[file:/path/to/filename.pdf]]=C2=AB) given a run of =C2=BBe= macsclient > org-protocol:/capture:/r/path/to/filename.pdf/=C2=AB. >=20 > 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. > =20 > 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) >=20 > Obviously =C2=BB%c=C2=AB 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.=20 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 --pgp-sign-Multipart_Sun_Mar__6_18:52:02_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EAREIAAYFAk1zycIACgkQma24O1pEeOaPaQEA285V6HdULxbKDkq0zlaLNEfl 88kP+IZd6fVvyB+9j/MBAMdQ9KHPwdOMD2Lx0xqzbJHmQsv9SDQMaYLNWWlXUMj5 =CCwB -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Mar__6_18:52:02_2011-1--