@synindex fn cp
@synindex vr cp
@synindex pg cp
-@dircategory Emacs
-@direntry
-* Emacs MIME: (emacs-mime). The MIME de/composition library.
-@end direntry
-@iftex
-@finalout
-@end iftex
-@setchapternewpage odd
-
-@ifnottex
+@copying
This file documents the Emacs MIME interface functionality.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
+@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Documentation License. If you want to distribute this document
separately from the collection, you can do so by adding a copy of the
license to the document, as described in section 6 of the license.
-@end ifnottex
+@end quotation
+@end copying
-@tex
+@dircategory Emacs
+@direntry
+* Emacs MIME: (emacs-mime). Emacs MIME de/composition library.
+@end direntry
+@iftex
+@finalout
+@end iftex
+@setchapternewpage odd
@titlepage
@title Emacs MIME Manual
@author by Lars Magne Ingebrigtsen
@page
-
@vskip 0pt plus 1filll
-Copyright @copyright{} 1998, 1999, 2000, 2001, 2002, 2003 Free Software
-Foundation, Inc.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being none, with the Front-Cover texts being ``A GNU
-Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License'' in the Emacs manual.
-
-(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-this GNU Manual, like GNU software. Copies published by the Free
-Software Foundation raise funds for GNU development.''
-
-This document is part of a collection distributed under the GNU Free
-Documentation License. If you want to distribute this document
-separately from the collection, you can do so by adding a copy of the
-license to the document, as described in section 6 of the license.
+@insertcopying
@end titlepage
-@page
-
-@end tex
@node Top
@top Emacs MIME
@item mm-enable-external
@vindex mm-enable-external
-Indicate whether external MIME handlers should be used.
+Indicate whether external @acronym{MIME} handlers should be used.
-If @code{t}, all defined external MIME handlers are used. If
+If @code{t}, all defined external @acronym{MIME} handlers are used. If
@code{nil}, files are saved to disk (@code{mailcap-save-binary-file}).
If it is the symbol @code{ask}, you are prompted before the external
@acronym{MIME} handler is invoked.
When you launch an attachment through mailcap (@pxref{mailcap}) an
-attempt is made to use a safe viewer with the safest options--this isn't
+attempt is made to use a safe viewer with the safest options---this isn't
the case if you save it to disk and launch it in a different way
(command line or double-clicking). Anyhow, if you want to be sure not
to launch any external programs, set this variable to @code{nil} or
@vindex mm-coding-system-priorities
Prioritize coding systems to use for outgoing messages. The default
is @code{nil}, which means to use the defaults in Emacs. It is a list of
-coding system symbols (aliases of coding systems does not work, use
-@kbd{M-x describe-coding-system} to make sure you are not specifying
-an alias in this variable). For example, if you have configured Emacs
+coding system symbols (aliases of coding systems are also allowed, use
+@kbd{M-x describe-coding-system} to make sure you are specifying correct
+coding system names). For example, if you have configured Emacs
to prefer UTF-8, but wish that outgoing messages should be sent in
ISO-8859-1 if possible, you can set this variable to
-@code{(iso-latin-1)}. You can override this setting on a per-message
+@code{(iso-8859-1)}. You can override this setting on a per-message
basis by using the @code{charset} @acronym{MML} tag (@pxref{MML Definition}).
@item mm-content-transfer-encoding-defaults
(digitally signed messages require 7bit encoding). Besides the normal
@acronym{MIME} encodings, @code{qp-or-base64} may be used to indicate that for
each case the most efficient of quoted-printable and base64 should be
-used. You can override this setting on a per-message basis by using
-the @code{encoding} @acronym{MML} tag (@pxref{MML Definition}).
+used.
+
+@code{qp-or-base64} has another effect. It will fold long lines so that
+MIME parts may not be broken by MTA. So do @code{quoted-printable} and
+@code{base64}.
+
+Note that it affects body encoding only when a part is a raw forwarded
+message (which will be made by @code{gnus-summary-mail-forward} with the
+arg 2 for example) or is neither the @samp{text/*} type nor the
+@samp{message/*} type. Even though in those cases, you can override
+this setting on a per-message basis by using the @code{encoding}
+@acronym{MML} tag (@pxref{MML Definition}).
@item mm-use-ultra-safe-encoding
@vindex mm-use-ultra-safe-encoding
@code{fill-flowed-display-column}. The default is to wrap after
@code{fill-column}.
-
+@table @code
+@item mm-fill-flowed
+@vindex mm-fill-flowed
+If non-@code{nil} a format=flowed article will be displayed flowed.
+@end table
@node Interface Functions
@item mail-encode-encoded-word-region
@findex mail-encode-encoded-word-region
Encode the non-@acronym{ASCII} words in the region. For instance,
-@samp{Naïve} is encoded as @samp{=?iso-8859-1?q?Na=EFve?=}.
+@samp{Na@"{@dotless{i}}ve} is encoded as @samp{=?iso-8859-1?q?Na=EFve?=}.
@item mail-encode-encoded-word-buffer
@findex mail-encode-encoded-word-buffer
@example
(mail-encode-encoded-word-string
- "This is naïve, baby")
+ "This is na@"{@dotless{i}}ve, baby")
@result{} "This is =?iso-8859-1?q?na=EFve,?= baby"
@end example
@example
(mail-decode-encoded-word-string
"This is =?iso-8859-1?q?na=EFve,?= baby")
-@result{} "This is naïve, baby"
+@result{} "This is na@"{@dotless{i}}ve, baby"
@end example
@end table
The following variables are tweakable:
@table @code
-@item rfc2047-default-charset
-@vindex rfc2047-default-charset
-Characters in this charset should not be decoded by this library.
-This defaults to @code{iso-8859-1}.
-
@item rfc2047-header-encoding-alist
@vindex rfc2047-header-encoding-alist
This is an alist of header / encoding-type pairs. Its main purpose is
The keys can either be header regexps, or @code{t}.
-The values can be either @code{nil}, in which case the header(s) in
-question won't be encoded, or @code{mime}, which means that they will be
-encoded.
+The values can be @code{nil}, in which case the header(s) in question
+won't be encoded, @code{mime}, which means that they will be encoded, or
+@code{address-mime}, which means the header(s) will be encoded carefully
+assuming they contain addresses.
@item rfc2047-charset-encoding-alist
@vindex rfc2047-charset-encoding-alist
Quoted-Printable-like encoding) and @code{B} (base64). This alist
specifies which charset should use which encoding.
-@item rfc2047-encoding-function-alist
-@vindex rfc2047-encoding-function-alist
+@item rfc2047-encode-function-alist
+@vindex rfc2047-encode-function-alist
This is an alist of encoding / function pairs. The encodings are
@code{Q}, @code{B} and @code{nil}.
-@item rfc2047-q-encoding-alist
-@vindex rfc2047-q-encoding-alist
-The @code{Q} encoding isn't quite the same for all headers. Some
-headers allow a narrower range of characters, and that is what this
-variable is for. It's an alist of header regexps / allowable character
-ranges.
-
@item rfc2047-encoded-word-regexp
@vindex rfc2047-encoded-word-regexp
When decoding words, this library looks for matches to this regexp.
+@item rfc2047-encode-encoded-words
+@vindex rfc2047-encode-encoded-words
+The boolean variable specifies whether encoded words
+(e.g. @samp{=?hello?=}) should be encoded again.
+
@end table
Those were the variables, and these are this functions:
@findex rfc2047-decode-string
Decode a string and return the results.
+@item rfc2047-encode-parameter
+@findex rfc2047-encode-parameter
+Encode a parameter in the RFC2047-like style. This is a replacement for
+the @code{rfc2231-encode-string} function. @xref{rfc2231}.
+
+When attaching files as @acronym{MIME} parts, we should use the RFC2231
+encoding to specify the file names containing non-@acronym{ASCII}
+characters. However, many mail softwares don't support it in practice
+and recipients won't be able to extract files with correct names.
+Instead, the RFC2047-like encoding is acceptable generally. This
+function provides the very RFC2047-like encoding, resigning to such a
+regrettable trend. To use it, put the following line in your
+@file{~/.gnus.el} file:
+
+@lisp
+(defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter)
+@end lisp
+
@end table
@c mode: texinfo
@c coding: iso-8859-1
@c End:
+
+@ignore
+ arch-tag: c7ef2fd0-a91c-4e10-aa52-c1a2b11b1a8d
+@end ignore