From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Riel Subject: Re: Specify page number in hyperlink [to pdf] Date: Fri, 30 Apr 2010 10:23:06 -0700 Message-ID: <4BDB11FA.9070105@san.rr.com> References: <4BD87ED7.5030907@san.rr.com> <4BD9DC70.3090006@jboecker.de> <4BDA6005.2080708@san.rr.com> <26943.1272615034@gamaville.dokosmarshall.org> <4BDAE924.3020005@san.rr.com> <15830.1272643394@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7tw4-0001vL-1z for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 13:23:32 -0400 Received: from [140.186.70.92] (port=34088 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7tw2-0001tn-1W for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 13:23:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7tvz-0005yb-In for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 13:23:29 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:40145) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7tvz-0005wQ-DS for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 13:23:27 -0400 In-Reply-To: <15830.1272643394@gamaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org Nick Dokos wrote: > Joe Riel wrote: > > >> That is fine, though I'll apply the patch. There does appear to >> be another bug, or my misunderstanding. That is, even >> without the link, >> >> [[file:/home/joe/sample.pdf]] >> >> does not work properly. That is, clicking on it (mouse 1) >> opens the pdf inside emacs rather than in a standalone pdf reader. >> Previously >> that wasn't the case (if memory serves). Using >> >> [[file:/home/joe/sample.pdf::1]] >> >> for the link opens it in a standalone reader. >> >> >> > > Probably because you have an explicit setting for the latter in > org-file-apps (as Jan suggested) but not for the former. There are many > twisty passages here, but I think that in the end emacs looks at your > mailcap: if it finds no match there then it opens it itself. > > I have > > application/pdf; xpdf -q %s > > in my ~/.mailcap and indeed the link opens in xpdf. > > My /etc/mailcap defines an appropriate application for pdfs. The problem is that I replaced the existing entry for pdf in org-file-apps, so that without the page tag there is no match. Doing (setq org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf::\\([0-9]+\\)\\'" . "evince \"%s\" -p %1") ("\\.pdf\\'" . default) ;; this was the original )) allows links to pdf's without the page tag to open in an external application.