help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pdf viewer


From: Colin Baxter
Subject: Re: pdf viewer
Date: Sat, 06 Oct 2018 14:22:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

>>>>> Kamil Jońca <kjonca@poczta.onet.pl> 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?

    > 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,
 
Colin Baxter
m43cap@yandex.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]