annotate man/emacs-mime.texi @ 32026:57c841880df2

*** empty log message ***
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 29 Sep 2000 22:21:30 +0000
parents a0a62e1e3675
children 56bb657c0878
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31853
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
2
32008
a0a62e1e3675 Fix the @setfilename directive.
Eli Zaretskii <eliz@gnu.org>
parents: 31855
diff changeset
3 @setfilename ../info/emacs-mime
31853
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
4 @settitle Emacs MIME Manual
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
5 @synindex fn cp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
6 @synindex vr cp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
7 @synindex pg cp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
8 @dircategory Editors
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
9 @direntry
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
10 * Emacs MIME: (emacs-mime). The MIME de/composition library.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
11 @end direntry
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
12 @iftex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
13 @finalout
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
14 @end iftex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
15 @setchapternewpage odd
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
16
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
17 @ifnottex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
18
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
19 This file documents the Emacs MIME interface functionality.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
20
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
21 Copyright (C) 1998,99,2000 Free Software Foundation, Inc.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
22
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
23 Permission is granted to copy, distribute and/or modify this document
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
24 under the terms of the GNU Free Documentation License, Version 1.1 or
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
25 any later version published by the Free Software Foundation; with the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
26 Invariant Sections being none, with the Front-Cover texts being ``A GNU
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
27 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
28 license is included in the section entitled ``GNU Free Documentation
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
29 License''.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
30
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
31 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
32 this GNU Manual, like GNU software. Copies published by the Free
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
33 Software Foundation raise funds for GNU development.''
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
34 @end ifnottex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
35
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
36 @tex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
37
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
38 @titlepage
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
39 @title Emacs MIME Manual
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
40
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
41 @author by Lars Magne Ingebrigtsen
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
42 @page
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
43
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
44 @vskip 0pt plus 1filll
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
45 Copyright @copyright{} 1998,99,2000 Free Software Foundation, Inc.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
46
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
47 Permission is granted to copy, distribute and/or modify this document
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
48 under the terms of the GNU Free Documentation License, Version 1.1 or
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
49 any later version published by the Free Software Foundation; with the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
50 Invariant Sections being none, with the Front-Cover texts being ``A GNU
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
51 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
52 license is included in the section entitled ``GNU Free Documentation
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
53 License''.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
54
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
55 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
56 this GNU Manual, like GNU software. Copies published by the Free
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
57 Software Foundation raise funds for GNU development.''
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
58 @end titlepage
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
59 @page
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
60
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
61 @end tex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
62
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
63 @node Top
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
64 @top Emacs MIME
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
65
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
66 This manual documents the libraries used to compose and display
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
67 @sc{mime} messages.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
68
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
69 This is not a manual meant for users; it's a manual directed at people
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
70 who want to write functions and commands that manipulate @sc{mime}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
71 elements.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
72
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
73 @sc{mime} is short for @dfn{Multipurpose Internet Mail Extensions}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
74 This standard is documented in a number of RFCs; mainly RFC2045 (Format
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
75 of Internet Message Bodies), RFC2046 (Media Types), RFC2047 (Message
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
76 Header Extensions for Non-ASCII Text), RFC2048 (Registration
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
77 Procedures), RFC2049 (Conformance Criteria and Examples). It is highly
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
78 recommended that anyone who intends writing @sc{mime}-compliant software
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
79 read at least RFC2045 and RFC2047.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
80
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
81 @menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
82 * Interface Functions:: An abstraction over the basic functions.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
83 * Basic Functions:: Utility and basic parsing functions.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
84 * Decoding and Viewing:: A framework for decoding and viewing.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
85 * Composing:: MML; a language for describing MIME parts.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
86 * Standards:: A summary of RFCs and working documents used.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
87 * Index:: Function and variable index.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
88 @end menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
89
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
90
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
91 @node Interface Functions
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
92 @chapter Interface Functions
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
93 @cindex interface functions
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
94 @cindex mail-parse
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
95
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
96 The @code{mail-parse} library is an abstraction over the actual
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
97 low-level libraries that are described in the next chapter.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
98
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
99 Standards change, and so programs have to change to fit in the new
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
100 mold. For instance, RFC2045 describes a syntax for the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
101 @code{Content-Type} header that only allows ASCII characters in the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
102 parameter list. RFC2231 expands on RFC2045 syntax to provide a scheme
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
103 for continuation headers and non-ASCII characters.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
104
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
105 The traditional way to deal with this is just to update the library
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
106 functions to parse the new syntax. However, this is sometimes the wrong
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
107 thing to do. In some instances it may be vital to be able to understand
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
108 both the old syntax as well as the new syntax, and if there is only one
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
109 library, one must choose between the old version of the library and the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
110 new version of the library.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
111
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
112 The Emacs MIME library takes a different tack. It defines a series of
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
113 low-level libraries (@file{rfc2047.el}, @file{rfc2231.el} and so on)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
114 that parses strictly according to the corresponding standard. However,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
115 normal programs would not use the functions provided by these libraries
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
116 directly, but instead use the functions provided by the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
117 @code{mail-parse} library. The functions in this library are just
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
118 aliases to the corresponding functions in the latest low-level
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
119 libraries. Using this scheme, programs get a consistent interface they
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
120 can use, and library developers are free to create write code that
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
121 handles new standards.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
122
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
123 The following functions are defined by this library:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
124
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
125 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
126 @item mail-header-parse-content-type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
127 @findex mail-header-parse-content-type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
128 Parse a @code{Content-Type} header and return a list on the following
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
129 format:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
130
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
131 @lisp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
132 ("type/subtype"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
133 (attribute1 . value1)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
134 (attribute2 . value2)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
135 ...)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
136 @end lisp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
137
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
138 Here's an example:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
139
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
140 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
141 (mail-header-parse-content-type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
142 "image/gif; name=\"b980912.gif\"")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
143 @result{} ("image/gif" (name . "b980912.gif"))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
144 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
145
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
146 @item mail-header-parse-content-disposition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
147 @findex mail-header-parse-content-disposition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
148 Parse a @code{Content-Disposition} header and return a list on the same
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
149 format as the function above.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
150
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
151 @item mail-content-type-get
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
152 @findex mail-content-type-get
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
153 Takes two parameters---a list on the format above, and an attribute.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
154 Returns the value of the attribute.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
155
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
156 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
157 (mail-content-type-get
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
158 '("image/gif" (name . "b980912.gif")) 'name)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
159 @result{} "b980912.gif"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
160 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
161
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
162 @item mail-header-encode-parameter
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
163 @findex mail-header-encode-parameter
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
164 Takes a parameter string and returns an encoded version of the string.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
165 This is used for parameters in headers like @code{Content-Type} and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
166 @code{Content-Disposition}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
167
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
168 @item mail-header-remove-comments
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
169 @findex mail-header-remove-comments
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
170 Return a comment-free version of a header.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
171
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
172 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
173 (mail-header-remove-comments
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
174 "Gnus/5.070027 (Pterodactyl Gnus v0.27) (Finnish Landrace)")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
175 @result{} "Gnus/5.070027 "
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
176 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
177
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
178 @item mail-header-remove-whitespace
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
179 @findex mail-header-remove-whitespace
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
180 Remove linear white space from a header. Space inside quoted strings
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
181 and comments is preserved.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
182
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
183 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
184 (mail-header-remove-whitespace
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
185 "image/gif; name=\"Name with spaces\"")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
186 @result{} "image/gif;name=\"Name with spaces\""
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
187 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
188
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
189 @item mail-header-get-comment
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
190 @findex mail-header-get-comment
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
191 Return the last comment in a header.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
192
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
193 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
194 (mail-header-get-comment
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
195 "Gnus/5.070027 (Pterodactyl Gnus v0.27) (Finnish Landrace)")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
196 @result{} "Finnish Landrace"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
197 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
198
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
199 @item mail-header-parse-address
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
200 @findex mail-header-parse-address
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
201 Parse an address and return a list containing the mailbox and the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
202 plaintext name.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
203
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
204 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
205 (mail-header-parse-address
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
206 "Hrvoje Niksic <hniksic@@srce.hr>")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
207 @result{} ("hniksic@@srce.hr" . "Hrvoje Niksic")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
208 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
209
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
210 @item mail-header-parse-addresses
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
211 @findex mail-header-parse-addresses
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
212 Parse a string with list of addresses and return a list of elements like
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
213 the one described above.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
214
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
215 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
216 (mail-header-parse-addresses
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
217 "Hrvoje Niksic <hniksic@@srce.hr>, Steinar Bang <sb@@metis.no>")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
218 @result{} (("hniksic@@srce.hr" . "Hrvoje Niksic")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
219 ("sb@@metis.no" . "Steinar Bang"))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
220 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
221
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
222 @item mail-header-parse-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
223 @findex mail-header-parse-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
224 Parse a date string and return an Emacs time structure.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
225
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
226 @item mail-narrow-to-head
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
227 @findex mail-narrow-to-head
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
228 Narrow the buffer to the header section of the buffer. Point is placed
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
229 at the beginning of the narrowed buffer.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
230
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
231 @item mail-header-narrow-to-field
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
232 @findex mail-header-narrow-to-field
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
233 Narrow the buffer to the header under point.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
234
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
235 @item mail-encode-encoded-word-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
236 @findex mail-encode-encoded-word-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
237 Encode the non-ASCII words in the region. For instance,
32008
a0a62e1e3675 Fix the @setfilename directive.
Eli Zaretskii <eliz@gnu.org>
parents: 31855
diff changeset
238 @samp{Nave} is encoded as @samp{=?iso-8859-1?q?Na=EFve?=}.
31853
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
239
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
240 @item mail-encode-encoded-word-buffer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
241 @findex mail-encode-encoded-word-buffer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
242 Encode the non-ASCII words in the current buffer. This function is
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
243 meant to be called narrowed to the headers of a message.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
244
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
245 @item mail-encode-encoded-word-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
246 @findex mail-encode-encoded-word-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
247 Encode the words that need encoding in a string, and return the result.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
248
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
249 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
250 (mail-encode-encoded-word-string
32008
a0a62e1e3675 Fix the @setfilename directive.
Eli Zaretskii <eliz@gnu.org>
parents: 31855
diff changeset
251 "This is nave, baby")
31853
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
252 @result{} "This is =?iso-8859-1?q?na=EFve,?= baby"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
253 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
254
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
255 @item mail-decode-encoded-word-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
256 @findex mail-decode-encoded-word-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
257 Decode the encoded words in the region.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
258
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
259 @item mail-decode-encoded-word-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
260 @findex mail-decode-encoded-word-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
261 Decode the encoded words in the string and return the result.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
262
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
263 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
264 (mail-decode-encoded-word-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
265 "This is =?iso-8859-1?q?na=EFve,?= baby")
32008
a0a62e1e3675 Fix the @setfilename directive.
Eli Zaretskii <eliz@gnu.org>
parents: 31855
diff changeset
266 @result{} "This is nave, baby"
31853
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
267 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
268
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
269 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
270
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
271 Currently, @code{mail-parse} is an abstraction over @code{ietf-drums},
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
272 @code{rfc2047}, @code{rfc2045} and @code{rfc2231}. These are documented
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
273 in the subsequent sections.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
274
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
275
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
276
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
277 @node Basic Functions
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
278 @chapter Basic Functions
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
279
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
280 This chapter describes the basic, ground-level functions for parsing and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
281 handling. Covered here is parsing @code{From} lines, removing comments
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
282 from header lines, decoding encoded words, parsing date headers and so
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
283 on. High-level functionality is dealt with in the next chapter
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
284 (@pxref{Decoding and Viewing}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
285
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
286 @menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
287 * rfc2045:: Encoding @code{Content-Type} headers.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
288 * rfc2231:: Parsing @code{Content-Type} headers.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
289 * ietf-drums:: Handling mail headers defined by RFC822bis.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
290 * rfc2047:: En/decoding encoded words in headers.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
291 * time-date:: Functions for parsing dates and manipulating time.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
292 * qp:: Quoted-Printable en/decoding.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
293 * base64:: Base64 en/decoding.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
294 * binhex:: Binhex decoding.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
295 * uudecode:: Uuencode decoding.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
296 * rfc1843:: Decoding HZ-encoded text.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
297 * mailcap:: How parts are displayed is specified by the @file{.mailcap} file
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
298 @end menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
299
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
300
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
301 @node rfc2045
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
302 @section rfc2045
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
303
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
304 RFC2045 is the ``main'' @sc{mime} document, and as such, one would
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
305 imagine that there would be a lot to implement. But there isn't, since
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
306 most of the implementation details are delegated to the subsequent
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
307 RFCs.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
308
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
309 So @file{rfc2045.el} has only a single function:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
310
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
311 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
312 @item rfc2045-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
313 @findex rfc2045-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
314 Takes a parameter and a value and returns a @samp{PARAM=VALUE} string.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
315 @var{value} will be quoted if there are non-safe characters in it.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
316 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
317
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
318
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
319 @node rfc2231
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
320 @section rfc2231
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
321
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
322 RFC2231 defines a syntax for the @code{Content-Type} and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
323 @code{Content-Disposition} headers. Its snappy name is @dfn{MIME
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
324 Parameter Value and Encoded Word Extensions: Character Sets, Languages,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
325 and Continuations}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
326
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
327 In short, these headers look something like this:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
328
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
329 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
330 Content-Type: application/x-stuff;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
331 title*0*=us-ascii'en'This%20is%20even%20more%20;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
332 title*1*=%2A%2A%2Afun%2A%2A%2A%20;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
333 title*2="isn't it!"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
334 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
335
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
336 They usually aren't this bad, though.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
337
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
338 The following functions are defined by this library:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
339
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
340 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
341 @item rfc2231-parse-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
342 @findex rfc2231-parse-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
343 Parse a @code{Content-Type} header and return a list describing its
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
344 elements.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
345
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
346 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
347 (rfc2231-parse-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
348 "application/x-stuff;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
349 title*0*=us-ascii'en'This%20is%20even%20more%20;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
350 title*1*=%2A%2A%2Afun%2A%2A%2A%20;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
351 title*2=\"isn't it!\"")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
352 @result{} ("application/x-stuff"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
353 (title . "This is even more ***fun*** isn't it!"))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
354 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
355
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
356 @item rfc2231-get-value
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
357 @findex rfc2231-get-value
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
358 Takes one of the lists on the format above and returns
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
359 the value of the specified attribute.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
360
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
361 @item rfc2231-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
362 @findex rfc2231-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
363 Encode a parameter in headers likes @code{Content-Type} and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
364 @code{Content-Disposition}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
365
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
366 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
367
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
368
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
369 @node ietf-drums
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
370 @section ietf-drums
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
371
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
372 @dfn{drums} is an IETF working group that is working on the replacement
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
373 for RFC822.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
374
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
375 The functions provided by this library include:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
376
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
377 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
378 @item ietf-drums-remove-comments
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
379 @findex ietf-drums-remove-comments
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
380 Remove the comments from the argument and return the results.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
381
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
382 @item ietf-drums-remove-whitespace
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
383 @findex ietf-drums-remove-whitespace
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
384 Remove linear white space from the string and return the results.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
385 Spaces inside quoted strings and comments are left untouched.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
386
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
387 @item ietf-drums-get-comment
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
388 @findex ietf-drums-get-comment
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
389 Return the last most comment from the string.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
390
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
391 @item ietf-drums-parse-address
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
392 @findex ietf-drums-parse-address
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
393 Parse an address string and return a list that contains the mailbox and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
394 the plain text name.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
395
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
396 @item ietf-drums-parse-addresses
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
397 @findex ietf-drums-parse-addresses
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
398 Parse a string that contains any number of comma-separated addresses and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
399 return a list that contains mailbox/plain text pairs.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
400
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
401 @item ietf-drums-parse-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
402 @findex ietf-drums-parse-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
403 Parse a date string and return an Emacs time structure.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
404
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
405 @item ietf-drums-narrow-to-header
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
406 @findex ietf-drums-narrow-to-header
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
407 Narrow the buffer to the header section of the current buffer.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
408
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
409 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
410
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
411
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
412 @node rfc2047
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
413 @section rfc2047
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
414
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
415 RFC2047 (Message Header Extensions for Non-ASCII Text) specifies how
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
416 non-ASCII text in headers are to be encoded. This is actually rather
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
417 complicated, so a number of variables are necessary to tweak what this
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
418 library does.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
419
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
420 The following variables are tweakable:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
421
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
422 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
423 @item rfc2047-default-charset
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
424 @vindex rfc2047-default-charset
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
425 Characters in this charset should not be decoded by this library.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
426 This defaults to @code{iso-8859-1}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
427
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
428 @item rfc2047-header-encoding-list
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
429 @vindex rfc2047-header-encoding-list
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
430 This is an alist of header / encoding-type pairs. Its main purpose is
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
431 to prevent encoding of certain headers.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
432
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
433 The keys can either be header regexps, or @code{t}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
434
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
435 The values can be either @code{nil}, in which case the header(s) in
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
436 question won't be encoded, or @code{mime}, which means that they will be
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
437 encoded.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
438
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
439 @item rfc2047-charset-encoding-alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
440 @vindex rfc2047-charset-encoding-alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
441 RFC2047 specifies two forms of encoding---@code{Q} (a
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
442 Quoted-Printable-like encoding) and @code{B} (base64). This alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
443 specifies which charset should use which encoding.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
444
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
445 @item rfc2047-encoding-function-alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
446 @vindex rfc2047-encoding-function-alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
447 This is an alist of encoding / function pairs. The encodings are
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
448 @code{Q}, @code{B} and @code{nil}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
449
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
450 @item rfc2047-q-encoding-alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
451 @vindex rfc2047-q-encoding-alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
452 The @code{Q} encoding isn't quite the same for all headers. Some
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
453 headers allow a narrower range of characters, and that is what this
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
454 variable is for. It's an alist of header regexps / allowable character
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
455 ranges.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
456
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
457 @item rfc2047-encoded-word-regexp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
458 @vindex rfc2047-encoded-word-regexp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
459 When decoding words, this library looks for matches to this regexp.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
460
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
461 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
462
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
463 Those were the variables, and these are this functions:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
464
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
465 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
466 @item rfc2047-narrow-to-field
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
467 @findex rfc2047-narrow-to-field
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
468 Narrow the buffer to the header on the current line.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
469
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
470 @item rfc2047-encode-message-header
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
471 @findex rfc2047-encode-message-header
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
472 Should be called narrowed to the header of a message. Encodes according
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
473 to @code{rfc2047-header-encoding-alist}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
474
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
475 @item rfc2047-encode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
476 @findex rfc2047-encode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
477 Encodes all encodable words in the region specified.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
478
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
479 @item rfc2047-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
480 @findex rfc2047-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
481 Encode a string and return the results.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
482
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
483 @item rfc2047-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
484 @findex rfc2047-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
485 Decode the encoded words in the region.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
486
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
487 @item rfc2047-decode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
488 @findex rfc2047-decode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
489 Decode a string and return the results.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
490
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
491 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
492
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
493
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
494 @node time-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
495 @section time-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
496
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
497 While not really a part of the @sc{mime} library, it is convenient to
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
498 document this library here. It deals with parsing @code{Date} headers
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
499 and manipulating time. (Not by using tesseracts, though, I'm sorry to
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
500 say.)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
501
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
502 These functions convert between five formats: A date string, an Emacs
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
503 time structure, a decoded time list, a second number, and a day number.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
504
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
505 The functions have quite self-explanatory names, so the following just
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
506 gives an overview of which functions are available.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
507
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
508 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
509 (parse-time-string "Sat Sep 12 12:21:54 1998 +0200")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
510 @result{} (54 21 12 12 9 1998 6 nil 7200)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
511
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
512 (date-to-time "Sat Sep 12 12:21:54 1998 +0200")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
513 @result{} (13818 19266)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
514
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
515 (time-to-seconds '(13818 19266))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
516 @result{} 905595714.0
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
517
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
518 (seconds-to-time 905595714.0)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
519 @result{} (13818 19266 0)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
520
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
521 (time-to-day '(13818 19266))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
522 @result{} 729644
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
523
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
524 (days-to-time 729644)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
525 @result{} (961933 65536)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
526
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
527 (time-since '(13818 19266))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
528 @result{} (0 430)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
529
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
530 (time-less-p '(13818 19266) '(13818 19145))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
531 @result{} nil
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
532
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
533 (subtract-time '(13818 19266) '(13818 19145))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
534 @result{} (0 121)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
535
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
536 (days-between "Sat Sep 12 12:21:54 1998 +0200"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
537 "Sat Sep 07 12:21:54 1998 +0200")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
538 @result{} 5
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
539
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
540 (date-leap-year-p 2000)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
541 @result{} t
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
542
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
543 (time-to-day-in-year '(13818 19266))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
544 @result{} 255
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
545
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
546 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
547
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
548 And finally, we have @code{safe-date-to-time}, which does the same as
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
549 @code{date-to-time}, but returns a zero time if the date is
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
550 syntactically malformed.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
551
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
552
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
553
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
554 @node qp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
555 @section qp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
556
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
557 This library deals with decoding and encoding Quoted-Printable text.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
558
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
559 Very briefly explained, qp encoding means translating all 8-bit
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
560 characters (and lots of control characters) into things that look like
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
561 @samp{=EF}; that is, an equal sign followed by the byte encoded as a hex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
562 string.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
563
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
564 The following functions are defined by the library:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
565
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
566 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
567 @item quoted-printable-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
568 @findex quoted-printable-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
569 QP-decode all the encoded text in the specified region.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
570
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
571 @item quoted-printable-decode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
572 @findex quoted-printable-decode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
573 Decode the QP-encoded text in a string and return the results.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
574
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
575 @item quoted-printable-encode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
576 @findex quoted-printable-encode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
577 QP-encode all the encodable characters in the specified region. The third
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
578 optional parameter @var{fold} specifies whether to fold long lines.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
579 (Long here means 72.)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
580
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
581 @item quoted-printable-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
582 @findex quoted-printable-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
583 QP-encode all the encodable characters in a string and return the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
584 results.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
585
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
586 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
587
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
588
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
589 @node base64
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
590 @section base64
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
591 @cindex base64
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
592
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
593 Base64 is an encoding that encodes three bytes into four characters,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
594 thereby increasing the size by about 33%. The alphabet used for
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
595 encoding is very resistant to mangling during transit.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
596
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
597 The following functions are defined by this library:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
598
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
599 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
600 @item base64-encode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
601 @findex base64-encode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
602 base64 encode the selected region. Return the length of the encoded
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
603 text. Optional third argument @var{no-line-break} means do not break
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
604 long lines into shorter lines.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
605
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
606 @item base64-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
607 @findex base64-encode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
608 base64 encode a string and return the result.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
609
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
610 @item base64-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
611 @findex base64-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
612 base64 decode the selected region. Return the length of the decoded
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
613 text. If the region can't be decoded, return @code{nil} and don't
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
614 modify the buffer.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
615
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
616 @item base64-decode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
617 @findex base64-decode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
618 base64 decode a string and return the result. If the string can't be
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
619 decoded, @code{nil} is returned.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
620
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
621 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
622
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
623
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
624 @node binhex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
625 @section binhex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
626 @cindex binhex
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
627 @cindex Apple
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
628 @cindex Macintosh
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
629
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
630 @code{binhex} is an encoding that originated in Macintosh environments.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
631 The following function is supplied to deal with these:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
632
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
633 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
634 @item binhex-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
635 @findex binhex-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
636 Decode the encoded text in the region. If given a third parameter, only
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
637 decode the @code{binhex} header and return the filename.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
638
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
639 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
640
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
641
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
642 @node uudecode
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
643 @section uudecode
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
644 @cindex uuencode
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
645 @cindex uudecode
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
646
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
647 @code{uuencode} is probably still the most popular encoding of binaries
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
648 used on Usenet, although @code{base64} rules the mail world.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
649
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
650 The following function is supplied by this package:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
651
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
652 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
653 @item uudecode-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
654 @findex uudecode-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
655 Decode the text in the region.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
656 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
657
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
658
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
659 @node rfc1843
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
660 @section rfc1843
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
661 @cindex rfc1843
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
662 @cindex HZ
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
663 @cindex Chinese
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
664
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
665 RFC1843 deals with mixing Chinese and ASCII characters in messages. In
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
666 essence, RFC1843 switches between ASCII and Chinese by doing this:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
667
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
668 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
669 This sentence is in ASCII.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
670 The next sentence is in GB.~@{<:Ky2;S@{#,NpJ)l6HK!#~@}Bye.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
671 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
672
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
673 Simple enough, and widely used in China.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
674
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
675 The following functions are available to handle this encoding:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
676
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
677 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
678 @item rfc1843-decode-region
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
679 Decode HZ-encoded text in the region.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
680
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
681 @item rfc1843-decode-string
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
682 Decode a HZ-encoded string and return the result.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
683
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
684 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
685
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
686
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
687 @node mailcap
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
688 @section mailcap
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
689
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
690 The @file{~/.mailcap} file is parsed by most @sc{mime}-aware message
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
691 handlers and describes how elements are supposed to be displayed.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
692 Here's an example file:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
693
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
694 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
695 image/*; gimp -8 %s
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
696 audio/wav; wavplayer %s
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
697 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
698
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
699 This says that all image files should be displayed with @code{gimp}, and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
700 that realaudio files should be played by @code{rvplayer}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
701
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
702 The @code{mailcap} library parses this file, and provides functions for
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
703 matching types.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
704
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
705 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
706 @item mailcap-mime-data
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
707 @vindex mailcap-mime-data
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
708 This variable is an alist of alists containing backup viewing rules.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
709
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
710 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
711
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
712 Interface functions:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
713
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
714 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
715 @item mailcap-parse-mailcaps
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
716 @findex mailcap-parse-mailcaps
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
717 Parse the @code{~/.mailcap} file.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
718
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
719 @item mailcap-mime-info
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
720 Takes a @sc{mime} type as its argument and returns the matching viewer.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
721
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
722 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
723
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
724
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
725
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
726
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
727 @node Decoding and Viewing
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
728 @chapter Decoding and Viewing
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
729
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
730 This chapter deals with decoding and viewing @sc{mime} messages on a
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
731 higher level.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
732
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
733 The main idea is to first analyze a @sc{mime} article, and then allow
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
734 other programs to do things based on the list of @dfn{handles} that are
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
735 returned as a result of this analysis.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
736
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
737 @menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
738 * Dissection:: Analyzing a @sc{mime} message.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
739 * Handles:: Handle manipulations.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
740 * Display:: Displaying handles.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
741 * Customization:: Variables that affect display.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
742 * New Viewers:: How to write your own viewers.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
743 @end menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
744
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
745
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
746 @node Dissection
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
747 @section Dissection
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
748
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
749 The @code{mm-dissect-buffer} is the function responsible for dissecting
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
750 a @sc{mime} article. If given a multipart message, it will recursively
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
751 descend the message, following the structure, and return a tree of
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
752 @sc{mime} handles that describes the structure of the message.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
753
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
754
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
755 @node Handles
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
756 @section Handles
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
757
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
758 A @sc{mime} handle is a list that fully describes a @sc{mime}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
759 component.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
760
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
761 The following macros can be used to access elements in a handle:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
762
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
763 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
764 @item mm-handle-buffer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
765 @findex mm-handle-buffer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
766 Return the buffer that holds the contents of the undecoded @sc{mime}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
767 part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
768
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
769 @item mm-handle-type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
770 @findex mm-handle-type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
771 Return the parsed @code{Content-Type} of the part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
772
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
773 @item mm-handle-encoding
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
774 @findex mm-handle-encoding
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
775 Return the @code{Content-Transfer-Encoding} of the part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
776
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
777 @item mm-handle-undisplayer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
778 @findex mm-handle-undisplayer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
779 Return the object that can be used to remove the displayed part (if it
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
780 has been displayed).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
781
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
782 @item mm-handle-set-undisplayer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
783 @findex mm-handle-set-undisplayer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
784 Set the undisplayer object.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
785
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
786 @item mm-handle-disposition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
787 @findex mm-handle-disposition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
788 Return the parsed @code{Content-Disposition} of the part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
789
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
790 @item mm-handle-disposition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
791 @findex mm-handle-disposition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
792 Return the description of the part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
793
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
794 @item mm-get-content-id
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
795 Returns the handle(s) referred to by @code{Content-ID}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
796
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
797 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
798
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
799
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
800 @node Display
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
801 @section Display
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
802
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
803 Functions for displaying, removing and saving.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
804
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
805 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
806 @item mm-display-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
807 @findex mm-display-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
808 Display the part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
809
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
810 @item mm-remove-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
811 @findex mm-remove-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
812 Remove the part (if it has been displayed).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
813
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
814 @item mm-inlinable-p
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
815 @findex mm-inlinable-p
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
816 Say whether a @sc{mime} type can be displayed inline.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
817
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
818 @item mm-automatic-display-p
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
819 @findex mm-automatic-display-p
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
820 Say whether a @sc{mime} type should be displayed automatically.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
821
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
822 @item mm-destroy-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
823 @findex mm-destroy-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
824 Free all resources occupied by a part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
825
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
826 @item mm-save-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
827 @findex mm-save-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
828 Offer to save the part in a file.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
829
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
830 @item mm-pipe-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
831 @findex mm-pipe-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
832 Offer to pipe the part to some process.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
833
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
834 @item mm-interactively-view-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
835 @findex mm-interactively-view-part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
836 Prompt for a mailcap method to use to view the part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
837
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
838 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
839
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
840
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
841 @node Customization
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
842 @section Customization
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
843
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
844 @table @code
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
845
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
846 @item mm-inline-media-tests
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
847 This is an alist where the key is a @sc{mime} type, the second element
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
848 is a function to display the part @dfn{inline} (i.e., inside Emacs), and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
849 the third element is a form to be @code{eval}ed to say whether the part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
850 can be displayed inline.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
851
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
852 This variable specifies whether a part @emph{can} be displayed inline,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
853 and, if so, how to do it. It does not say whether parts are
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
854 @emph{actually} displayed inline.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
855
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
856 @item mm-inlined-types
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
857 This, on the other hand, says what types are to be displayed inline, if
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
858 they satisfy the conditions set by the variable above. It's a list of
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
859 @sc{mime} media types.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
860
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
861 @item mm-automatic-display
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
862 This is a list of types that are to be displayed ``automatically'', but
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
863 only if the above variable allows it. That is, only inlinable parts can
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
864 be displayed automatically.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
865
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
866 @item mm-attachment-override-types
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
867 Some @sc{mime} agents create parts that have a content-disposition of
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
868 @samp{attachment}. This variable allows overriding that disposition and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
869 displaying the part inline. (Note that the disposition is only
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
870 overridden if we are able to, and want to, display the part inline.)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
871
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
872 @item mm-discouraged-alternatives
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
873 List of @sc{mime} types that are discouraged when viewing
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
874 @samp{multipart/alternative}. Viewing agents are supposed to view the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
875 last possible part of a message, as that is supposed to be the richest.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
876 However, users may prefer other types instead, and this list says what
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
877 types are most unwanted. If, for instance, @samp{text/html} parts are
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
878 very unwanted, and @samp{text/richtech} parts are somewhat unwanted,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
879 then the value of this variable should be set to:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
880
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
881 @lisp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
882 ("text/html" "text/richtext")
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
883 @end lisp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
884
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
885 @item mm-inline-large-images-p
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
886 When displaying inline images that are larger than the window, XEmacs
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
887 does not enable scrolling, which means that you cannot see the whole
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
888 image. To prevent this, the library tries to determine the image size
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
889 before displaying it inline, and if it doesn't fit the window, the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
890 library will display it externally (e.g. with @samp{ImageMagick} or
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
891 @samp{xv}). Setting this variable to @code{t} disables this check and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
892 makes the library display all inline images as inline, regardless of
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
893 their size.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
894
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
895 @item mm-inline-override-p
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
896 @code{mm-inlined-types} may include regular expressions, for example to
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
897 specify that all @samp{text/.*} parts be displayed inline. If a user
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
898 prefers to have a type that matches such a regular expression be treated
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
899 as an attachment, that can be accomplished by setting this variable to a
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
900 list containing that type. For example assuming @code{mm-inlined-types}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
901 includes @samp{text/.*}, then including @samp{text/html} in this
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
902 variable will cause @samp{text/html} parts to be treated as attachments.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
903
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
904 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
905
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
906
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
907 @node New Viewers
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
908 @section New Viewers
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
909
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
910 Here's an example viewer for displaying @code{text/enriched} inline:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
911
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
912 @lisp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
913 (defun mm-display-enriched-inline (handle)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
914 (let (text)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
915 (with-temp-buffer
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
916 (mm-insert-part handle)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
917 (save-window-excursion
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
918 (enriched-decode (point-min) (point-max))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
919 (setq text (buffer-string))))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
920 (mm-insert-inline handle text)))
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
921 @end lisp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
922
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
923 We see that the function takes a @sc{mime} handle as its parameter. It
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
924 then goes to a temporary buffer, inserts the text of the part, does some
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
925 work on the text, stores the result, goes back to the buffer it was
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
926 called from and inserts the result.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
927
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
928 The two important helper functions here are @code{mm-insert-part} and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
929 @code{mm-insert-inline}. The first function inserts the text of the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
930 handle in the current buffer. It handles charset and/or content
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
931 transfer decoding. The second function just inserts whatever text you
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
932 tell it to insert, but it also sets things up so that the text can be
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
933 ``undisplayed' in a convenient manner.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
934
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
935
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
936 @node Composing
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
937 @chapter Composing
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
938 @cindex Composing
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
939 @cindex MIME Composing
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
940 @cindex MML
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
941 @cindex MIME Meta Language
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
942
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
943 Creating a @sc{mime} message is boring and non-trivial. Therefore, a
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
944 library called @code{mml} has been defined that parses a language called
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
945 MML (@sc{mime} Meta Language) and generates @sc{mime} messages.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
946
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
947 @findex mml-generate-mime
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
948 The main interface function is @code{mml-generate-mime}. It will
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
949 examine the contents of the current (narrowed-to) buffer and return a
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
950 string containing the @sc{mime} message.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
951
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
952 @menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
953 * Simple MML Example:: An example MML document.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
954 * MML Definition:: All valid MML elements.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
955 * Advanced MML Example:: Another example MML document.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
956 * Charset Translation:: How charsets are mapped from @sc{mule} to MIME.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
957 * Conversion:: Going from @sc{mime} to MML and vice versa.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
958 @end menu
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
959
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
960
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
961 @node Simple MML Example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
962 @section Simple MML Example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
963
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
964 Here's a simple @samp{multipart/alternative}:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
965
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
966 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
967 <#multipart type=alternative>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
968 This is a plain text part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
969 <#part type=text/enriched>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
970 <center>This is a centered enriched part</center>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
971 <#/multipart>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
972 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
973
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
974 After running this through @code{mml-generate-mime}, we get this:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
975
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
976 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
977 Content-Type: multipart/alternative; boundary="=-=-="
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
978
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
979
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
980 --=-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
981
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
982
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
983 This is a plain text part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
984
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
985 --=-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
986 Content-Type: text/enriched
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
987
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
988
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
989 <center>This is a centered enriched part</center>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
990
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
991 --=-=-=--
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
992 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
993
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
994
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
995 @node MML Definition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
996 @section MML Definition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
997
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
998 The MML language is very simple. It looks a bit like an SGML
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
999 application, but it's not.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1000
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1001 The main concept of MML is the @dfn{part}. Each part can be of a
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1002 different type or use a different charset. The way to delineate a part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1003 is with a @samp{<#part ...>} tag. Multipart parts can be introduced
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1004 with the @samp{<#multipart ...>} tag. Parts are ended by the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1005 @samp{<#/part>} or @samp{<#/multipart>} tags. Parts started with the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1006 @samp{<#part ...>} tags are also closed by the next open tag.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1007
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1008 There's also the @samp{<#external ...>} tag. These introduce
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1009 @samp{external/message-body} parts.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1010
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1011 Each tag can contain zero or more parameters on the form
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1012 @samp{parameter=value}. The values may be enclosed in quotation marks,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1013 but that's not necessary unless the value contains white space. So
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1014 @samp{filename=/home/user/#hello$^yes} is perfectly valid.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1015
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1016 The following parameters have meaning in MML; parameters that have no
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1017 meaning are ignored. The MML parameter names are the same as the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1018 @sc{mime} parameter names; the things in the parentheses say which
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1019 header it will be used in.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1020
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1021 @table @samp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1022 @item type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1023 The @sc{mime} type of the part (@code{Content-Type}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1024
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1025 @item filename
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1026 Use the contents of the file in the body of the part
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1027 (@code{Content-Disposition}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1028
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1029 @item charset
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1030 The contents of the body of the part are to be encoded in the character
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1031 set speficied (@code{Content-Type}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1032
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1033 @item name
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1034 Might be used to suggest a file name if the part is to be saved
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1035 to a file (@code{Content-Type}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1036
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1037 @item disposition
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1038 Valid values are @samp{inline} and @samp{attachment}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1039 (@code{Content-Disposition}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1040
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1041 @item encoding
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1042 Valid values are @samp{7bit}, @samp{8bit}, @samp{quoted-printable} and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1043 @samp{base64} (@code{Content-Transfer-Encoding}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1044
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1045 @item description
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1046 A description of the part (@code{Content-Description}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1047
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1048 @item creation-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1049 RFC822 date when the part was created (@code{Content-Disposition}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1050
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1051 @item modification-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1052 RFC822 date when the part was modified (@code{Content-Disposition}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1053
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1054 @item read-date
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1055 RFC822 date when the part was read (@code{Content-Disposition}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1056
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1057 @item size
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1058 The size (in octets) of the part (@code{Content-Disposition}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1059
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1060 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1061
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1062 Parameters for @samp{application/octet-stream}:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1063
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1064 @table @samp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1065 @item type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1066 Type of the part; informal---meant for human readers
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1067 (@code{Content-Type}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1068 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1069
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1070 Parameters for @samp{message/external-body}:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1071
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1072 @table @samp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1073 @item access-type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1074 A word indicating the supported access mechanism by which the file may
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1075 be obtained. Values include @samp{ftp}, @samp{anon-ftp}, @samp{tftp},
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1076 @samp{localfile}, and @samp{mailserver}. (@code{Content-Type}.)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1077
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1078 @item expiration
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1079 The RFC822 date after which the file may no longer be fetched.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1080 (@code{Content-Type}.)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1081
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1082 @item size
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1083 The size (in octets) of the file. (@code{Content-Type}.)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1084
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1085 @item permission
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1086 Valid values are @samp{read} and @samp{read-write}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1087 (@code{Content-Type}).
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1088
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1089 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1090
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1091
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1092 @node Advanced MML Example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1093 @section Advanced MML Example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1094
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1095 Here's a complex multipart message. It's a @samp{multipart/mixed} that
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1096 contains many parts, one of which is a @samp{multipart/alternative}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1097
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1098 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1099 <#multipart type=mixed>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1100 <#part type=image/jpeg filename=~/rms.jpg disposition=inline>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1101 <#multipart type=alternative>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1102 This is a plain text part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1103 <#part type=text/enriched name=enriched.txt>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1104 <center>This is a centered enriched part</center>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1105 <#/multipart>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1106 This is a new plain text part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1107 <#part disposition=attachment>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1108 This plain text part is an attachment.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1109 <#/multipart>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1110 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1111
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1112 And this is the resulting @sc{mime} message:
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1113
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1114 @example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1115 Content-Type: multipart/mixed; boundary="=-=-="
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1116
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1117
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1118 --=-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1119
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1120
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1121
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1122 --=-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1123 Content-Type: image/jpeg;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1124 filename="~/rms.jpg"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1125 Content-Disposition: inline;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1126 filename="~/rms.jpg"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1127 Content-Transfer-Encoding: base64
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1128
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1129 /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRof
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1130 Hh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/wAALCAAwADABAREA/8QAHwAA
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1131 AQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQR
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1132 BRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RF
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1133 RkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ip
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1134 qrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEB
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1135 AAA/AO/rifFHjldNuGsrDa0qcSSHkA+gHrXKw+LtWLrMb+RgTyhbr+HSug07xNqV9fQtZrNI
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1136 AyiaE/NuBPOOOP0rvRNE880KOC8TbXXGCv1FPqjrF4LDR7u5L7SkTFT/ALWOP1xXgTuXfc7E
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1137 sx6nua6rwp4IvvEM8chCxWxOdzn7wz6V9AaB4S07w9p5itow0rDLSY5Pt9K43xO66P4xs71m
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1138 2QXiGCbA4yOVJ9+1aYORkdK434lyNH4ahCnG66VT9Nj15JFbPdX0MS43M4VQf5/yr2vSpLnw
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1139 5ZW8dlCZ8KFXjOPX0/mK6rSPEGt3Angu44fNEReHYNvIH3TzXDeKNO8RX+kSX2ouZkicTIOc
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1140 L+g7E810ulFjpVtv3bwgB3HJyK5L4quY/C9sVxk3ij/xx6850u7t1mtp/wDlpEw3An3Jr3Dw
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1141 34gsbWza4nBlhC5LDsaW6+IFgupQyCF3iHH7gA7c9R9ay7zx6t7aX9jHC4smhfBkGCvHGfrm
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1142 tLQ7hbnRrV1GPkAP1x1/Hr+Ncr8Vzjwrbf8AX6v/AKA9eQRyYlQk8Yx9K6XTNbkgia2ciSIn
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1143 7p5Ga9Atte0LTLKO6it4i7dVRFJDcZ4PvXN+JvEMF9bILVGXJLSZ4zkjivRPDaeX4b08HOTC
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1144 pOffmua+KkbS+GLVUGT9tT/0B68eeIpIFYjB70+OOVXyoOM9+M1eaWeCLzHPyHGO/NVWvJJm
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1145 jQ8KGH1NfQWhXSXmh2c8eArRLwO3HSv/2Q==
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1146
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1147 --=-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1148 Content-Type: multipart/alternative; boundary="==-=-="
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1149
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1150
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1151 --==-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1152
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1153
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1154 This is a plain text part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1155
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1156 --==-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1157 Content-Type: text/enriched;
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1158 name="enriched.txt"
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1159
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1160
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1161 <center>This is a centered enriched part</center>
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1162
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1163 --==-=-=--
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1164
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1165 --=-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1166
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1167 This is a new plain text part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1168
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1169 --=-=-=
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1170 Content-Disposition: attachment
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1171
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1172
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1173 This plain text part is an attachment.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1174
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1175 --=-=-=--
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1176 @end example
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1177
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1178 @node Charset Translation
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1179 @section Charset Translation
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1180 @cindex charsets
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1181
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1182 During translation from MML to @sc{mime}, for each @sc{mime} part which
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1183 has been composed inside Emacs, an appropriate charset has to be chosen.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1184
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1185 @vindex mail-parse-charset
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1186 If you are running a non-@sc{mule} Emacs, this process is simple: If the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1187 part contains any non-ASCII (8-bit) characters, the @sc{mime} charset
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1188 given by @code{mail-parse-charset} (a symbol) is used. (Never set this
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1189 variable directly, though. If you want to change the default charset,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1190 please consult the documentation of the package which you use to process
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1191 @sc{mime} messages.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1192 @xref{Various Message Variables, , Various Message Variables, message,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1193 Message Manual}, for example.)
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1194 If there are only ASCII characters, the @sc{mime} charset US-ASCII is
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1195 used, of course.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1196
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1197 @cindex MULE
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1198 @cindex UTF-8
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1199 @cindex Unicode
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1200 @vindex mm-mime-mule-charset-alist
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1201 Things are slightly more complicated when running Emacs with @sc{mule}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1202 support. In this case, a list of the @sc{mule} charsets used in the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1203 part is obtained, and the @sc{mule} charsets are translated to @sc{mime}
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1204 charsets by consulting the variable @code{mm-mime-mule-charset-alist}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1205 If this results in a single @sc{mime} charset, this is used to encode
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1206 the part. But if the resulting list of @sc{mime} charsets contains more
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1207 than one element, two things can happen: If it is possible to encode the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1208 part via UTF-8, this charset is used. (For this, Emacs must support
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1209 the @code{utf-8} coding system, and the part must consist entirely of
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1210 characters which have Unicode counterparts.) If UTF-8 is not available
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1211 for some reason, the part is split into several ones, so that each one
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1212 can be encoded with a single @sc{mime} charset. The part can only be
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1213 split at line boundaries, though---if more than one @sc{mime} charset is
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1214 required to encode a single line, it is not possible to encode the part.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1215
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1216 @node Conversion
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1217 @section Conversion
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1218
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1219 @findex mime-to-mml
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1220 A (multipart) @sc{mime} message can be converted to MML with the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1221 @code{mime-to-mml} function. It works on the message in the current
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1222 buffer, and substitutes MML markup for @sc{mime} boundaries.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1223 Non-textual parts do not have their contents in the buffer, but instead
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1224 have the contents in separate buffers that are referred to from the MML
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1225 tags.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1226
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1227 @findex mml-to-mime
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1228 An MML message can be converted back to @sc{mime} by the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1229 @code{mml-to-mime} function.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1230
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1231 These functions are in certain senses ``lossy''---you will not get back
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1232 an identical message if you run @sc{mime-to-mml} and then
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1233 @sc{mml-to-mime}. Not only will trivial things like the order of the
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1234 headers differ, but the contents of the headers may also be different.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1235 For instance, the original message may use base64 encoding on text,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1236 while @sc{mml-to-mime} may decide to use quoted-printable encoding, and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1237 so on.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1238
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1239 In essence, however, these two functions should be the inverse of each
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1240 other. The resulting contents of the message should remain equivalent,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1241 if not identical.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1242
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1243
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1244 @node Standards
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1245 @chapter Standards
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1246
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1247 The Emacs @sc{mime} library implements handling of various elements
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1248 according to a (somewhat) large number of RFCs, drafts and standards
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1249 documents. This chapter lists the relevant ones. They can all be
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1250 fetched from @samp{http://quimby.gnus.org/notes/}.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1251
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1252 @table @dfn
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1253 @item RFC822
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1254 @itemx STD11
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1255 Standard for the Format of ARPA Internet Text Messages.
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1256
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1257 @item RFC1036
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1258 Standard for Interchange of USENET Messages
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1259
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1260 @item RFC2045
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1261 Format of Internet Message Bodies
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1262
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1263 @item RFC2046
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1264 Media Types
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1265
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1266 @item RFC2047
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1267 Message Header Extensions for Non-ASCII Text
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1268
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1269 @item RFC2048
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1270 Registration Procedures
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1271
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1272 @item RFC2049
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1273 Conformance Criteria and Examples
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1274
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1275 @item RFC2231
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1276 MIME Parameter Value and Encoded Word Extensions: Character Sets,
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1277 Languages, and Continuations
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1278
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1279 @item RFC1843
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1280 HZ - A Data Format for Exchanging Files of Arbitrarily Mixed Chinese and
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1281 ASCII characters
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1282
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1283 @item draft-ietf-drums-msg-fmt-05.txt
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1284 Draft for the successor of RFC822
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1285
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1286 @item RFC2112
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1287 The MIME Multipart/Related Content-type
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1288
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1289 @item RFC1892
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1290 The Multipart/Report Content Type for the Reporting of Mail System
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1291 Administrative Messages
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1292
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1293 @item RFC2183
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1294 Communicating Presentation Information in Internet Messages: The
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1295 Content-Disposition Header Field
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1296
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1297 @end table
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1298
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1299
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1300 @node Index
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1301 @chapter Index
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1302 @printindex cp
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1303
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1304 @summarycontents
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1305 @contents
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1306 @bye
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1307
25af74a14174 *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1308 @c End: