+2004-09-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mm-decode.el (mm-copy-to-buffer): Don't use set-buffer-multibyte.
+
+2004-09-26 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus-msg.el (gnus-post-news): Use blank Newsgroups line if
+ GROUP is a virtual group.
+
+ * mm-util.el (mm-charset-synonym-alist): Remove obsolete entries
+ for big5 and gb2312.
+
+ * rfc2047.el (rfc2047-pad-base64): Deal with more cases of invalid
+ padding.
+
+ * mm-bodies.el (mm-7bit-chars): Don't include \r.
+
+ * mml.el (mml-compute-boundary-1): Don't uncompress files.
+
+ * rfc2047.el (rfc2047-qp-or-base64): New function to reduce
+ dependencies.
+ (rfc2047-encode): Use it.
+
+ * flow-fill.el: Typo.
+
+ * mml.el (mml-generate-mime-1): Don't use format=flowed with
+ inline PGP.
+
+ * gnus.el (gnus-getenv-nntpserver): Strip whitespace.
+
+ * gnus-cache.el (gnus-cache-save-buffers): Check if buffer is
+ alive. Reported by Laurent Martelli <laurent@aopsys.com>.
+
+ * mm-util.el (mm-image-load-path): Handle nil in load-path.
+ From Christian Neukirchen <chneukirchen@yahoo.de>.
+
+ * html2text.el (html2text-replace-list): Add & and '.
+
+ * nnheader.el (nnheader-max-head-length): Increase to 8192.
+
+ * message.el (message-clone-locals): Clone sendmail and smtp
+ variables.
+
2004-09-23 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-msg.el (gnus-configure-posting-styles): Narrow to headers
-;;; flow-fill.el --- interprete RFC2646 "flowed" text
+;;; flow-fill.el --- interpret RFC2646 "flowed" text
;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
(overview-file (gnus-cache-file-name
(car gnus-cache-buffer) ".overview")))
;; write the overview only if it was modified
- (when (buffer-modified-p buffer)
- (save-excursion
- (set-buffer buffer)
+ (when (and (buffer-live-p buffer) (buffer-modified-p buffer))
+ (with-current-buffer buffer
(if (> (buffer-size) 0)
;; Non-empty overview, write it to a file.
(let ((coding-system-for-write
(not to-address)))
;; This is news.
(if post
- (message-news (or to-group group))
+ (message-news
+ (or to-group
+ (and (not (gnus-virtual-group-p pgroup)) group)))
(set-buffer gnus-article-copy)
(gnus-msg-treat-broken-reply-to)
(message-followup (if (or newsgroup-p force-news)
(and (file-readable-p gnus-nntpserver-file)
(with-temp-buffer
(insert-file-contents gnus-nntpserver-file)
- (let ((name (buffer-string)))
- (unless (string-match "\\`[ \t\n]*$" name)
- name))))))
+ (when (re-search-forward "[^ \t\n\r]+" nil t)
+ (match-string 0))))))
(defcustom gnus-select-method
(condition-case nil
;;; html2text.el --- a simple html to plain text converter
-;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Joakim Hove <hove@phys.ntnu.no>
(defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
(defvar html2text-replace-list
- '((" " . " ") (">" . ">") ("<" . "<") (""" . "\""))
+ '((" " . " ") (">" . ">") ("<" . "<") (""" . "\"")
+ ("&" . "&") ("'" . "'"))
"The map of entity to text.
This is an alist were each element is a dotted pair consisting of an
(let ((locals (save-excursion
(set-buffer buffer)
(buffer-local-variables)))
- (regexp "^gnus\\|^nn\\|^message\\|^user-mail-address"))
+ (regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address"))
(mapcar
(lambda (local)
(when (and (consp local)
(require 'rfc2047)
(require 'mm-encode)
-;; 8bit treatment gets any char except: 0x32 - 0x7f, CR, LF, TAB, BEL,
+;; 8bit treatment gets any char except: 0x32 - 0x7f, LF, TAB, BEL,
;; BS, vertical TAB, form feed, and ^_
-(defvar mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f")
+;;
+;; Note that CR is *not* included, as that would allow a non-paired CR
+;; in the body contrary to RFC 2822:
+;;
+;; - CR and LF MUST only occur together as CRLF; they MUST NOT
+;; appear independently in the body.
+
+(defvar mm-7bit-chars "\x20-\x7f\n\t\x7\x8\xb\xc\x1f")
(defcustom mm-body-charset-encoding-alist
'((iso-2022-jp . 7bit)
"Copy the contents of the current buffer to a fresh buffer."
(save-excursion
(let ((obuf (current-buffer))
- (multibyte enable-multibyte-characters)
beg)
(goto-char (point-min))
(search-forward-regexp "^\n" nil t)
(setq beg (point))
- (set-buffer (generate-new-buffer " *mm*"))
- ;; Preserve the data's unibyteness (for url-insert-file-contents).
- (set-buffer-multibyte multibyte)
+ (set-buffer
+ ;; Preserve the data's unibyteness (for url-insert-file-contents).
+ (let ((default-enable-multibyte-characters (mm-multibyte-p)))
+ (generate-new-buffer " *mm*")))
(insert-buffer-substring obuf beg)
(current-buffer))))
(defvar mm-charset-synonym-alist
`(
- ;; Perfectly fine? A valid MIME name, anyhow.
- ,@(unless (mm-coding-system-p 'big5)
- '((big5 . cn-big5)))
;; Not in XEmacs, but it's not a proper MIME charset anyhow.
,@(unless (mm-coding-system-p 'x-ctext)
'((x-ctext . ctext)))
- ;; Apparently not defined in Emacs 20, but is a valid MIME name.
- ,@(unless (mm-coding-system-p 'gb2312)
- '((gb2312 . cn-gb-2312)))
;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_!
,@(unless (mm-coding-system-p 'iso-8859-15)
'((iso-8859-15 . iso-8859-1)))
(defun mm-image-load-path (&optional package)
(let (dir result)
(dolist (path load-path (nreverse result))
- (if (file-directory-p
- (setq dir (concat (file-name-directory
- (directory-file-name path))
- "etc/" (or package "gnus/"))))
- (push dir result))
+ (when (and path
+ (file-directory-p
+ (setq dir (concat (file-name-directory
+ (directory-file-name path))
+ "etc/" (or package "gnus/")))))
+ (push dir result))
(push path result))))
;; Fixme: This doesn't look useful where it's used.
;; actually are hard newlines in the text.
(let (use-hard-newlines)
(when (and (string= type "text/plain")
+ (not (string= (cdr (assq 'sign cont)) "pgp"))
(or (null (assq 'format cont))
(string= (cdr (assq 'format cont))
"flowed"))
(insert-buffer-substring (cdr (assq 'buffer cont))))
((and (setq filename (cdr (assq 'filename cont)))
(not (equal (cdr (assq 'nofile cont)) "yes")))
- (mm-insert-file-contents filename))
+ (mm-insert-file-contents filename nil nil nil nil t))
(t
(insert (cdr (assq 'contents cont)))))
(goto-char (point-min))
;;; nnheader.el --- header access macros for Gnus and its backends
;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
-;; 1997, 1998, 2000, 2001, 2002, 2003
+;; 1997, 1998, 2000, 2001, 2002, 2003, 2004
;; Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
:group 'gnus-server
:type 'boolean)
-(defvar nnheader-max-head-length 4096
+(defvar nnheader-max-head-length 8192
"*Max length of the head of articles.
Value is an integer, nil, or t. nil means read in chunks of a file
;;; Functions for encoding RFC2047 messages
;;;
+(defun rfc2047-qp-or-base64 ()
+ "Return the type with which to encode the buffer.
+This is either `base64' or `quoted-printable'."
+ (save-excursion
+ (let ((limit (min (point-max) (+ 2000 (point-min))))
+ (n8bit 0))
+ (goto-char (point-min))
+ (skip-chars-forward "\x20-\x7f\r\n\t" limit)
+ (while (< (point) limit)
+ (incf n8bit)
+ (forward-char 1)
+ (skip-chars-forward "\x20-\x7f\r\n\t" limit))
+ (if (or (< (* 6 n8bit) (- limit (point-min)))
+ ;; Don't base64, say, a short line with a single
+ ;; non-ASCII char when splitting parts by charset.
+ (= n8bit 1))
+ 'quoted-printable
+ 'base64))))
+
(defun rfc2047-narrow-to-field ()
"Narrow the buffer to the header on the current line."
(beginning-of-line)
;; encoding, choose the one that's shorter.
(save-restriction
(narrow-to-region b e)
- (if (eq (mm-qp-or-base64) 'base64)
+ (if (eq (rfc2047-qp-or-base64) 'base64)
'B
'Q))))
(start (concat
;; Be more liberal to accept buggy base64 strings. If
;; base64-decode-string accepts buggy strings, this function could
;; be aliased to identity.
- (case (mod (length string) 4)
- (0 string)
- (1 string) ;; Error, don't pad it.
- (2 (concat string "=="))
- (3 (concat string "="))))
+ (if (= 0 (mod (length string) 4))
+ string
+ (when (string-match "=+$" string)
+ (setq string (substring string 0 (match-beginning 0))))
+ (case (mod (length string) 4)
+ (0 string)
+ (1 string) ;; Error, don't pad it.
+ (2 (concat string "=="))
+ (3 (concat string "=")))))
(defun rfc2047-decode (charset encoding string)
"Decode STRING from the given MIME CHARSET in the given ENCODING.
+2004-09-26 Jesper Harder <harder@ifa.au.dk>
+
+ * sieve.texi (Manage Sieve API): nil -> @code{nil}.
+ * pgg.texi (User Commands, Backend methods): do.
+ * gnus.texi: Markup fixes.
+ (Setting Process Marks): Fix `M P a' entry.
+ * emacs-mime: Fixes.
+
2004-09-23 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-faq.texi ([5.12]): Fix code example for FQDN in Message-Ids
@item mm-inline-large-images
@vindex mm-inline-large-images
-When displaying inline images that are larger than the window, XEmacs
+When displaying inline images that are larger than the window, Emacs
does not enable scrolling, which means that you cannot see the whole
image. To prevent this, the library tries to determine the image size
before displaying it inline, and if it doesn't fit the window, the
@item M P a
@kindex M P a (Summary)
@findex gnus-uu-mark-all
-Mark all articles in series order (@code{gnus-uu-mark-series}).
+Mark all articles in series order (@code{gnus-uu-mark-all}).
@item M P b
@kindex M P b (Summary)
This instructs the @code{imap.el} package to log any exchanges with
the server. The log is stored in the buffer @samp{*imap-log*}. Look
for error messages, which sometimes are tagged with the keyword
-@code{BAD} - but when submitting a bug, make sure to include all the
+@code{BAD}---but when submitting a bug, make sure to include all the
data.
@node Other Sources
While it may be obvious to all, the only headers and articles
available while unplugged are those headers and articles that were
fetched into the Agent while previously plugged. To put it another
-way, "If you forget to fetch something while plugged, you might have a
-less than satisfying unplugged session". For this reason, the Agent
+way, ``If you forget to fetch something while plugged, you might have a
+less than satisfying unplugged session''. For this reason, the Agent
adds two visual effects to your summary buffer. These effects display
the download status of each article so that you always know which
articles will be available when unplugged.
...
@end example
-Then that means "score on the from header of the grandparent of the
-current article". An indirection is quite fast, but it's better to say:
+Then that means ``score on the from header of the grandparent of the
+current article''. An indirection is quite fast, but it's better to say:
@example
(1-
articles becomes the substitute for checking incoming mail. Whether
only unseen articles or all unread articles will be processed is
determined by the @code{spam-autodetect-recheck-messages}. When set
-to t, unread messages will be rechecked.
+to @code{t}, unread messages will be rechecked.
@code{spam-autodetect} grants the user at once more and less control
of spam filtering. The user will have more control over each group's
If encryption is successful, it replaces the current region contents (in
the accessible portion) with the resulting data.
-If optional argument @var{sign} is non-nil, the function is request to
-do a combined sign and encrypt. This currently only work with GnuPG.
+If optional argument @var{sign} is non-@code{nil}, the function is
+request to do a combined sign and encrypt. This currently only work
+with GnuPG.
@end deffn
@deffn Command pgg-decrypt-region start end
@deffn Method pgg-scheme-encrypt-region scheme start end recipients &optional sign
Encrypt the current region between @var{start} and @var{end} for
-@var{recipients}. If @var{sign} is non-nil, do a combined sign and
-encrypt. If encryption is successful, it returns @code{t}, otherwise
-@code{nil}.
+@var{recipients}. If @var{sign} is non-@code{nil}, do a combined sign
+and encrypt. If encryption is successful, it returns @code{t},
+otherwise @code{nil}.
@end deffn
@deffn Method pgg-scheme-decrypt-region scheme start end
@item sieve-manage-log
@vindex sieve-manage-log
-If non-nil, should be a string naming a buffer where a protocol trace
+If non-@code{nil}, should be a string naming a buffer where a protocol trace
is dumped (for debugging purposes).
@end table
@item sieve-manage-havespace
@findex sieve-manage-havespace
-Returns non-nil iff server have roam for a script of given size.
+Returns non-@code{nil} iff server have roam for a script of given
+size.
@item sieve-manage-getscript
@findex sieve-manage-getscript