Discussion:
How to change default PDF viewer?
Nikolaus Rath
2015-08-25 16:33:02 UTC
Permalink
Hello,

Can someone tell me how to change the default PDF viewer from Emacs' new
internal document viewer to an external program?

Thanks,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«
Erik Colson
2015-08-25 16:37:57 UTC
Permalink
Post by Nikolaus Rath
Can someone tell me how to change the default PDF viewer from Emacs' new
internal document viewer to an external program?
which OS are you on ?
--
erik colson
Nikolaus Rath
2015-08-25 18:41:10 UTC
Permalink
Post by Erik Colson
Post by Nikolaus Rath
Can someone tell me how to change the default PDF viewer from Emacs' new
internal document viewer to an external program?
which OS are you on ?
Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)


Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«
Erik Colson
2015-08-25 20:28:10 UTC
Permalink
Post by Nikolaus Rath
Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
on linux emacs reads the user .mailcap file.
you should define which program you want to use in it.

best
--
erik colson
Nikolaus Rath
2015-08-26 02:06:55 UTC
Permalink
Post by Erik Colson
Post by Nikolaus Rath
Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
on linux emacs reads the user .mailcap file.
The mailcap file defines *external* viewers. My problem is that
Gnu/emacs is using its *internal* viewer, and *not* an external one.


Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«
Charles Philip Chan
2015-08-25 20:14:00 UTC
Permalink
Post by Nikolaus Rath
Post by Nikolaus Rath
Post by Nikolaus Rath
Can someone tell me how to change the default PDF viewer from Emacs' new
internal document viewer to an external program?
which OS are you on ?
Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
I had the same issue. The problem these days is that Emacs favours a
Lisp based reader (doc-view, in this case) to whatever is define in
mailcap. I googled the problem and this is the solution I found that
works. For example, I have define Okular as the pdf reader in mailcap:

#+BEGIN_SRC emacs-lisp
;;Remove doc-view so pdf will open with Okular
(setcdr
(assoc "application" mailcap-mime-data)
(remove '("pdf"
(viewer . doc-view-mode)
(type . "application/pdf")
(test eq window-system 'x))
(cdr (assoc "application" mailcap-mime-data))))
#+END_SRC

Just cut and paste what is between BEGIN_SRC and END_SRC and put it in
your init file.

Charles
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«
--
"On a normal ascii line, the only safe condition to detect is a 'BREAK'
- everything else having been assigned functions by Gnu EMACS."
(By Tarl Neustaedter)
Nikolaus Rath
2015-08-26 02:08:53 UTC
Permalink
Post by Charles Philip Chan
Post by Nikolaus Rath
Post by Nikolaus Rath
Post by Nikolaus Rath
Can someone tell me how to change the default PDF viewer from Emacs' new
internal document viewer to an external program?
which OS are you on ?
Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
I had the same issue. The problem these days is that Emacs favours a
Lisp based reader (doc-view, in this case) to whatever is define in
mailcap. I googled the problem and this is the solution I found that
#+BEGIN_SRC emacs-lisp
;;Remove doc-view so pdf will open with Okular
(setcdr
(assoc "application" mailcap-mime-data)
(remove '("pdf"
(viewer . doc-view-mode)
(type . "application/pdf")
(test eq window-system 'x))
(cdr (assoc "application" mailcap-mime-data))))
#+END_SRC
Just cut and paste what is between BEGIN_SRC and END_SRC and put it in
your init file.
Works perfectly! Thanks a bunch!

Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

»Time flies like an arrow, fruit flies like a Banana.«
Loading...