[Top][All Lists]

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

Re: How to NOT use doc-view-mode as mime viewer?

From: Michael Heerdegen
Subject: Re: How to NOT use doc-view-mode as mime viewer?
Date: Fri, 01 Apr 2016 20:39:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Teemu Likonen <address@hidden> writes:

> It seems that Emacs 25 prefers doc-view-mode for displaying various
> contents such as application/pdf mime types. I'd prefer external
> viewers as defined elsewhere in my system (mailcap). I can brutally
> delete every reference to doc-view-mode from mailcap-mime-data
> variable (see the code below) but I'd prefer taking a less brutal
> route. Any ideas?

I wonder that, too.

I came to the same conclusion - this is the hack I use:

#+begin_src emacs-lisp
(with-eval-after-load 'mailcap
  (let* ((apps (cdr (assoc "application" mailcap-mime-data)))
         (to-delete (seq-some (lambda (el) (and (equal (nth 0 el) "pdf")
                                           (equal (nth 1 el) '(viewer . 
    (setq mailcap-mime-data (cons (cons "application" (delq to-delete apps))
                                  (delq apps mailcap-mime-data)))))


reply via email to

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