From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.help Subject: Re: pdf viewer Date: Sat, 06 Oct 2018 14:22:18 +0100 Message-ID: <87h8hzfbw5.fsf@yandex.com> References: <87k1mv78ht.fsf@alfa.kjonca> <87woqvjtxg.fsf@iki.fi> <87va6fjpj3.fsf@alfa.kjonca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1538832058 8691 195.159.176.226 (6 Oct 2018 13:20:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2018 13:20:58 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: , help-gnu-emacs@gnu.org To: kjonca@poczta.onet.pl (Kamil =?utf-8?Q?Jo=C5=84ca?=) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 06 15:20:54 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8mVp-00028Z-LK for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 15:20:53 +0200 Original-Received: from localhost ([::1]:39264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8mXw-0007aE-8M for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 09:23:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8mXT-0007YA-RD for help-gnu-emacs@gnu.org; Sat, 06 Oct 2018 09:22:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8mXR-0007Ef-Jt for help-gnu-emacs@gnu.org; Sat, 06 Oct 2018 09:22:35 -0400 Original-Received: from forward103o.mail.yandex.net ([2a02:6b8:0:1a2d::606]:36841) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8mXM-00079U-ET for help-gnu-emacs@gnu.org; Sat, 06 Oct 2018 09:22:30 -0400 Original-Received: from mxback1g.mail.yandex.net (mxback1g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:162]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 29C345884BA8; Sat, 6 Oct 2018 16:22:21 +0300 (MSK) Original-Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback1g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id qPg8n9Nhxi-MKPunEL0; Sat, 06 Oct 2018 16:22:21 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1538832141; bh=X2W27cS8akJTfcuuqiR0P2vN7N0nHVOM/hLjVItMB2s=; h=From:To:Cc:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=toTq2DrwRc5bm8QWxkoZmUgHMjpQjz8Djcd78XZJfGX6gDeyKEr2XsXIfJBIiIfx2 X+3Dyc6bKVBqsyiEC1xMz45DYIWEAeCzUWJHmxcnzgoEI62CTEDSUQvTqeMKOBBlGc xHxAX9QJAcVlbpF6w/jxhoEvK/EI2rYCsHv5wpgQ= Original-Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 9JAUGWF5EW-MJSKZq2p; Sat, 06 Oct 2018 16:22:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1538832139; bh=X2W27cS8akJTfcuuqiR0P2vN7N0nHVOM/hLjVItMB2s=; h=From:To:Cc:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=v3DfvE+Ru0Dab/UU/+azZy9UCgbjUR4Dv6FxqQGzo5CZtXJUNyXOS2hE0nJ5Yo3vp mjadkvc3oLQIk6dsGIn0wj3XkKvNzbIukY9JPG08A7eOnNDqx4Mwww6R5kRs7QtlZy bX+9MPv6ALXPGPFe36tTM4OAneTTioazSY+nlizY= Authentication-Results: smtp1j.mail.yandex.net; dkim=pass header.i=@yandex.com X-Face: -P+89ASh_wrs;AUGm`!l[}/o-lyK}5W.gq\fkJ{#d6Gu,hWrZNz::iMm5PJb} __A96]-LUrl)X=uF=V|\3-\9/sXvBs/H In-Reply-To: <87va6fjpj3.fsf@alfa.kjonca> ("Kamil \=\?utf-8\?Q\?Jo\=C5\=84ca\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 06 Oct 2018 13:14:08 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAACwAAAAMCAIAAACWSshgAAAABmJLR0QA/wD/AP+gvaeTAAAA dElEQVQ4jcXSwRECMQxDUcvRZnOgDZqjK3pkht3EsbnRgn4Degfh+XqD3XRVTILdj1OISDN6H1qE AXSe4BAavIyVGxlCROXmvj61lxCR63bh/D+28dAeE+0gvJlTifBgxnRAiMiYzPm1SiVi3ayYSoJZ xfwBfw0tWqNuofgAAAAASUVORK5CYII= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:6b8:0:1a2d::606 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118158 Archived-At: >>>>> Kamil Jo=C5=84ca writes: > "Garreau, Alexandre" writes: >> On 2018-10-06 at 12:39, Teemu Likonen wrote: >>> Kamil Jo=C5=84ca [2018-10-06 11:02:54+02] wrote: >>>=20 >>>> For some time emacs view pdf files with its internal >>>> viewer. But I want to keep old behavior - open them with >>>> xpdf/evince How can I do it? >>>=20 >>> You can use mailcap-user-mime-data variable to override the >>> (generated) defaults in mailcap-mime-data: >>>=20 >>> (setq mailcap-user-mime-data '(((type . "application/pdf") >>> (viewer . "evince %s")))) >>=20 >> My emacs uses its internal viewer doc view, and yet I see this in >> my predefined (I didn=E2=80=99t touch it myself) mailcap-user-mime-d= ata: >>=20 >> #+BEGIN_SRC elisp ("pdf" (viewer . "okular '%s'") (type >> . "application/pdf") (test "test" "\"$DISPLAY\"" "!=3D" "\"\"") >> ("nametemplate" . "%s.pdf")) #+END_SRC >>=20 > Are you sure you speak about mailcap-user-mime-data, not > mailcap-mime-data? > I have huge mailcap-mime-data, but mailcap-user-mime-data was > empty/undefined. KJ > -- http://stopstopnop.pl/stop_stopnop.pl_o_nas.html A lie in time > saves nine. You can also use a hook. This works for me: (add-hook 'org-mode-hook '(lambda () (delete '("\\.pdf\\'" . default) org-file-apps) (add-to-list 'org-file-apps '("\\.pdf\\'" . "xpdf %s")))) Best wishes, =20 Colin Baxter m43cap@yandex.com