archives and pictures display by default

David Bremner david at tethera.net
Sat Jan 7 05:40:18 PST 2017


David Bremner <david at tethera.net> writes:

> Tomas Nordin <tomasn at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 658 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20170107/b5d1cef7/attachment.sig>


More information about the notmuch mailing list