From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Riel Subject: Re: Specify page number in hyperlink [to pdf] Date: Thu, 29 Apr 2010 21:27:28 -0700 Message-ID: <4BDA5C30.8090700@san.rr.com> References: <4BD87ED7.5030907@san.rr.com> <4BD9DC70.3090006@jboecker.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7hpA-0000K3-Bc for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 00:27:36 -0400 Received: from [140.186.70.92] (port=50371 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7hp9-0000JV-2X for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 00:27:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7hp7-0005ef-Lw for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 00:27:34 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:55497) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7hp7-0005eP-J7 for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 00:27:33 -0400 In-Reply-To: <4BD9DC70.3090006@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 Jan Böcker wrote: > On 28.04.2010 20:30, Joe Riel wrote: > >> The hyperlink syntax allows specifying a line number, however, >> that doesn't do anything (other than force the document to >> be opened inside of emacs) with a non-text file (say a pdf). >> >> Is therea an extension to allow specifying a page number >> so that a link to a pdf is opened at the specified page? >> > > There is in the current git version, its not yet documented though. > > > Add an entry to the variable org-file-apps like this: > ("\\.pdf::\\([0-9]+\\)\\'" . "evince \"%s\" -p %1") > > Or as seen in the customize interface: > Extension: \.pdf::\([0-9]+\)\' > Command: evince "%s" -p %1 > > The subexpression \([0-9]+\) in the regex captures the page number, > which replaces the %1 in the command string. (This example assumes you > want to open your PDFs with evince, which accepts a page number after > the -p option.) > > You can then reference a specific page of a PDF like this: > [[file:/path/to/document.pdf::42]] > > > Thanks. Just cloned the git and built. This feature does precisely what I want.