mm-inline-media-tests
¶This is an alist where the key is a MIME type, the second element
is a function to display the part inline (i.e., inside Emacs), and
the third element is a form to be eval
ed to say whether the part
can be displayed inline.
This variable specifies whether a part can be displayed inline, and, if so, how to do it. It does not say whether parts are actually displayed inline.
mm-inlined-types
¶This, on the other hand, says what types are to be displayed inline, if they satisfy the conditions set by the variable above. It’s a list of MIME media types.
mm-automatic-display
¶This is a list of types that are to be displayed “automatically”, but only if the above variable allows it. That is, only inlinable parts can be displayed automatically.
mm-automatic-external-display
¶This is a list of types that will be displayed automatically in an external viewer.
mm-keep-viewer-alive-types
¶This is a list of media types for which the external viewer will not be killed when selecting a different article.
mm-attachment-override-types
¶Some MIME agents create parts that have a content-disposition of ‘attachment’. This variable allows overriding that disposition and displaying the part inline. (Note that the disposition is only overridden if we are able to, and want to, display the part inline.)
mm-discouraged-alternatives
¶List of MIME types that are discouraged when viewing ‘multipart/alternative’. Viewing agents are supposed to view the last possible part of a message, as that is supposed to be the richest. However, users may prefer other types instead, and this list says what types are most unwanted. If, for instance, ‘text/html’ parts are very unwanted, and ‘text/richtext’ parts are somewhat unwanted, you could say something like:
(setq mm-discouraged-alternatives '("text/html" "text/richtext") mm-automatic-display (remove "text/html" mm-automatic-display))
Adding "image/.*"
might also be useful. Spammers use images as
the preferred part of ‘multipart/alternative’ messages, so you might
not notice there are other parts. See also
gnus-buttonized-mime-types
, MIME Commands in Gnus Manual. After adding "multipart/alternative"
to
gnus-buttonized-mime-types
you can choose manually which
alternative you’d like to view. For example, you can set those
variables like:
(setq gnus-buttonized-mime-types '("multipart/alternative" "multipart/signed") mm-discouraged-alternatives '("text/html" "image/.*"))
In this case, Gnus will display radio buttons for such a kind of spam message as follows:
1. (*) multipart/alternative ( ) image/gif 2. (*) text/plain ( ) text/html
mm-inline-large-images
¶This variable is resize
by default, which means that images
that are bigger than the Emacs window are resized so that they fit.
If you set this to nil
, large images are not displayed in
Emacs, but can instead be displayed externally (e.g., with
‘ImageMagick’ or ‘xv’). Setting this variable to t
disables this check and makes the library display all inline images as
inline, regardless of their size.
mm-inline-large-images-proportion
¶The proportion used when resizing large images.
mm-inline-override-types
¶mm-inlined-types
may include regular expressions, for example to
specify that all ‘text/.*’ parts be displayed inline. If a user
prefers to have a type that matches such a regular expression be treated
as an attachment, that can be accomplished by setting this variable to a
list containing that type. For example assuming mm-inlined-types
includes ‘text/.*’, then including ‘text/html’ in this
variable will cause ‘text/html’ parts to be treated as attachments.
mm-text-html-renderer
¶This selects the function used to render HTML. The
predefined renderers are selected by the symbols shr
,
gnus-w3m
, w3m
1, links
, lynx
, or w3m-standalone
. You
can also specify a function, which will be called with a
MIME handle as the argument.
mm-html-inhibit-images
¶If this is non-nil
, inhibit displaying of images inline in the
article body. It is effective to images in HTML articles
rendered when mm-text-html-renderer
(see Display Customization) is shr
or w3m
. In Gnus, this is
overridden by the value of gnus-inhibit-images
(see Misc Article in Gnus manual). The default is nil
.
mm-html-blocked-images
¶External images that have URLs that match this regexp won’t be fetched and displayed. For instance, to block all URLs that have the string “ads” in them, do the following:
(setq mm-html-blocked-images "ads")
It is effective when mm-text-html-renderer
(see Display Customization) is shr
. In Gnus, this is overridden by the value
of gnus-blocked-images
or the return value of the function that
gnus-blocked-images
is set to (see HTML in Gnus
manual).
Some HTML mails might have the trick of spammers using
‘<img>’ tags. It is likely to be intended to verify whether you
have read the mail. You can prevent your personal information from
leaking by setting this option to ""
(which is the default).
mm-w3m-safe-url-regexp
¶A regular expression that matches safe URL names, i.e., URLs that are
unlikely to leak personal information when rendering HTML
email (the default value is ‘\\`cid:’). If nil
consider
all URLs safe. In Gnus, this will be overridden according to the value
of the variable gnus-safe-html-newsgroups
, See Various Various in Gnus Manual.
mm-inline-text-html-with-w3m-keymap
¶You can use emacs-w3m command keys in the inlined text/html part by
setting this option to non-nil
. The default value is t
.
mm-external-terminal-program
¶This should be a list of strings; typically something like ‘("xterm" "-e")’ or ‘("gnome-terminal" "--")’.
mm-enable-external
¶Indicate whether external MIME handlers should be used.
If t
, all defined external MIME handlers are used. If
nil
, files are saved to disk (mailcap-save-binary-file
).
If it is the symbol ask
, you are prompted before the external
MIME handler is invoked.
When you launch an attachment through mailcap (see mailcap) an
attempt is made to use a safe viewer with the safest options—this isn’t
the case if you save it to disk and launch it in a different way
(command line or double-clicking). Anyhow, if you want to be sure not
to launch any external programs, set this variable to nil
or
ask
.
mm-inline-font-lock
¶If non-nil
, inlined parts that support font locking (for
instance, patches or code snippets) will be font-locked. This may be
overridden by callers that have their own ways of enabling/inhibiting
font locking.