Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: Charles Philip Chan <cpchan@bell.net>
Cc: info-gnus-english@gnu.org
Subject: Re: Display attached pdf's with external view, not with doc-view-mode
Date: Fri, 01 Apr 2016 20:33:08 +0300	[thread overview]
Message-ID: <8760w1gror.fsf@iki.fi> (raw)
In-Reply-To: <87k2khgu7w.fsf@bell.net> (Charles Philip Chan's message of "Fri,  01 Apr 2016 12:38:27 -0400")


[-- Attachment #1.1: Type: text/plain, Size: 1038 bytes --]

Charles Philip Chan [2016-04-01 12:38:27-04] wrote:

> This is not a Gnus problem, but Emacs have changed to default to
> docview-mode for pdf files, ignoring mailcap.

Thanks. I hope there's a nice way to completely ignore *-view-mode. I
wrote this but it is quite brutal approach:

(require 'cl-lib)
(require 'mailcap)

(setq mailcap-mime-data
      (mapcar (lambda (major)
                (cons (car major)
                      (cl-remove-if
                       (lambda (minor)
                         (cl-member-if
                          (lambda (v)
                            (cl-member v '(doc-view-mode
                                           pdf-view-mode
                                           view-mode)))
                          (cdr minor)
                          :key 'cdr))
                       (cdr major))))
              mailcap-mime-data))

-- 
/// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]



      reply	other threads:[~2016-04-01 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 15:14 Teemu Likonen
2016-04-01 16:38 ` Charles Philip Chan
2016-04-01 17:33   ` Teemu Likonen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760w1gror.fsf@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=cpchan@bell.net \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).