[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] How to open pdf file links with evince under linux?..
From: |
Jan Böcker |
Subject: |
Re: [Orgmode] How to open pdf file links with evince under linux?.. |
Date: |
Tue, 23 Mar 2010 21:44:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Shredder/3.0.3 |
On 23.03.2010 10:17, Leo Alekseyev wrote:
> When using org mode under windows, links to local PDF files bring up
> Acrobat. However, under linux, these links just spawn a new empty
> buffer in emacs in fundamental mode. How can I make PDF links bring
> up evince?...
>
As far as I know, Org uses the system defaults when it does not know how
to open a file, and when the system does not know, Org opens the file in
emacs. Under linux, that system default is the mailcap database, but I
have no idea how to configure that. (It doesn't even appear to exist on
my system.)
But we can tell Org directly what to do with PDF files: take a look at
the variable org-file-apps (M-x customize-variable org-file-apps).
Each entry in this list consists of (selector, action) pairs where the
action tells Org how to open a file, and the selector (in most cases a
regular expression matched against the file name) specifies what kind of
files to open in this way.
Add the following entry:
Extension: \.pdf\'
Command: evince %s
Links to PDF files should now open in evince.
If you pull the current git version of Org, you could add a second entry:
Extension: \.pdf::\([0-9]+\)\'
Command: evince %s -p %1
This would allow you to link to a specific page of a PDF like this:
[[file:/path/to/document.pdf::21]]
(Shameless plug for a patch of mine that just got accepted.)
HTH, Jan