[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pdf viewer
From: |
Ben Bacarisse |
Subject: |
Re: pdf viewer |
Date: |
Sun, 07 Oct 2018 01:12:38 +0100 |
kjonca@poczta.onet.pl (Kamil Jońca) writes:
> "Garreau, Alexandre" <galex-713@galex-713.eu> writes:
>
>> On 2018-10-06 at 12:39, Teemu Likonen wrote:
>>> Kamil Jońca [2018-10-06 11:02:54+02] wrote:
>>>
>>>> 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?
>>>
>>> You can use mailcap-user-mime-data variable to override the (generated)
>>> defaults in mailcap-mime-data:
>>>
>>> (setq mailcap-user-mime-data
>>> '(((type . "application/pdf")
>>> (viewer . "evince %s"))))
>>
>> My emacs uses its internal viewer doc view, and yet I see this in my
>> predefined (I didn’t touch it myself) mailcap-user-mime-data:
>>
>> #+BEGIN_SRC elisp
>> ("pdf"
>> (viewer . "okular '%s'")
>> (type . "application/pdf")
>> (test "test" "\"$DISPLAY\"" "!=" "\"\"")
>> ("nametemplate" . "%s.pdf"))
>> #+END_SRC
>>
> Are you sure you speak about mailcap-user-mime-data, not
> mailcap-mime-data?
Part of the trouble is that mailcap.el defines a sort function that
favours symbols over strings. As a result, no matter what viewer
command you have, 'doc-view-mode will win out.
I have used a temporary fix which is to have
(require 'mailcap)
(setq mailcap-mime-data nil)
(mailcap-parse-mailcaps nil t)
in .emacs. This is a crude fix, but it works for the time being.
I started a thread about this a few days ago in comp.emacs and there
have been some other ideas along the line of code to pickout the
'doc-view-mode a-list entries.
--
Ben.
- pdf viewer, Kamil Jońca, 2018/10/06
- Re: pdf viewer, Teemu Likonen, 2018/10/06
- Re: pdf viewer, Garreau, Alexandre, 2018/10/06
- Message not available
- Re: pdf viewer, Kamil Jońca, 2018/10/06
- Re: pdf viewer, Garreau, Alexandre, 2018/10/06
- Re: pdf viewer, Colin Baxter, 2018/10/06
- Re: pdf viewer,
Ben Bacarisse <=
- Re: pdf viewer, Michael Heerdegen, 2018/10/07
Message not available
Re: pdf viewer, Marcin Borkowski, 2018/10/06
Message not available