From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86131 Path: news.gmane.org!not-for-mail From: Charles Philip Chan Newsgroups: gmane.emacs.gnus.general Subject: Re: How to change default PDF viewer? Date: Tue, 25 Aug 2015 16:14:00 -0400 Message-ID: <87wpwjrurc.fsf@bell.net> References: <871ter9vlt.fsf@thinkpad.rath.org> <87614343eh.fsf@thinkpad.rath.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1440535021 3948 80.91.229.3 (25 Aug 2015 20:37:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2015 20:37:01 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M34365@lists.math.uh.edu Tue Aug 25 22:36:49 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZUKxc-0001Ih-PF for ding-account@gmane.org; Tue, 25 Aug 2015 22:36:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1ZUKxV-00066B-5K; Tue, 25 Aug 2015 15:36:41 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZUKd6-0005xM-MA for ding@lists.math.uh.edu; Tue, 25 Aug 2015 15:15:36 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZUKd5-0000nz-CK for ding@lists.math.uh.edu; Tue, 25 Aug 2015 15:15:36 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1ZUKcj-0002Ut-IJ for ding@gnus.org; Tue, 25 Aug 2015 22:15:21 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZUKci-0007rW-Lm for ding@gnus.org; Tue, 25 Aug 2015 22:15:12 +0200 Original-Received: from toroon017dw-lp140-03-845488900.dsl.bell.ca ([50.101.35.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Aug 2015 22:15:12 +0200 Original-Received: from cpchan by toroon017dw-lp140-03-845488900.dsl.bell.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Aug 2015 22:15:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 61 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: toroon017dw-lp140-03-845488900.dsl.bell.ca X-Face: G;Z,`sm>)4t4LB/GUrgH$W`!AmfHMj,LG)Z}X0ax@s9:0>0)B&@vcm{v-le)wng)?|o]D\Z}0:6X User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:kry2LwUjQSLlGwd+VuGKcmuZ5Zo= X-Spam-Score: -4.2 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86131 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 25 Aug 2015, Nikolaus@rath.org wrote: On Aug 25 2015, Erik Colson wrote: > Nikolaus Rath 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 =2D-=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB =2D-=20 "On a normal ascii line, the only safe condition to detect is a 'BREAK' =2D everything else having been assigned functions by Gnu EMACS." (By Tarl Neustaedter) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlXczIkACgkQ3epPyyKbwPbdMQCfabKKy4cVM0lwzBxiIZlmmW9w 9oIAoJjcMOpy3vAZ/BGgKlA1w64t4QEO =iGuv -----END PGP SIGNATURE----- --=-=-=--