Gnus development mailing list
 help / color / mirror / Atom feed
From: Nikolaus Rath <Nikolaus@rath.org>
To: ding@gnus.org
Subject: Re: How to change default PDF viewer?
Date: Tue, 25 Aug 2015 19:08:53 -0700	[thread overview]
Message-ID: <87r3mq4x8q.fsf@vostro.rath.org> (raw)
In-Reply-To: <87wpwjrurc.fsf@bell.net> (Charles Philip Chan's message of "Tue, 25 Aug 2015 16:14:00 -0400")

[-- 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 --]

  reply	other threads:[~2015-08-26  2:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 16:33 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 [this message]
2015-08-25 20:28     ` Erik Colson
2015-08-26  2:06       ` Nikolaus Rath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3mq4x8q.fsf@vostro.rath.org \
    --to=nikolaus@rath.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).