mailcap-mime-data

mailcap-mime-data is a variable defined in `mailcap.el'.
Its value is shown below.
  • This variable may be risky if used as a file-local variable.

Documentation:
The mailcap structure is an assoc list of assoc lists.
1st assoc list is keyed on the major content-type
2nd assoc list is keyed on the minor content-type (which can be a regexp)

Which looks like:
-----------------
(("application"
("postscript" . ))
("text"
("plain" . )))

Where is another assoc list of the various information
related to the mailcap RFC 1524. This is keyed on the lowercase
attribute name (viewer, test, etc). This looks like:
((viewer . VIEWERINFO)
(test . TESTINFO)
(xxxx . "STRING")
FLAG)

Where VIEWERINFO specifies how the content-type is viewed. Can be
a string, in which case it is run through a shell, with
appropriate parameters, or a symbol, in which case the symbol is
`funcall'ed, with the buffer as an argument.

TESTINFO is a test for the viewer's applicability, or nil. If nil, it
means the viewer is always valid. If it is a Lisp function, it is
called with a list of items from any extra fields from the
Content-Type header as argument to return a boolean value for the
validity. Otherwise, if it is a non-function Lisp symbol or list
whose car is a symbol, it is `eval'led to yield the validity. If it
is a string or list of strings, it represents a shell command to run
to return a true or false shell value for the validity.

Value:

(("application" ("vnd\\.ms-excel" (viewer . "gnumeric %s") (test getenv "DISPLAY") (type . "application/vnd.ms-excel")) ("x-x509-ca-cert" (viewer . ssl-view-site-cert) (test fboundp 'ssl-view-site-cert) (type . "application/x-x509-ca-cert")) ("x-x509-user-cert" (viewer . ssl-view-user-cert) (test fboundp 'ssl-view-user-cert) (type . "application/x-x509-user-cert")) ("octet-stream" (viewer . mailcap-save-binary-file) (non-viewer . t) (type . "application/octet-stream")) ("dvi" (viewer . "xdvi -safer %s") (test eq window-system 'x) ("needsx11") (type . "application/dvi") ("print" . "dvips -qRP %s")) ("dvi" (viewer . "dvitty %s") (test not (getenv "DISPLAY")) (type . "application/dvi") ("print" . "dvips -qRP %s")) ("emacs-lisp" (viewer . mailcap-maybe-eval) (type . "application/emacs-lisp")) ("x-emacs-lisp" (viewer . mailcap-maybe-eval) (type . "application/x-emacs-lisp")) ("x-tar" (viewer . mailcap-save-binary-file) (non-viewer . t) (type . "application/x-tar")) ("x-latex" (viewer . tex-mode) (test fboundp 'tex-mode) (type . "application/x-latex")) ("x-tex" (viewer . tex-mode) (test fboundp 'tex-mode) (type . "application/x-tex")) ("latex" (viewer . tex-mode) (test fboundp 'tex-mode) (type . "application/latex")) ("tex" (viewer . tex-mode) (test fboundp 'tex-mode) (type . "application/tex")) ("texinfo" (viewer . texinfo-mode) (test fboundp 'texinfo-mode) (type . "application/tex")) ("zip" (viewer . mailcap-save-binary-file) (non-viewer . t) (type . "application/zip") ("copiousoutput")) ("pdf" (viewer . doc-view-mode) (type . "application/pdf") (test eq window-system 'x)) ("pdf" (viewer . "gv -safer %s") (type . "application/pdf") (test . window-system) ("print" . "pdf2ps %s - | lpr")) ("pdf" (viewer . "gpdf %s") (type . "application/pdf") ("print" . "pdftops %s - | lpr") (test eq window-system 'x)) ("pdf" (viewer . "xpdf %s") (type . "application/pdf") ("print" . "pdftops %s - | lpr") (test eq window-system 'x)) ("pdf" (viewer . "pdftotext %s -") (type . "application/pdf") ("print" . "pdftops %s - | lpr") ("copiousoutput")) ("postscript" (viewer . "gv -safer %s") (type . "application/postscript") (test . window-system) ("print" . "lpr %s") ("needsx11")) ("postscript" (viewer . "ghostview -dSAFER %s") (type . "application/postscript") (test eq window-system 'x) ("print" . "lpr %s") ("needsx11")) ("postscript" (viewer . "ps2ascii %s") (type . "application/postscript") (test not (getenv "DISPLAY")) ("print" . "lpr %s") ("copiousoutput")) ("sieve" (viewer . sieve-mode) (test fboundp 'sieve-mode) (type . "application/sieve")) ("pgp-keys" (viewer . "gpg --import --interactive --verbose") (type . "application/pgp-keys") ("needsterminal"))) ("audio" ("x-mpeg" (viewer . "maplay %s") (type . "audio/x-mpeg")) (".*" (viewer . "showaudio") (type . "audio/*"))) ("message" ("rfc-*822" (viewer . mm-view-message) (test and (featurep 'gnus) (gnus-alive-p)) (type . "message/rfc822")) ("rfc-*822" (viewer . vm-mode) (test fboundp 'vm-mode) (type . "message/rfc822")) ("rfc-*822" (viewer . view-mode) (type . "message/rfc822"))) ("image" ("x-xwd" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test eq window-system 'x) ("needsx11")) ("x11-dump" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test eq window-system 'x) ("needsx11")) ("windowdump" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test eq window-system 'x) ("needsx11")) (".*" (viewer . "display %s") (type . "image/*") (test eq window-system 'x) ("needsx11")) (".*" (viewer . "ee %s") (type . "image/*") (test eq window-system 'x) ("needsx11"))) ("text" ("plain" (viewer . view-mode) (test fboundp 'view-mode) (type . "text/plain")) ("plain" (viewer . fundamental-mode) (type . "text/plain")) ("enriched" (viewer . enriched-decode) (test fboundp 'enriched-decode) (type . "text/enriched")) ("dns" (viewer . dns-mode) (test fboundp 'dns-mode) (type . "text/dns"))) ("video" ("mpeg" (viewer . "mpeg_play %s") (type . "video/mpeg") (test eq window-system 'x) ("needsx11"))) ("x-world" ("x-vrml" (viewer . "webspace -remote %s -URL %u") (type . "x-world/x-vrml") ("description" "VRML document"))) ("archive" ("tar" (viewer . tar-mode) (type . "archive/tar") (test fboundp 'tar-mode))))