Re: archives and pictures display by default

Subject: Re: archives and pictures display by default

Date: Sat, 07 Jan 2017 09:40:18 -0400

To: Tomas Nordin, notmuch@notmuchmail.org

Cc:

From: David Bremner


David Bremner <david@tethera.net> writes:

> Tomas Nordin <tomasn@posteo.net> writes:
>
>> Hello Notmuchers
>>
>> When I get zip files as attachment with pictures, they all expand for
>> viewing. Can I turn this off?
>>
>> Best regards
>> -- 
>
> I agree this a bad default. I haven't had a chance to investigate much,
> but it seems like the place we can control this is by setting
> mm-inline-media-tests. IIUC, the third element of the alist element is a
> function to test if the part should be inlined. By default this is
> #'identity, which unconditionally inlines zip archives.


The following should override it globally. (e.g. added to .emacs)

(setcdr
 (assoc-default "application/zip" mm-inline-media-tests #'string-match nil)
 (list #'mm-archive-dissect-and-inline (lambda (handle) nil)))

I only tested with "application/zip" replaced by
"application/x-tar-archive", but the principle should be the same.

I'm not really sure the right way of handling this as a default. It's
always a bit tricky with configuration shared with gnus.

signature.asc (application/pgp-signature)

Thread: