Gnus development mailing list
 help / color / mirror / Atom feed
* How to change default PDF viewer?
@ 2015-08-25 16:33 Nikolaus Rath
  2015-08-25 16:37 ` Erik Colson
  0 siblings, 1 reply; 7+ messages in thread
From: Nikolaus Rath @ 2015-08-25 16:33 UTC (permalink / raw)
  To: ding

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.«



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to change default PDF viewer?
  2015-08-25 16:33 How to change default PDF viewer? Nikolaus Rath
@ 2015-08-25 16:37 ` Erik Colson
  2015-08-25 18:41   ` Nikolaus Rath
  0 siblings, 1 reply; 7+ messages in thread
From: Erik Colson @ 2015-08-25 16:37 UTC (permalink / raw)
  To: ding

Nikolaus Rath <Nikolaus@rath.org> writes:

> 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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to change default PDF viewer?
  2015-08-25 16:37 ` Erik Colson
@ 2015-08-25 18:41   ` Nikolaus Rath
  2015-08-25 20:14     ` Charles Philip Chan
  2015-08-25 20:28     ` Erik Colson
  0 siblings, 2 replies; 7+ messages in thread
From: Nikolaus Rath @ 2015-08-25 18:41 UTC (permalink / raw)
  To: ding

On Aug 25 2015, Erik Colson <eco@ecocode.net> wrote:
> Nikolaus Rath <Nikolaus@rath.org> writes:
>
>> 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.«



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to change default PDF viewer?
  2015-08-25 18:41   ` Nikolaus Rath
@ 2015-08-25 20:14     ` Charles Philip Chan
  2015-08-26  2:08       ` Nikolaus Rath
  2015-08-25 20:28     ` Erik Colson
  1 sibling, 1 reply; 7+ messages in thread
From: Charles Philip Chan @ 2015-08-25 20:14 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

On 25 Aug 2015, Nikolaus@rath.org wrote:
On Aug 25 2015, Erik Colson <eco@ecocode.net> wrote:
> Nikolaus Rath <Nikolaus@rath.org> writes:
>
>>> 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)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to change default PDF viewer?
  2015-08-25 18:41   ` Nikolaus Rath
  2015-08-25 20:14     ` Charles Philip Chan
@ 2015-08-25 20:28     ` Erik Colson
  2015-08-26  2:06       ` Nikolaus Rath
  1 sibling, 1 reply; 7+ messages in thread
From: Erik Colson @ 2015-08-25 20:28 UTC (permalink / raw)
  To: Nikolaus Rath; +Cc: ding

Nikolaus Rath <Nikolaus@rath.org> writes:

> 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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to change default PDF viewer?
  2015-08-25 20:28     ` Erik Colson
@ 2015-08-26  2:06       ` Nikolaus Rath
  0 siblings, 0 replies; 7+ messages in thread
From: Nikolaus Rath @ 2015-08-26  2:06 UTC (permalink / raw)
  To: ding

On Aug 25 2015, Erik Colson <eco@ecocode.net> wrote:
> Nikolaus Rath <Nikolaus@rath.org> writes:
>
>> 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.«



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to change default PDF viewer?
  2015-08-25 20:14     ` Charles Philip Chan
@ 2015-08-26  2:08       ` Nikolaus Rath
  0 siblings, 0 replies; 7+ messages in thread
From: Nikolaus Rath @ 2015-08-26  2:08 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]

On Aug 25 2015, Charles Philip Chan <cpchan@bell.net> wrote:
> On 25 Aug 2015, Nikolaus@rath.org wrote:
> On Aug 25 2015, Erik Colson <eco@ecocode.net> wrote:
>> Nikolaus Rath <Nikolaus@rath.org> writes:
>>
>>>> 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.

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.«

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 997 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-26  2:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-25 16:33 How to change default PDF viewer? Nikolaus Rath
2015-08-25 16:37 ` Erik Colson
2015-08-25 18:41   ` Nikolaus Rath
2015-08-25 20:14     ` Charles Philip Chan
2015-08-26  2:08       ` Nikolaus Rath
2015-08-25 20:28     ` Erik Colson
2015-08-26  2:06       ` Nikolaus Rath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).