emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Specify page number in hyperlink [to pdf]


From: Joe Riel
Subject: Re: [Orgmode] Specify page number in hyperlink [to pdf]
Date: Fri, 30 Apr 2010 10:23:06 -0700
User-agent: Thunderbird 2.0.0.24 (X11/20100317)

Nick Dokos wrote:
Joe Riel <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]