From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jan_B=F6cker?= Subject: Re: How to open pdf file links with evince under linux?.. Date: Tue, 23 Mar 2010 21:44:40 +0100 Message-ID: <4BA92838.1010101@jboecker.de> References: <4e3ad401003230217v78fc1112o5ff1b4fff7468472@mail.gmail.com> 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 1NuAyk-0002T7-H1 for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 16:45:34 -0400 Received: from [140.186.70.92] (port=49507 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuAyi-0002QV-Qr for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 16:45:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuAyg-0005QQ-SF for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 16:45:32 -0400 Received: from mail7.worldserver.net ([217.13.200.27]:44615) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuAyg-0005QC-EY for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 16:45:30 -0400 In-Reply-To: <4e3ad401003230217v78fc1112o5ff1b4fff7468472@mail.gmail.com> 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: Leo Alekseyev Cc: emacs-orgmode@gnu.org 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