emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] protocol for PDFs?


From: Jan Böcker
Subject: Re: [Orgmode] protocol for PDFs?
Date: Sat, 02 Jan 2010 16:16:59 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091215 Shredder/3.0

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:<file name>::<page number>

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]