From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jan_B=F6cker?= Subject: Re: protocol for PDFs? Date: Sat, 02 Jan 2010 16:16:59 +0100 Message-ID: <4B3F636B.20903@jboecker.de> References: <86oclclxlt.fsf@mn.cs.uvic.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NR5pj-0003V8-QE for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 10:24:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NR5pe-0003UY-AR for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 10:24:02 -0500 Received: from [199.232.76.173] (port=52982 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NR5pe-0003UV-4Y for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 10:23:58 -0500 Received: from mail7.worldserver.net ([217.13.200.27]:52856) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NR5pd-0005dk-VO for emacs-orgmode@gnu.org; Sat, 02 Jan 2010 10:23:58 -0500 In-Reply-To: <86oclclxlt.fsf@mn.cs.uvic.ca> 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: dmg@uvic.ca Cc: emacs-orgmode@gnu.org On 02.01.2010 09:28, D M German wrote: > > hi there, > > I am trying to add support in Evince and Xournal for org. I have already > implemented most of it in Xournal, but now I am hitting a roadblock. > What would the form of the URI for a link to a PDF document and a page > be? > > In other words, is there support for a link to a given page in a PDF > already written in org? Hi, I am the author of org-docview.el, which adds support for links to the doc-view-mode of Emacs 23 and is merged in the current master branch of org-mode. It allows you to link to any document format which doc-view-mode supports, which includes PDF files. The syntax is: docview::: Example: [[docview:/home/jan/some-file.pdf::7][Page 7]] Of course, these links open the file by visiting it in emacs. I would propose to modify org-docview.el to look in org-file-apps for an entry for \.pdf\' - If you want to use doc-view-mode to view the PDFs, specify "Visit in Emacs" - If you want to use an external viewer, specify that In the case of an external viewer, org-docview.el would have to know how to pass the page number on to that viewer, maybe replace %p by the page number, then pass that on to org-open-file-from-string. This reminds me again of the fact that docview: links are basically the same as file: links, but instead of specifying a line number, they specify a page number. org-docview.el already uses the file: link functions to do most of the heavy lifting (e.g. to respect org-link-file-path-type). I wonder if this separate syntax for "link to a specific line" and "link to a specific page" is a bad thing, but I also do not want to mess with the core too much. PS: I am very interested in integrating Xournal with Org. I use Xournal for doing all my homework for university; when I have saved the file, I manually add a file: link to my org file. It would be great to store that link directly from Xournal! - Jan