From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Martins Subject: Re: How to open pdf file links with evince under linux?.. Date: Mon, 29 Mar 2010 12:20:49 -0300 Message-ID: <6ac505ad1003290820k2f08b414p3ec678696c3651ef@mail.gmail.com> References: <4e3ad401003230217v78fc1112o5ff1b4fff7468472@mail.gmail.com> <4BA92838.1010101@jboecker.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0987228214==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwGoH-0006wu-Na for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 11:23:25 -0400 Received: from [140.186.70.92] (port=45707 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwGoF-0006Kh-SC for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 11:23:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwGll-00062o-UR for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 11:20:51 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:58177) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwGll-00062k-PZ for emacs-orgmode@gnu.org; Mon, 29 Mar 2010 11:20:49 -0400 Received: by gwj21 with SMTP id 21so9498298gwj.0 for ; Mon, 29 Mar 2010 08:20:49 -0700 (PDT) In-Reply-To: <4BA92838.1010101@jboecker.de> 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: =?ISO-8859-1?Q?Jan_B=F6cker?= Cc: emacs-orgmode@gnu.org, Leo Alekseyev --===============0987228214== Content-Type: multipart/alternative; boundary=001636b2b504d172880482f20e99 --001636b2b504d172880482f20e99 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable well, my values are org-file-apps is a variable defined in `org.el'. Its value is ((auto-mode . emacs) ("\\.x?html?\\'" . default)) which does not help very much since i think is scary to change the auto-mod= e in emacs I have the same annoying problem reported by Jan 2010/3/23 Jan B=F6cker > 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 > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --001636b2b504d172880482f20e99 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable well,

my values are

org-file-apps is a variable defined in `o= rg.el'.
Its value is
((auto-mode . emacs)
=A0("\\.x?html= ?\\'" . default))


which does not help very much since i= think is scary to change the auto-mode in emacs

I have the same annoying problem reported by Jan

2010/3/23 Jan B=F6cker <jan.boecker@jboecker.de>
On 23.03.2010 10:17, Leo Alekseyev wrote:
> When using org mode under windows, links to local PDF files bring up > Acrobat. =A0However, under linux, these links just spawn a new empty > buffer in emacs in fundamental mode. =A0How 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: =A0 =A0 =A0\.pdf\'
Command: =A0 =A0 =A0 =A0evince %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: =A0 =A0 =A0\.pdf::\([0-9]+\)\'
Command: =A0 =A0 =A0 =A0evince %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


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--001636b2b504d172880482f20e99-- --===============0987228214== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0987228214==--