[PATCH v2] emacs: show: stop display of application/* parts

Tomas Nordin tomasn at posteo.net
Sun Feb 12 14:53:59 PST 2017


Mark Walters <markwalters1009 at gmail.com> writes:

> Gnus seems to display application/zip and application/tar by
> default. This doesn't seem desirable so we override it.
>
> We only override if the user has not customized
> mm-inline-override-types themselves.

But what will we do if the user has not customized it because she
/wants/ to display all possible things inline. I have not seen that this
patch is merged into master, and probably, when I have learned about
this variable, I think maybe it's better not to do it in the notmuch
code.

I wrote this on on the wiki (on my machine). Is it maybe an option to
have it written down there so it is spoken out, and can be linked to at
next complaint. What do you think, should I push it?

I inserted this as a new level 2 heading under the

    Controlling external handlers for attachements

heading. Is that bad? Maybe it breaks links...

1 file changed, 19 insertions(+)
emacstips.mdwn | 19 +++++++++++++++++++

modified   emacstips.mdwn
@@ -26,6 +26,25 @@ adding a .mailcap file in your home directory. Here is an example:
     application/pdf; /usr/bin/mupdf %s; test=test "$DISPLAY" != ""; description=Portable Document Format; nametemplate=%s.pdf
     application/x-pdf; /usr/bin/mupdf %s; test=test "$DISPLAY" != ""; description=Portable Document Format; nametemplate=%s.pdf
 
+## Overriding inline display of certain attachments
+
+If you are annoyed by notmuch showing large attachments like zip files
+with images, you can override the behavior by setting the
+mm-inline-override-types variable like this:
+
+    (setq mm-inline-override-types
+        (cons "application/zip" mm-inline-override-types))
+
+This will prevent the default display of the mime types specified. If
+you would like to make sure that *no* application-ish attachments
+tries to be displayed, then set the variable like this:
+
+    (setq mm-inline-override-types
+        (cons "application/*" mm-inline-override-types))
+
+Do this in any file that loads when emacs load, like in your `.emacs`
+or `.notmuch` file. Also note that this is an emacs user option.
+
 ## Overwriting the sender address
 
 If you want to always use the same sender address, then the following

Happy mailing
--
Tomas


More information about the notmuch mailing list