@@ -8,16 +8,19 @@ \section{Standard Module \sectcode{mailcap}}
88types. (The name `` mailcap'' is derived from the phrase `` mail
99capability'' .) For example, a mailcap file might contain a line like
1010\samp {video/mpeg; xmpeg \% s}. Then, if the user encounters an email
11- message or Web document with the MIME type video/mpeg, \code {\% s} will be
12- replaced by a filename (usually one belonging to a temporary file) and
13- the xmpeg program can be automatically started to view the file.
11+ message or Web document with the MIME type \mimetype {video/mpeg},
12+ \samp {\% s} will be replaced by a filename (usually one belonging to a
13+ temporary file) and the \program {xmpeg} program can be automatically
14+ started to view the file.
1415
1516The mailcap format is documented in \rfc {1524}, `` A User Agent
1617Configuration Mechanism For Multimedia Mail Format Information,'' but
1718is not an Internet standard. However, mailcap files are supported on
1819most \UNIX {} systems.
1920
20- \begin {funcdesc }{findmatch}{caps, MIMEtype, key, filename, plist}
21+ \begin {funcdesc }{findmatch}{caps, MIMEtype%
22+ \optional {, key\optional {,
23+ filename\optional {, plist}}}}
2124Return a 2-tuple; the first element is a string containing the command
2225line to be executed
2326(which can be passed to \code {os.system()}), and the second element is
@@ -32,9 +35,9 @@ \section{Standard Module \sectcode{mailcap}}
3235existing body data. See \rfc {1524} for a complete list of these
3336fields.
3437
35- \var {filename} is the filename to be substituted for \% s in the
38+ \var {filename} is the filename to be substituted for \samp { \% s} in the
3639command line; the default value is
37- \file { /dev/null} which is almost certainly not what you want, so
40+ \code {' /dev/null' } which is almost certainly not what you want, so
3841usually you'll override it by specifying a filename.
3942
4043\var {plist} can be a list containing named parameters; the default
@@ -43,7 +46,7 @@ \section{Standard Module \sectcode{mailcap}}
4346parameter's value. Mailcap entries can contain
4447named parameters like \code {\%\{ foo\} }, which will be replaced by the
4548value of the parameter named 'foo' . For example, if the command line
46- \samp {showpartial \%\{ id\} \%\{ number\} \%\{ total\} }
49+ \samp {showpartial \%\{ id\}\ \%\{ number\}\ \%\{ total\} }
4750was in a mailcap file, and \var {plist} was set to \code {['id=1',
4851'number=2' , 'total=3' ]}, the resulting command line would be
4952\code {"showpartial 1 2 3"}.
0 commit comments