aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2006-06-07 16:39:16 +0000
committerMiles Bader2006-06-07 16:39:16 +0000
commit26c9afc3239e18b03537faaea33e3e82e28099e6 (patch)
tree41efa20fcb13fa610ca48a497f9adc8a1b849b6b
parent3f168e293115114a645fd9ac9fa8855a21ade478 (diff)
downloademacs-26c9afc3239e18b03537faaea33e3e82e28099e6.tar.gz
emacs-26c9afc3239e18b03537faaea33e3e82e28099e6.zip
Merge from gnus--rel--5.10
Patches applied: * gnus--rel--5.10 (patch 103-104) - Update from CVS Revision: emacs@sv.gnu.org/emacs--devo--0--patch-295
-rw-r--r--lisp/gnus/ChangeLog83
-rw-r--r--lisp/gnus/gnus-agent.el15
-rw-r--r--lisp/gnus/gnus-art.el178
-rw-r--r--lisp/gnus/gnus-ml.el51
-rw-r--r--lisp/gnus/gnus-sum.el63
-rw-r--r--lisp/gnus/imap.el2
-rw-r--r--lisp/gnus/mail-source.el340
-rw-r--r--lisp/gnus/mm-util.el23
-rw-r--r--lisp/gnus/uudecode.el6
-rw-r--r--lisp/pgg-pgp.el44
-rw-r--r--lisp/pgg-pgp5.el48
-rw-r--r--man/ChangeLog4
-rw-r--r--man/gnus.texi34
13 files changed, 587 insertions, 304 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index e8fc773c982..71aa3654da6 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,86 @@
12006-06-06 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * mm-util.el (mm-mime-mule-charset-alist): Use unicode-precedence-list
4 to fill the utf-8 entry.
5
62006-06-05 Dan Christensen <jdc@uwo.ca>
7
8 * gnus-sum.el (gnus-summary-read-group-1): When summary is unthreaded,
9 respect display group parameter and gnus-summary-expunge-below.
10 (gnus-articles-to-read): Remove unused reference to display group
11 parameter.
12 [ Merge 2004-07-06 change from the trunk. ]
13
142006-05-29 Reiner Steib <Reiner.Steib@gmx.de>
15
16 * gnus-ml.el (gnus-mailing-list-subscribe)
17 (gnus-mailing-list-unsubscribe, gnus-mailing-list-owner)
18 (gnus-mailing-list-message): Fix doc strings.
19
202006-05-29 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
21
22 * gnus-ml.el (gnus-mailing-list-message): Use gnus-url-mailto instead
23 of doing it manually.
24
252006-05-29 Kevin Greiner <kevin.greiner@compsol.cc>
26
27 * gnus-agent.el (gnus-agent-possibly-synchronize-flags): A server
28 must be explicitly online rather than "not explicitly offline" for
29 its flags to be synchronized.
30 (gnus-agent-read-local): All symbols allocated in my-obarray
31 (gnus-agent-set-local): Skip invalid entries (min and/or max is nil).
32 (gnus-agent-regenerate-group): Check numeric names to see if they are
33 messages or groups.
34
352006-05-29 Katsumi Yamaoka <yamaoka@jpl.org>
36
37 * gnus-art.el (gnus-save-all-headers): Mention it might be overridden.
38 (gnus-saved-headers): Ditto.
39 (gnus-default-article-saver): Doc fix; add
40 gnus-summary-write-body-to-file; mention functions may have properties.
41 (gnus-article-save-coding-system): New variable.
42 (gnus-article-save): Override gnus-save-all-headers and
43 gnus-saved-headers by :headers property which saver function may have.
44 (gnus-read-save-file-name): Add optional `dir-var' argument which
45 specifies directory in which files are saved; work even if optional
46 `variable' argument is not specified.
47 (gnus-summary-save-in-file): Add properties :decode and :headers.
48 (gnus-summary-write-to-file): Add properties :decode, :function, and
49 :headers; read file name.
50 (gnus-summary-save-body-in-file): Add :decode property; add optional
51 `overwrite' argument.
52 (gnus-summary-write-body-to-file): New function; add properties
53 :decode and :function.
54 (gnus-output-to-file): Add coding cookie and encode text according
55 to gnus-article-save-coding-system; don't use mm-append-to-file.
56
57 * gnus-sum.el (gnus-newsgroup-last-directory): New variable.
58 (gnus-summary-local-variables): Add it.
59 (gnus-summary-save-map): Add gnus-summary-write-article-body-file.
60 (gnus-summary-save-article): Require gnus-art; save decoded articles
61 if function that gnus-default-article-saver specifies has `:decode'
62 property; bind gnus-prompt-before-saving to t when saving many
63 articles in a file; move point to article which will be saved.
64 (gnus-summary-write-article-body-file): New function.
65
662006-05-26 Reiner Steib <Reiner.Steib@gmx.de>
67
68 * uudecode.el (uudecode-decode-region-external): Fix previous commit.
69
702006-05-26 Katsumi Yamaoka <yamaoka@jpl.org>
71
72 * mm-util.el (mm-enrich-utf-8-by-mule-ucs): Don't edit
73 after-load-alist.
74
752006-05-22 Reiner Steib <Reiner.Steib@gmx.de>
76
77 * uudecode.el (uudecode-decode-region-external): nil isn't a valid
78 coding system in XEmacs, use binary.
79
80 * mail-source.el (mail-sources): Fix custom type.
81
82 * imap.el (Commentary): Fix typo.
83
12006-05-18 Reiner Steib <Reiner.Steib@gmx.de> 842006-05-18 Reiner Steib <Reiner.Steib@gmx.de>
2 85
3 * gnus-sum.el (gnus-summary-save-article-mail): Clarify doc string. 86 * gnus-sum.el (gnus-summary-save-article-mail): Clarify doc string.
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 123ad340ae1..f4e9f2e3dc9 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -825,7 +825,7 @@ be a select method."
825 (save-excursion 825 (save-excursion
826 (dolist (gnus-command-method (gnus-agent-covered-methods)) 826 (dolist (gnus-command-method (gnus-agent-covered-methods))
827 (when (and (file-exists-p (gnus-agent-lib-file "flags")) 827 (when (and (file-exists-p (gnus-agent-lib-file "flags"))
828 (not (eq (gnus-server-status gnus-command-method) 'offline))) 828 (eq (gnus-server-status gnus-command-method) 'ok))
829 (gnus-agent-possibly-synchronize-flags-server gnus-command-method))))) 829 (gnus-agent-possibly-synchronize-flags-server gnus-command-method)))))
830 830
831(defun gnus-agent-synchronize-flags-server (method) 831(defun gnus-agent-synchronize-flags-server (method)
@@ -2133,7 +2133,8 @@ modified) original contents, they are first saved to their own file."
2133 (let (group 2133 (let (group
2134 min 2134 min
2135 max 2135 max
2136 (cur (current-buffer))) 2136 (cur (current-buffer))
2137 (obarray my-obarray))
2137 (setq group (read cur) 2138 (setq group (read cur)
2138 min (read cur) 2139 min (read cur)
2139 max (read cur)) 2140 max (read cur))
@@ -2214,7 +2215,9 @@ modified) original contents, they are first saved to their own file."
2214 2215
2215 (if (cond ((and minmax 2216 (if (cond ((and minmax
2216 (or (not (eq min (car minmax))) 2217 (or (not (eq min (car minmax)))
2217 (not (eq max (cdr minmax))))) 2218 (not (eq max (cdr minmax))))
2219 min
2220 max)
2218 (setcar minmax min) 2221 (setcar minmax min)
2219 (setcdr minmax max) 2222 (setcdr minmax max)
2220 t) 2223 t)
@@ -3743,8 +3746,10 @@ If REREAD is not nil, downloaded articles are marked as unread."
3743 (dir (file-name-directory file)) 3746 (dir (file-name-directory file))
3744 point 3747 point
3745 (downloaded (if (file-exists-p dir) 3748 (downloaded (if (file-exists-p dir)
3746 (sort (mapcar (lambda (name) (string-to-number name)) 3749 (sort (delq nil (mapcar (lambda (name)
3747 (directory-files dir nil "^[0-9]+$" t)) 3750 (and (not (file-directory-p (nnheader-concat dir name)))
3751 (string-to-number name)))
3752 (directory-files dir nil "^[0-9]+$" t)))
3748 '>) 3753 '>)
3749 (progn (gnus-make-directory dir) nil))) 3754 (progn (gnus-make-directory dir) nil)))
3750 dl nov-arts 3755 dl nov-arts
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 208103f805d..4722e98ef19 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -492,7 +492,10 @@ be fed to `format-time-string'."
492 :group 'gnus-article-washing) 492 :group 'gnus-article-washing)
493 493
494(defcustom gnus-save-all-headers t 494(defcustom gnus-save-all-headers t
495 "*If non-nil, don't remove any headers before saving." 495 "*If non-nil, don't remove any headers before saving.
496This will be overridden by the `:headers' property that the symbol of
497the saver function, which is specified by `gnus-default-article-saver',
498might have."
496 :group 'gnus-article-saving 499 :group 'gnus-article-saving
497 :type 'boolean) 500 :type 'boolean)
498 501
@@ -513,14 +516,17 @@ each invocation of the saving commands."
513 "Headers to keep if `gnus-save-all-headers' is nil. 516 "Headers to keep if `gnus-save-all-headers' is nil.
514If `gnus-save-all-headers' is non-nil, this variable will be ignored. 517If `gnus-save-all-headers' is non-nil, this variable will be ignored.
515If that variable is nil, however, all headers that match this regexp 518If that variable is nil, however, all headers that match this regexp
516will be kept while the rest will be deleted before saving." 519will be kept while the rest will be deleted before saving. This and
520`gnus-save-all-headers' will be overridden by the `:headers' property
521that the symbol of the saver function, which is specified by
522`gnus-default-article-saver', might have."
517 :group 'gnus-article-saving 523 :group 'gnus-article-saving
518 :type 'regexp) 524 :type 'regexp)
519 525
520(defcustom gnus-default-article-saver 'gnus-summary-save-in-rmail 526(defcustom gnus-default-article-saver 'gnus-summary-save-in-rmail
521 "A function to save articles in your favourite format. 527 "A function to save articles in your favourite format.
522The function must be interactively callable (in other words, it must 528The function will be called by way of the `gnus-summary-save-article'
523be an Emacs command). 529command, and friends such as `gnus-summary-save-article-rmail'.
524 530
525Gnus provides the following functions: 531Gnus provides the following functions:
526 532
@@ -530,7 +536,28 @@ Gnus provides the following functions:
530* gnus-summary-save-in-file (article format) 536* gnus-summary-save-in-file (article format)
531* gnus-summary-save-body-in-file (article body) 537* gnus-summary-save-body-in-file (article body)
532* gnus-summary-save-in-vm (use VM's folder format) 538* gnus-summary-save-in-vm (use VM's folder format)
533* gnus-summary-write-to-file (article format -- overwrite)." 539* gnus-summary-write-to-file (article format -- overwrite)
540* gnus-summary-write-body-to-file (article body -- overwrite)
541
542The symbol of each function may have the following properties:
543
544* :decode
545The value non-nil means save decoded articles. This is meaningful
546only with `gnus-summary-save-in-file', `gnus-summary-save-body-in-file',
547`gnus-summary-write-to-file', and `gnus-summary-write-body-to-file'.
548
549* :function
550The value specifies an alternative function which appends, not
551overwrites, articles to a file. This implies that when saving many
552articles at a time, `gnus-prompt-before-saving' is bound to t and all
553articles are saved in a single file. This is meaningful only with
554`gnus-summary-write-to-file' and `gnus-summary-write-body-to-file'.
555
556* :headers
557The value specifies the symbol of a variable of which the value
558specifies headers to be saved. If it is omitted,
559`gnus-save-all-headers' and `gnus-saved-headers' control what
560headers should be saved."
534 :group 'gnus-article-saving 561 :group 'gnus-article-saving
535 :type '(radio (function-item gnus-summary-save-in-rmail) 562 :type '(radio (function-item gnus-summary-save-in-rmail)
536 (function-item gnus-summary-save-in-mail) 563 (function-item gnus-summary-save-in-mail)
@@ -539,8 +566,49 @@ Gnus provides the following functions:
539 (function-item gnus-summary-save-body-in-file) 566 (function-item gnus-summary-save-body-in-file)
540 (function-item gnus-summary-save-in-vm) 567 (function-item gnus-summary-save-in-vm)
541 (function-item gnus-summary-write-to-file) 568 (function-item gnus-summary-write-to-file)
569 (function-item gnus-summary-write-body-to-file)
542 (function))) 570 (function)))
543 571
572(defcustom gnus-article-save-coding-system
573 (or (and (mm-coding-system-p 'utf-8) 'utf-8)
574 (and (mm-coding-system-p 'iso-2022-7bit) 'iso-2022-7bit)
575 (and (mm-coding-system-p 'emacs-mule) 'emacs-mule)
576 (and (mm-coding-system-p 'escape-quoted) 'escape-quoted))
577 "Coding system used to save decoded articles to a file.
578
579The recommended coding systems are `utf-8', `iso-2022-7bit' and so on,
580which can safely encode any characters in text. This is used by the
581commands including:
582
583* gnus-summary-save-article-file
584* gnus-summary-save-article-body-file
585* gnus-summary-write-article-file
586* gnus-summary-write-article-body-file
587
588and the functions to which you may set `gnus-default-article-saver':
589
590* gnus-summary-save-in-file
591* gnus-summary-save-body-in-file
592* gnus-summary-write-to-file
593* gnus-summary-write-body-to-file
594
595Those commands and functions save just text displayed in the article
596buffer to a file if the value of this variable is non-nil. Note that
597buttonized MIME parts will be lost in a saved file in that case.
598Otherwise, raw articles will be saved."
599 :group 'gnus-article-saving
600 :type `(choice
601 :format "%{%t%}:\n %[Value Menu%] %v"
602 (const :tag "Save raw articles" nil)
603 ,@(delq nil
604 (mapcar
605 (lambda (arg) (if (mm-coding-system-p (nth 3 arg)) arg))
606 '((const :tag "UTF-8" utf-8)
607 (const :tag "iso-2022-7bit" iso-2022-7bit)
608 (const :tag "Emacs internal" emacs-mule)
609 (const :tag "escape-quoted" escape-quoted))))
610 (symbol :tag "Coding system")))
611
544(defcustom gnus-rmail-save-name 'gnus-plain-save-name 612(defcustom gnus-rmail-save-name 'gnus-plain-save-name
545 "A function generating a file name to save articles in Rmail format. 613 "A function generating a file name to save articles in Rmail format.
546The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE." 614The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE."
@@ -3249,10 +3317,13 @@ This format is defined by the `gnus-article-time-format' variable."
3249 3317
3250(defun gnus-article-save (save-buffer file &optional num) 3318(defun gnus-article-save (save-buffer file &optional num)
3251 "Save the currently selected article." 3319 "Save the currently selected article."
3252 (unless gnus-save-all-headers 3320 (when (or (get gnus-default-article-saver :headers)
3253 ;; Remove headers according to `gnus-saved-headers'. 3321 (not gnus-save-all-headers))
3322 ;; Remove headers according to `gnus-saved-headers' or the value
3323 ;; of the `:headers' property that the saver function might have.
3254 (let ((gnus-visible-headers 3324 (let ((gnus-visible-headers
3255 (or gnus-saved-headers gnus-visible-headers)) 3325 (or (symbol-value (get gnus-default-article-saver :headers))
3326 gnus-saved-headers gnus-visible-headers))
3256 (gnus-article-buffer save-buffer)) 3327 (gnus-article-buffer save-buffer))
3257 (save-excursion 3328 (save-excursion
3258 (set-buffer save-buffer) 3329 (set-buffer save-buffer)
@@ -3277,7 +3348,8 @@ This format is defined by the `gnus-article-time-format' variable."
3277 (funcall gnus-default-article-saver filename))))) 3348 (funcall gnus-default-article-saver filename)))))
3278 3349
3279(defun gnus-read-save-file-name (prompt &optional filename 3350(defun gnus-read-save-file-name (prompt &optional filename
3280 function group headers variable) 3351 function group headers variable
3352 dir-var)
3281 (let ((default-name 3353 (let ((default-name
3282 (funcall function group headers (symbol-value variable))) 3354 (funcall function group headers (symbol-value variable)))
3283 result) 3355 result)
@@ -3290,6 +3362,10 @@ This format is defined by the `gnus-article-time-format' variable."
3290 default-name) 3362 default-name)
3291 (filename filename) 3363 (filename filename)
3292 (t 3364 (t
3365 (when (symbol-value dir-var)
3366 (setq default-name (expand-file-name
3367 (file-name-nondirectory default-name)
3368 (symbol-value dir-var))))
3293 (let* ((split-name (gnus-get-split-value gnus-split-methods)) 3369 (let* ((split-name (gnus-get-split-value gnus-split-methods))
3294 (prompt 3370 (prompt
3295 (format prompt 3371 (format prompt
@@ -3354,7 +3430,11 @@ This format is defined by the `gnus-article-time-format' variable."
3354 ;; Possibly translate some characters. 3430 ;; Possibly translate some characters.
3355 (nnheader-translate-file-chars file)))))) 3431 (nnheader-translate-file-chars file))))))
3356 (gnus-make-directory (file-name-directory result)) 3432 (gnus-make-directory (file-name-directory result))
3357 (set variable result))) 3433 (when variable
3434 (set variable result))
3435 (when dir-var
3436 (set dir-var (file-name-directory result)))
3437 result))
3358 3438
3359(defun gnus-article-archive-name (group) 3439(defun gnus-article-archive-name (group)
3360 "Return the first instance of an \"Archive-name\" in the current buffer." 3440 "Return the first instance of an \"Archive-name\" in the current buffer."
@@ -3402,6 +3482,8 @@ Directory to save to is default to `gnus-article-save-directory'."
3402 (gnus-output-to-mail filename))))) 3482 (gnus-output-to-mail filename)))))
3403 filename) 3483 filename)
3404 3484
3485(put 'gnus-summary-save-in-file :decode t)
3486(put 'gnus-summary-save-in-file :headers 'gnus-saved-headers)
3405(defun gnus-summary-save-in-file (&optional filename overwrite) 3487(defun gnus-summary-save-in-file (&optional filename overwrite)
3406 "Append this article to file. 3488 "Append this article to file.
3407Optional argument FILENAME specifies file name. 3489Optional argument FILENAME specifies file name.
@@ -3420,13 +3502,21 @@ Directory to save to is default to `gnus-article-save-directory'."
3420 (gnus-output-to-file filename)))) 3502 (gnus-output-to-file filename))))
3421 filename) 3503 filename)
3422 3504
3505(put 'gnus-summary-write-to-file :decode t)
3506(put 'gnus-summary-write-to-file :function 'gnus-summary-save-in-file)
3507(put 'gnus-summary-write-to-file :headers 'gnus-saved-headers)
3423(defun gnus-summary-write-to-file (&optional filename) 3508(defun gnus-summary-write-to-file (&optional filename)
3424 "Write this article to a file, overwriting it if the file exists. 3509 "Write this article to a file, overwriting it if the file exists.
3425Optional argument FILENAME specifies file name. 3510Optional argument FILENAME specifies file name.
3426The directory to save in defaults to `gnus-article-save-directory'." 3511The directory to save in defaults to `gnus-article-save-directory'."
3427 (gnus-summary-save-in-file nil t)) 3512 (setq filename (gnus-read-save-file-name
3513 "Save %s in file" filename
3514 gnus-file-save-name gnus-newsgroup-name
3515 gnus-current-headers nil 'gnus-newsgroup-last-directory))
3516 (gnus-summary-save-in-file filename t))
3428 3517
3429(defun gnus-summary-save-body-in-file (&optional filename) 3518(put 'gnus-summary-save-body-in-file :decode t)
3519(defun gnus-summary-save-body-in-file (&optional filename overwrite)
3430 "Append this article body to a file. 3520 "Append this article body to a file.
3431Optional argument FILENAME specifies file name. 3521Optional argument FILENAME specifies file name.
3432The directory to save in defaults to `gnus-article-save-directory'." 3522The directory to save in defaults to `gnus-article-save-directory'."
@@ -3440,9 +3530,25 @@ The directory to save in defaults to `gnus-article-save-directory'."
3440 (widen) 3530 (widen)
3441 (when (article-goto-body) 3531 (when (article-goto-body)
3442 (narrow-to-region (point) (point-max))) 3532 (narrow-to-region (point) (point-max)))
3533 (when (and overwrite
3534 (file-exists-p filename))
3535 (delete-file filename))
3443 (gnus-output-to-file filename)))) 3536 (gnus-output-to-file filename))))
3444 filename) 3537 filename)
3445 3538
3539(put 'gnus-summary-write-body-to-file :decode t)
3540(put 'gnus-summary-write-body-to-file
3541 :function 'gnus-summary-save-body-in-file)
3542(defun gnus-summary-write-body-to-file (&optional filename)
3543 "Write this article body to a file, overwriting it if the file exists.
3544Optional argument FILENAME specifies file name.
3545The directory to save in defaults to `gnus-article-save-directory'."
3546 (setq filename (gnus-read-save-file-name
3547 "Save %s body in file" filename
3548 gnus-file-save-name gnus-newsgroup-name
3549 gnus-current-headers nil 'gnus-newsgroup-last-directory))
3550 (gnus-summary-save-body-in-file filename t))
3551
3446(defun gnus-summary-save-in-pipe (&optional command) 3552(defun gnus-summary-save-in-pipe (&optional command)
3447 "Pipe this article to subprocess." 3553 "Pipe this article to subprocess."
3448 (setq command 3554 (setq command
@@ -5182,17 +5288,55 @@ Provided for backwards compatibility."
5182;;; Article savers. 5288;;; Article savers.
5183 5289
5184(defun gnus-output-to-file (file-name) 5290(defun gnus-output-to-file (file-name)
5185 "Append the current article to a file named FILE-NAME." 5291 "Append the current article to a file named FILE-NAME.
5186 (let ((artbuf (current-buffer))) 5292If `gnus-article-save-coding-system' is non-nil, it is used to encode
5293text and used as the value of the coding cookie which is added to the
5294top of a file. Otherwise, this function saves a raw article without
5295the coding cookie."
5296 (let* ((artbuf (current-buffer))
5297 (file-name-coding-system nnmail-pathname-coding-system)
5298 (coding gnus-article-save-coding-system)
5299 (coding-system-for-read (if coding
5300 nil ;; Rely on the coding cookie.
5301 mm-text-coding-system))
5302 (coding-system-for-write (or coding
5303 mm-text-coding-system-for-write
5304 mm-text-coding-system))
5305 (exists (file-exists-p file-name)))
5187 (with-temp-buffer 5306 (with-temp-buffer
5307 (when exists
5308 (insert-file-contents file-name)
5309 (goto-char (point-min))
5310 ;; Remove the existing coding cookie.
5311 (when (looking-at "X-Gnus-Coding-System: .+\n\n")
5312 (delete-region (match-beginning 0) (match-end 0))))
5313 (goto-char (point-max))
5188 (insert-buffer-substring artbuf) 5314 (insert-buffer-substring artbuf)
5189 ;; Append newline at end of the buffer as separator, and then 5315 ;; Append newline at end of the buffer as separator, and then
5190 ;; save it to file. 5316 ;; save it to file.
5191 (goto-char (point-max)) 5317 (goto-char (point-max))
5192 (insert "\n") 5318 (insert "\n")
5193 (let ((file-name-coding-system nnmail-pathname-coding-system)) 5319 (when coding
5194 (mm-append-to-file (point-min) (point-max) file-name)) 5320 ;; If the coding system is not suitable to encode the text,
5195 t))) 5321 ;; ask a user for a proper one.
5322 (when (fboundp 'select-safe-coding-system)
5323 (setq coding (coding-system-base
5324 (save-window-excursion
5325 (select-safe-coding-system (point-min) (point-max)
5326 coding))))
5327 (setq coding-system-for-write
5328 (or (cdr (assq coding '((mule-utf-8 . utf-8))))
5329 coding)))
5330 (goto-char (point-min))
5331 ;; Add the coding cookie.
5332 (insert (format "X-Gnus-Coding-System: -*- coding: %s; -*-\n\n"
5333 coding-system-for-write)))
5334 (if exists
5335 (progn
5336 (write-region (point-min) (point-max) file-name nil 'no-message)
5337 (message "Appended to %s" file-name))
5338 (write-region (point-min) (point-max) file-name))))
5339 t)
5196 5340
5197(defun gnus-narrow-to-page (&optional arg) 5341(defun gnus-narrow-to-page (&optional arg)
5198 "Narrow the article buffer to a page. 5342 "Narrow the article buffer to a page.
diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el
index cde039d03c0..8d475f968d7 100644
--- a/lisp/gnus/gnus-ml.el
+++ b/lisp/gnus/gnus-ml.el
@@ -4,7 +4,7 @@
4;; 2005, 2006 Free Software Foundation, Inc. 4;; 2005, 2006 Free Software Foundation, Inc.
5 5
6;; Author: Julien Gilles <jgilles@free.fr> 6;; Author: Julien Gilles <jgilles@free.fr>
7;; Keywords: news 7;; Keywords: news, mail
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
10 10
@@ -51,8 +51,7 @@
51 "\C-c\C-nu" gnus-mailing-list-unsubscribe 51 "\C-c\C-nu" gnus-mailing-list-unsubscribe
52 "\C-c\C-np" gnus-mailing-list-post 52 "\C-c\C-np" gnus-mailing-list-post
53 "\C-c\C-no" gnus-mailing-list-owner 53 "\C-c\C-no" gnus-mailing-list-owner
54 "\C-c\C-na" gnus-mailing-list-archive 54 "\C-c\C-na" gnus-mailing-list-archive))
55 ))
56 55
57(defun gnus-mailing-list-make-menu-bar () 56(defun gnus-mailing-list-make-menu-bar ()
58 (unless (boundp 'gnus-mailing-list-menu) 57 (unless (boundp 'gnus-mailing-list-menu)
@@ -103,7 +102,8 @@ If FORCE is non-nil, replace the old ones."
103 ;; Set up the menu. 102 ;; Set up the menu.
104 (when (gnus-visual-p 'mailing-list-menu 'menu) 103 (when (gnus-visual-p 'mailing-list-menu 'menu)
105 (gnus-mailing-list-make-menu-bar)) 104 (gnus-mailing-list-make-menu-bar))
106 (gnus-add-minor-mode 'gnus-mailing-list-mode " Mailing-List" gnus-mailing-list-mode-map) 105 (gnus-add-minor-mode 'gnus-mailing-list-mode " Mailing-List"
106 gnus-mailing-list-mode-map)
107 (gnus-run-hooks 'gnus-mailing-list-mode-hook)))) 107 (gnus-run-hooks 'gnus-mailing-list-mode-hook))))
108 108
109;;; Commands 109;;; Commands
@@ -118,7 +118,7 @@ If FORCE is non-nil, replace the old ones."
118 (t (gnus-message 1 "no list-help in this group"))))) 118 (t (gnus-message 1 "no list-help in this group")))))
119 119
120(defun gnus-mailing-list-subscribe () 120(defun gnus-mailing-list-subscribe ()
121 "Subscribe" 121 "Subscribe to mailing list."
122 (interactive) 122 (interactive)
123 (let ((list-subscribe 123 (let ((list-subscribe
124 (with-current-buffer gnus-original-article-buffer 124 (with-current-buffer gnus-original-article-buffer
@@ -127,7 +127,7 @@ If FORCE is non-nil, replace the old ones."
127 (t (gnus-message 1 "no list-subscribe in this group"))))) 127 (t (gnus-message 1 "no list-subscribe in this group")))))
128 128
129(defun gnus-mailing-list-unsubscribe () 129(defun gnus-mailing-list-unsubscribe ()
130 "Unsubscribe" 130 "Unsubscribe from mailing list."
131 (interactive) 131 (interactive)
132 (let ((list-unsubscribe 132 (let ((list-unsubscribe
133 (with-current-buffer gnus-original-article-buffer 133 (with-current-buffer gnus-original-article-buffer
@@ -145,7 +145,7 @@ If FORCE is non-nil, replace the old ones."
145 (t (gnus-message 1 "no list-post in this group"))))) 145 (t (gnus-message 1 "no list-post in this group")))))
146 146
147(defun gnus-mailing-list-owner () 147(defun gnus-mailing-list-owner ()
148 "Mail to the owner" 148 "Mail to the mailing list owner."
149 (interactive) 149 (interactive)
150 (let ((list-owner 150 (let ((list-owner
151 (with-current-buffer gnus-original-article-buffer 151 (with-current-buffer gnus-original-article-buffer
@@ -154,7 +154,7 @@ If FORCE is non-nil, replace the old ones."
154 (t (gnus-message 1 "no list-owner in this group"))))) 154 (t (gnus-message 1 "no list-owner in this group")))))
155 155
156(defun gnus-mailing-list-archive () 156(defun gnus-mailing-list-archive ()
157 "Browse archive" 157 "Browse archive."
158 (interactive) 158 (interactive)
159 (require 'browse-url) 159 (require 'browse-url)
160 (let ((list-archive 160 (let ((list-archive
@@ -169,33 +169,14 @@ If FORCE is non-nil, replace the old ones."
169;;; Utility functions 169;;; Utility functions
170 170
171(defun gnus-mailing-list-message (address) 171(defun gnus-mailing-list-message (address)
172 "" 172 "Send message to ADDRESS.
173 (let ((mailto "") 173ADDRESS is specified by a \"mailto:\" URL."
174 (to ()) 174 (cond
175 (subject "None") 175 ((string-match "<\\(mailto:[^>]*\\)>" address)
176 (body "") 176 (require 'gnus-art)
177 ) 177 (gnus-url-mailto (match-string 1 address)))
178 (cond 178 ;; other case <http://...> to be done.
179 ((string-match "<mailto:\\([^>]*\\)>" address) 179 (t nil)))
180 (let ((args (match-string 1 address)))
181 (cond ; with param
182 ((string-match "\\(.*\\)\\?\\(.*\\)" args)
183 (setq mailto (match-string 1 args))
184 (let ((param (match-string 2 args)))
185 (if (string-match "subject=\\([^&]*\\)" param)
186 (setq subject (match-string 1 param)))
187 (if (string-match "body=\\([^&]*\\)" param)
188 (setq body (match-string 1 param)))
189 (if (string-match "to=\\([^&]*\\)" param)
190 (push (match-string 1 param) to))
191 ))
192 (t (setq mailto args))))) ; without param
193
194 ; other case <http://... to be done.
195 (t nil))
196 (gnus-setup-message 'message (message-mail mailto subject))
197 (insert body)
198 ))
199 180
200(provide 'gnus-ml) 181(provide 'gnus-ml)
201 182
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 5208ae27eb9..66ab41950d1 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1249,6 +1249,7 @@ the type of the variable (string, integer, character, etc).")
1249(defvar gnus-newsgroup-last-mail nil) 1249(defvar gnus-newsgroup-last-mail nil)
1250(defvar gnus-newsgroup-last-folder nil) 1250(defvar gnus-newsgroup-last-folder nil)
1251(defvar gnus-newsgroup-last-file nil) 1251(defvar gnus-newsgroup-last-file nil)
1252(defvar gnus-newsgroup-last-directory nil)
1252(defvar gnus-newsgroup-auto-expire nil) 1253(defvar gnus-newsgroup-auto-expire nil)
1253(defvar gnus-newsgroup-active nil) 1254(defvar gnus-newsgroup-active nil)
1254 1255
@@ -1364,6 +1365,7 @@ This list will always be a subset of gnus-newsgroup-undownloaded.")
1364 gnus-newsgroup-begin gnus-newsgroup-end 1365 gnus-newsgroup-begin gnus-newsgroup-end
1365 gnus-newsgroup-last-rmail gnus-newsgroup-last-mail 1366 gnus-newsgroup-last-rmail gnus-newsgroup-last-mail
1366 gnus-newsgroup-last-folder gnus-newsgroup-last-file 1367 gnus-newsgroup-last-folder gnus-newsgroup-last-file
1368 gnus-newsgroup-last-directory
1367 gnus-newsgroup-auto-expire gnus-newsgroup-unreads 1369 gnus-newsgroup-auto-expire gnus-newsgroup-unreads
1368 gnus-newsgroup-unselected gnus-newsgroup-marked 1370 gnus-newsgroup-unselected gnus-newsgroup-marked
1369 gnus-newsgroup-spam-marked 1371 gnus-newsgroup-spam-marked
@@ -1991,6 +1993,7 @@ increase the score of each group you read."
1991 "r" gnus-summary-save-article-rmail 1993 "r" gnus-summary-save-article-rmail
1992 "f" gnus-summary-save-article-file 1994 "f" gnus-summary-save-article-file
1993 "b" gnus-summary-save-article-body-file 1995 "b" gnus-summary-save-article-body-file
1996 "B" gnus-summary-write-article-body-file
1994 "h" gnus-summary-save-article-folder 1997 "h" gnus-summary-save-article-folder
1995 "v" gnus-summary-save-article-vm 1998 "v" gnus-summary-save-article-vm
1996 "p" gnus-summary-pipe-output 1999 "p" gnus-summary-pipe-output
@@ -3709,16 +3712,10 @@ If NO-DISPLAY, don't generate a summary buffer."
3709 (when gnus-build-sparse-threads 3712 (when gnus-build-sparse-threads
3710 (gnus-build-sparse-threads)) 3713 (gnus-build-sparse-threads))
3711 ;; Find the initial limit. 3714 ;; Find the initial limit.
3712 (if gnus-show-threads 3715 (if show-all
3713 (if show-all 3716 (let ((gnus-newsgroup-dormant nil))
3714 (let ((gnus-newsgroup-dormant nil))
3715 (gnus-summary-initial-limit show-all))
3716 (gnus-summary-initial-limit show-all)) 3717 (gnus-summary-initial-limit show-all))
3717 ;; When unthreaded, all articles are always shown. 3718 (gnus-summary-initial-limit show-all))
3718 (setq gnus-newsgroup-limit
3719 (mapcar
3720 (lambda (header) (mail-header-number header))
3721 gnus-newsgroup-headers)))
3722 ;; Generate the summary buffer. 3719 ;; Generate the summary buffer.
3723 (unless no-display 3720 (unless no-display
3724 (gnus-summary-prepare)) 3721 (gnus-summary-prepare))
@@ -5419,8 +5416,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
5419 5416
5420(defun gnus-articles-to-read (group &optional read-all) 5417(defun gnus-articles-to-read (group &optional read-all)
5421 "Find out what articles the user wants to read." 5418 "Find out what articles the user wants to read."
5422 (let* ((display (gnus-group-find-parameter group 'display)) 5419 (let* ((articles
5423 (articles
5424 ;; Select all articles if `read-all' is non-nil, or if there 5420 ;; Select all articles if `read-all' is non-nil, or if there
5425 ;; are no unread articles. 5421 ;; are no unread articles.
5426 (if (or read-all 5422 (if (or read-all
@@ -10993,12 +10989,26 @@ If N is a positive number, save the N next articles.
10993If N is a negative number, save the N previous articles. 10989If N is a negative number, save the N previous articles.
10994If N is nil and any articles have been marked with the process mark, 10990If N is nil and any articles have been marked with the process mark,
10995save those articles instead. 10991save those articles instead.
10996The variable `gnus-default-article-saver' specifies the saver function." 10992The variable `gnus-default-article-saver' specifies the saver function.
10993
10994If the optional second argument NOT-SAVED is non-nil, articles saved
10995will not be marked as saved."
10997 (interactive "P") 10996 (interactive "P")
10997 (require 'gnus-art)
10998 (let* ((articles (gnus-summary-work-articles n)) 10998 (let* ((articles (gnus-summary-work-articles n))
10999 (save-buffer (save-excursion 10999 (save-buffer (save-excursion
11000 (nnheader-set-temp-buffer " *Gnus Save*"))) 11000 (nnheader-set-temp-buffer " *Gnus Save*")))
11001 (num (length articles)) 11001 (num (length articles))
11002 ;; Whether to save decoded articles or raw articles.
11003 (decode (when gnus-article-save-coding-system
11004 (get gnus-default-article-saver :decode)))
11005 ;; When saving many articles in a single file, use the other
11006 ;; function to save articles other than the first one.
11007 (saver2 (get gnus-default-article-saver :function))
11008 (gnus-prompt-before-saving (if saver2
11009 t
11010 gnus-prompt-before-saving))
11011 (gnus-default-article-saver gnus-default-article-saver)
11002 header file) 11012 header file)
11003 (dolist (article articles) 11013 (dolist (article articles)
11004 (setq header (gnus-summary-article-header article)) 11014 (setq header (gnus-summary-article-header article))
@@ -11009,17 +11019,25 @@ The variable `gnus-default-article-saver' specifies the saver function."
11009 (gnus-message 1 "Article %d is unsaveable" article)) 11019 (gnus-message 1 "Article %d is unsaveable" article))
11010 ;; This is a real article. 11020 ;; This is a real article.
11011 (save-window-excursion 11021 (save-window-excursion
11012 (let ((gnus-display-mime-function nil) 11022 (let ((gnus-display-mime-function (when decode
11013 (gnus-article-prepare-hook nil)) 11023 gnus-display-mime-function))
11014 (gnus-summary-select-article t nil nil article))) 11024 (gnus-article-prepare-hook (when decode
11025 gnus-article-prepare-hook)))
11026 (gnus-summary-select-article t nil nil article)
11027 (gnus-summary-goto-subject article)))
11015 (save-excursion 11028 (save-excursion
11016 (set-buffer save-buffer) 11029 (set-buffer save-buffer)
11017 (erase-buffer) 11030 (erase-buffer)
11018 (insert-buffer-substring gnus-original-article-buffer)) 11031 (insert-buffer-substring (if decode
11032 gnus-article-buffer
11033 gnus-original-article-buffer)))
11019 (setq file (gnus-article-save save-buffer file num)) 11034 (setq file (gnus-article-save save-buffer file num))
11020 (gnus-summary-remove-process-mark article) 11035 (gnus-summary-remove-process-mark article)
11021 (unless not-saved 11036 (unless not-saved
11022 (gnus-summary-set-saved-mark article)))) 11037 (gnus-summary-set-saved-mark article)))
11038 (when saver2
11039 (setq gnus-default-article-saver saver2
11040 saver2 nil)))
11023 (gnus-kill-buffer save-buffer) 11041 (gnus-kill-buffer save-buffer)
11024 (gnus-summary-position-point) 11042 (gnus-summary-position-point)
11025 (gnus-set-mode-line 'summary) 11043 (gnus-set-mode-line 'summary)
@@ -11097,6 +11115,17 @@ save those articles instead."
11097 (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file)) 11115 (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file))
11098 (gnus-summary-save-article arg))) 11116 (gnus-summary-save-article arg)))
11099 11117
11118(defun gnus-summary-write-article-body-file (&optional arg)
11119 "Write the current article body to a file, deleting the previous file.
11120If N is a positive number, save the N next articles.
11121If N is a negative number, save the N previous articles.
11122If N is nil and any articles have been marked with the process mark,
11123save those articles instead."
11124 (interactive "P")
11125 (require 'gnus-art)
11126 (let ((gnus-default-article-saver 'gnus-summary-write-body-to-file))
11127 (gnus-summary-save-article arg)))
11128
11100(defun gnus-summary-muttprint (&optional arg) 11129(defun gnus-summary-muttprint (&optional arg)
11101 "Print the current article using Muttprint. 11130 "Print the current article using Muttprint.
11102If N is a positive number, save the N next articles. 11131If N is a positive number, save the N next articles.
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el
index 7b40773ca06..16fce1843db 100644
--- a/lisp/gnus/imap.el
+++ b/lisp/gnus/imap.el
@@ -79,7 +79,7 @@
79;; (NAMESPACE), RFC2359 (UIDPLUS), the IMAP-part of RFC2595 (STARTTLS, 79;; (NAMESPACE), RFC2359 (UIDPLUS), the IMAP-part of RFC2595 (STARTTLS,
80;; LOGINDISABLED) (with use of external library starttls.el and 80;; LOGINDISABLED) (with use of external library starttls.el and
81;; program starttls) and the GSSAPI / kerberos V4 sections of RFC1731 81;; program starttls) and the GSSAPI / kerberos V4 sections of RFC1731
82;; (with use of external program `imtest'). It also take advantage 82;; (with use of external program `imtest'). It also takes advantage of
83;; the UNSELECT extension in Cyrus IMAPD. 83;; the UNSELECT extension in Cyrus IMAPD.
84;; 84;;
85;; Without the work of John McClary Prevost and Jim Radford this library 85;; Without the work of John McClary Prevost and Jim Radford this library
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 9683f28154b..e350468bea4 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -63,175 +63,177 @@ This variable is a list of mail source specifiers.
63See Info node `(gnus)Mail Source Specifiers'." 63See Info node `(gnus)Mail Source Specifiers'."
64 :group 'mail-source 64 :group 'mail-source
65 :link '(custom-manual "(gnus)Mail Source Specifiers") 65 :link '(custom-manual "(gnus)Mail Source Specifiers")
66 :type `(repeat 66 :type `(choice
67 (choice :format "%[Value Menu%] %v" 67 (const nil)
68 :value (file) 68 (repeat
69 (cons :tag "Spool file" 69 (choice :format "%[Value Menu%] %v"
70 (const :format "" file) 70 :value (file)
71 (checklist :tag "Options" :greedy t 71 (cons :tag "Spool file"
72 (group :inline t 72 (const :format "" file)
73 (const :format "" :value :path) 73 (checklist :tag "Options" :greedy t
74 file))) 74 (group :inline t
75 (cons :tag "Several files in a directory" 75 (const :format "" :value :path)
76 (const :format "" directory) 76 file)))
77 (checklist :tag "Options" :greedy t 77 (cons :tag "Several files in a directory"
78 (group :inline t 78 (const :format "" directory)
79 (const :format "" :value :path) 79 (checklist :tag "Options" :greedy t
80 (directory :tag "Path")) 80 (group :inline t
81 (group :inline t 81 (const :format "" :value :path)
82 (const :format "" :value :suffix) 82 (directory :tag "Path"))
83 (string :tag "Suffix")) 83 (group :inline t
84 (group :inline t 84 (const :format "" :value :suffix)
85 (const :format "" :value :predicate) 85 (string :tag "Suffix"))
86 (function :tag "Predicate")) 86 (group :inline t
87 (group :inline t 87 (const :format "" :value :predicate)
88 (const :format "" :value :prescript) 88 (function :tag "Predicate"))
89 (choice :tag "Prescript" 89 (group :inline t
90 :value nil 90 (const :format "" :value :prescript)
91 (string :format "%v") 91 (choice :tag "Prescript"
92 (function :format "%v"))) 92 :value nil
93 (group :inline t 93 (string :format "%v")
94 (const :format "" :value :postscript) 94 (function :format "%v")))
95 (choice :tag "Postscript" 95 (group :inline t
96 :value nil 96 (const :format "" :value :postscript)
97 (string :format "%v") 97 (choice :tag "Postscript"
98 (function :format "%v"))) 98 :value nil
99 (group :inline t 99 (string :format "%v")
100 (const :format "" :value :plugged) 100 (function :format "%v")))
101 (boolean :tag "Plugged")))) 101 (group :inline t
102 (cons :tag "POP3 server" 102 (const :format "" :value :plugged)
103 (const :format "" pop) 103 (boolean :tag "Plugged"))))
104 (checklist :tag "Options" :greedy t 104 (cons :tag "POP3 server"
105 (group :inline t 105 (const :format "" pop)
106 (const :format "" :value :server) 106 (checklist :tag "Options" :greedy t
107 (string :tag "Server")) 107 (group :inline t
108 (group :inline t 108 (const :format "" :value :server)
109 (const :format "" :value :port) 109 (string :tag "Server"))
110 (choice :tag "Port" 110 (group :inline t
111 :value "pop3" 111 (const :format "" :value :port)
112 (number :format "%v") 112 (choice :tag "Port"
113 (string :format "%v"))) 113 :value "pop3"
114 (group :inline t 114 (number :format "%v")
115 (const :format "" :value :user) 115 (string :format "%v")))
116 (string :tag "User")) 116 (group :inline t
117 (group :inline t 117 (const :format "" :value :user)
118 (const :format "" :value :password) 118 (string :tag "User"))
119 (string :tag "Password")) 119 (group :inline t
120 (group :inline t 120 (const :format "" :value :password)
121 (const :format "" :value :program) 121 (string :tag "Password"))
122 (string :tag "Program")) 122 (group :inline t
123 (group :inline t 123 (const :format "" :value :program)
124 (const :format "" :value :prescript) 124 (string :tag "Program"))
125 (choice :tag "Prescript" 125 (group :inline t
126 :value nil 126 (const :format "" :value :prescript)
127 (string :format "%v") 127 (choice :tag "Prescript"
128 (function :format "%v"))) 128 :value nil
129 (group :inline t 129 (string :format "%v")
130 (const :format "" :value :postscript) 130 (function :format "%v")))
131 (choice :tag "Postscript" 131 (group :inline t
132 :value nil 132 (const :format "" :value :postscript)
133 (string :format "%v") 133 (choice :tag "Postscript"
134 (function :format "%v"))) 134 :value nil
135 (group :inline t 135 (string :format "%v")
136 (const :format "" :value :function) 136 (function :format "%v")))
137 (function :tag "Function")) 137 (group :inline t
138 (group :inline t 138 (const :format "" :value :function)
139 (const :format "" 139 (function :tag "Function"))
140 :value :authentication) 140 (group :inline t
141 (choice :tag "Authentication" 141 (const :format ""
142 :value apop 142 :value :authentication)
143 (const password) 143 (choice :tag "Authentication"
144 (const apop))) 144 :value apop
145 (group :inline t 145 (const password)
146 (const :format "" :value :plugged) 146 (const apop)))
147 (boolean :tag "Plugged")))) 147 (group :inline t
148 (cons :tag "Maildir (qmail, postfix...)" 148 (const :format "" :value :plugged)
149 (const :format "" maildir) 149 (boolean :tag "Plugged"))))
150 (checklist :tag "Options" :greedy t 150 (cons :tag "Maildir (qmail, postfix...)"
151 (group :inline t 151 (const :format "" maildir)
152 (const :format "" :value :path) 152 (checklist :tag "Options" :greedy t
153 (directory :tag "Path")) 153 (group :inline t
154 (group :inline t 154 (const :format "" :value :path)
155 (const :format "" :value :plugged) 155 (directory :tag "Path"))
156 (boolean :tag "Plugged")))) 156 (group :inline t
157 (cons :tag "IMAP server" 157 (const :format "" :value :plugged)
158 (const :format "" imap) 158 (boolean :tag "Plugged"))))
159 (checklist :tag "Options" :greedy t 159 (cons :tag "IMAP server"
160 (group :inline t 160 (const :format "" imap)
161 (const :format "" :value :server) 161 (checklist :tag "Options" :greedy t
162 (string :tag "Server")) 162 (group :inline t
163 (group :inline t 163 (const :format "" :value :server)
164 (const :format "" :value :port) 164 (string :tag "Server"))
165 (choice :tag "Port" 165 (group :inline t
166 :value 143 166 (const :format "" :value :port)
167 number string)) 167 (choice :tag "Port"
168 (group :inline t 168 :value 143
169 (const :format "" :value :user) 169 number string))
170 (string :tag "User")) 170 (group :inline t
171 (group :inline t 171 (const :format "" :value :user)
172 (const :format "" :value :password) 172 (string :tag "User"))
173 (string :tag "Password")) 173 (group :inline t
174 (group :inline t 174 (const :format "" :value :password)
175 (const :format "" :value :stream) 175 (string :tag "Password"))
176 (choice :tag "Stream" 176 (group :inline t
177 :value network 177 (const :format "" :value :stream)
178 ,@mail-source-imap-streams)) 178 (choice :tag "Stream"
179 (group :inline t 179 :value network
180 (const :format "" :value :program) 180 ,@mail-source-imap-streams))
181 (string :tag "Program")) 181 (group :inline t
182 (group :inline t 182 (const :format "" :value :program)
183 (const :format "" 183 (string :tag "Program"))
184 :value :authenticator) 184 (group :inline t
185 (choice :tag "Authenticator" 185 (const :format ""
186 :value login 186 :value :authenticator)
187 ,@mail-source-imap-authenticators)) 187 (choice :tag "Authenticator"
188 (group :inline t 188 :value login
189 (const :format "" :value :mailbox) 189 ,@mail-source-imap-authenticators))
190 (string :tag "Mailbox" 190 (group :inline t
191 :value "INBOX")) 191 (const :format "" :value :mailbox)
192 (group :inline t 192 (string :tag "Mailbox"
193 (const :format "" :value :predicate) 193 :value "INBOX"))
194 (string :tag "Predicate" 194 (group :inline t
195 :value "UNSEEN UNDELETED")) 195 (const :format "" :value :predicate)
196 (group :inline t 196 (string :tag "Predicate"
197 (const :format "" :value :fetchflag) 197 :value "UNSEEN UNDELETED"))
198 (string :tag "Fetchflag" 198 (group :inline t
199 :value "\\Deleted")) 199 (const :format "" :value :fetchflag)
200 (group :inline t 200 (string :tag "Fetchflag"
201 (const :format "" 201 :value "\\Deleted"))
202 :value :dontexpunge) 202 (group :inline t
203 (boolean :tag "Dontexpunge")) 203 (const :format ""
204 (group :inline t 204 :value :dontexpunge)
205 (const :format "" :value :plugged) 205 (boolean :tag "Dontexpunge"))
206 (boolean :tag "Plugged")))) 206 (group :inline t
207 (cons :tag "Webmail server" 207 (const :format "" :value :plugged)
208 (const :format "" webmail) 208 (boolean :tag "Plugged"))))
209 (checklist :tag "Options" :greedy t 209 (cons :tag "Webmail server"
210 (group :inline t 210 (const :format "" webmail)
211 (const :format "" :value :subtype) 211 (checklist :tag "Options" :greedy t
212 ;; Should be generated from 212 (group :inline t
213 ;; `webmail-type-definition', but we 213 (const :format "" :value :subtype)
214 ;; can't require webmail without W3. 214 ;; Should be generated from
215 (choice :tag "Subtype" 215 ;; `webmail-type-definition', but we
216 :value hotmail 216 ;; can't require webmail without W3.
217 (const hotmail) 217 (choice :tag "Subtype"
218 (const yahoo) 218 :value hotmail
219 (const netaddress) 219 (const hotmail)
220 (const netscape) 220 (const yahoo)
221 (const my-deja))) 221 (const netaddress)
222 (group :inline t 222 (const netscape)
223 (const :format "" :value :user) 223 (const my-deja)))
224 (string :tag "User")) 224 (group :inline t
225 (group :inline t 225 (const :format "" :value :user)
226 (const :format "" :value :password) 226 (string :tag "User"))
227 (string :tag "Password")) 227 (group :inline t
228 (group :inline t 228 (const :format "" :value :password)
229 (const :format "" 229 (string :tag "Password"))
230 :value :dontexpunge) 230 (group :inline t
231 (boolean :tag "Dontexpunge")) 231 (const :format ""
232 (group :inline t 232 :value :dontexpunge)
233 (const :format "" :value :plugged) 233 (boolean :tag "Dontexpunge"))
234 (boolean :tag "Plugged"))))))) 234 (group :inline t
235 (const :format "" :value :plugged)
236 (boolean :tag "Plugged"))))))))
235 237
236(defcustom mail-source-ignore-errors nil 238(defcustom mail-source-ignore-errors nil
237 "*Ignore errors when querying mail sources. 239 "*Ignore errors when querying mail sources.
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index e16750cfcf6..634d1f66675 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -364,14 +364,17 @@ could use `autoload-coding-system' here."
364 (iso-2022-jp-3 latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208 364 (iso-2022-jp-3 latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
365 japanese-jisx0213-1 japanese-jisx0213-2) 365 japanese-jisx0213-1 japanese-jisx0213-2)
366 (shift_jis latin-jisx0201 katakana-jisx0201 japanese-jisx0208) 366 (shift_jis latin-jisx0201 katakana-jisx0201 japanese-jisx0208)
367 ,(if (or (not (fboundp 'charsetp)) ;; non-Mule case 367 ,(cond ((fboundp 'unicode-precedence-list)
368 (charsetp 'unicode-a) 368 (cons 'utf-8 (delq 'ascii (mapcar 'charset-name
369 (not (mm-coding-system-p 'mule-utf-8))) 369 (unicode-precedence-list)))))
370 '(utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e) 370 ((or (not (fboundp 'charsetp)) ;; non-Mule case
371 ;; If we have utf-8 we're in Mule 5+. 371 (charsetp 'unicode-a)
372 (append '(utf-8) 372 (not (mm-coding-system-p 'mule-utf-8)))
373 (delete 'ascii 373 '(utf-8 unicode-a unicode-b unicode-c unicode-d unicode-e))
374 (coding-system-get 'mule-utf-8 'safe-charsets))))) 374 (t ;; If we have utf-8 we're in Mule 5+.
375 (append '(utf-8)
376 (delete 'ascii
377 (coding-system-get 'mule-utf-8 'safe-charsets))))))
375 "Alist of MIME-charset/MULE-charsets.") 378 "Alist of MIME-charset/MULE-charsets.")
376 379
377(defun mm-enrich-utf-8-by-mule-ucs () 380(defun mm-enrich-utf-8-by-mule-ucs ()
@@ -379,10 +382,6 @@ could use `autoload-coding-system' here."
379This function will run when the `un-define' module is loaded under 382This function will run when the `un-define' module is loaded under
380XEmacs, and fill the `utf-8' entry in `mm-mime-mule-charset-alist' 383XEmacs, and fill the `utf-8' entry in `mm-mime-mule-charset-alist'
381with Mule charsets. It is completely useless for Emacs." 384with Mule charsets. It is completely useless for Emacs."
382 (unless (cdr (delete '(mm-enrich-utf-8-by-mule-ucs)
383 (assoc "un-define" after-load-alist)))
384 (setq after-load-alist
385 (delete '("un-define") after-load-alist)))
386 (when (boundp 'unicode-basic-translation-charset-order-list) 385 (when (boundp 'unicode-basic-translation-charset-order-list)
387 (condition-case nil 386 (condition-case nil
388 (let ((val (delq 387 (let ((val (delq
diff --git a/lisp/gnus/uudecode.el b/lisp/gnus/uudecode.el
index f47a8e90c3a..616348e899f 100644
--- a/lisp/gnus/uudecode.el
+++ b/lisp/gnus/uudecode.el
@@ -100,7 +100,11 @@ used is specified by `uudecode-decoder-program'."
100 (make-temp-name "uu") 100 (make-temp-name "uu")
101 uudecode-temporary-file-directory)))) 101 uudecode-temporary-file-directory))))
102 (let ((cdir default-directory) 102 (let ((cdir default-directory)
103 default-process-coding-system) 103 (default-process-coding-system
104 (if (featurep 'xemacs)
105 ;; In XEmacs, `nil' is not a valid coding system.
106 '(binary . binary)
107 nil)))
104 (unwind-protect 108 (unwind-protect
105 (with-temp-buffer 109 (with-temp-buffer
106 (insert "begin 600 " (file-name-nondirectory tempfile) "\n") 110 (insert "begin 600 " (file-name-nondirectory tempfile) "\n")
diff --git a/lisp/pgg-pgp.el b/lisp/pgg-pgp.el
index f58fd0d3c6d..e53a0c2c867 100644
--- a/lisp/pgg-pgp.el
+++ b/lisp/pgg-pgp.el
@@ -136,21 +136,21 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
136 "Encrypt the current region between START and END." 136 "Encrypt the current region between START and END."
137 (let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id)) 137 (let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
138 (passphrase (or passphrase 138 (passphrase (or passphrase
139 (when sign 139 (when sign
140 (pgg-read-passphrase 140 (pgg-read-passphrase
141 (format "PGP passphrase for %s: " 141 (format "PGP passphrase for %s: "
142 pgg-pgp-user-id) 142 pgg-pgp-user-id)
143 pgg-pgp-user-id)))) 143 pgg-pgp-user-id))))
144 (args 144 (args
145 (append 145 (append
146 `("+encrypttoself=off +verbose=1" "+batchmode" 146 `("+encrypttoself=off +verbose=1" "+batchmode"
147 "+language=us" "-fate" 147 "+language=us" "-fate"
148 ,@(if recipients 148 ,@(if recipients
149 (mapcar (lambda (rcpt) (concat "\"" rcpt "\"")) 149 (mapcar (lambda (rcpt) (concat "\"" rcpt "\""))
150 (append recipients 150 (append recipients
151 (if pgg-encrypt-for-me 151 (if pgg-encrypt-for-me
152 (list pgg-pgp-user-id)))))) 152 (list pgg-pgp-user-id))))))
153 (if sign '("-s" "-u" pgg-pgp-user-id))))) 153 (if sign '("-s" "-u" pgg-pgp-user-id)))))
154 (pgg-pgp-process-region start end nil pgg-pgp-program args) 154 (pgg-pgp-process-region start end nil pgg-pgp-program args)
155 (pgg-process-when-success nil))) 155 (pgg-process-when-success nil)))
156 156
@@ -162,11 +162,11 @@ passphrase cache or user."
162 (let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id)) 162 (let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
163 (key (pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt)) 163 (key (pgg-pgp-lookup-key pgg-pgp-user-id 'encrypt))
164 (passphrase 164 (passphrase
165 (or passphrase 165 (or passphrase
166 (pgg-read-passphrase 166 (pgg-read-passphrase
167 (format "PGP passphrase for %s: " pgg-pgp-user-id) key))) 167 (format "PGP passphrase for %s: " pgg-pgp-user-id) key)))
168 (args 168 (args
169 '("+verbose=1" "+batchmode" "+language=us" "-f"))) 169 '("+verbose=1" "+batchmode" "+language=us" "-f")))
170 (pgg-pgp-process-region start end passphrase pgg-pgp-program args) 170 (pgg-pgp-process-region start end passphrase pgg-pgp-program args)
171 (pgg-process-when-success 171 (pgg-process-when-success
172 (if pgg-cache-passphrase 172 (if pgg-cache-passphrase
@@ -179,10 +179,10 @@ If optional PASSPHRASE is not specified, it will be obtained from the
179passphrase cache or user." 179passphrase cache or user."
180 (let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id)) 180 (let* ((pgg-pgp-user-id (or pgg-pgp-user-id pgg-default-user-id))
181 (passphrase 181 (passphrase
182 (or passphrase 182 (or passphrase
183 (pgg-read-passphrase 183 (pgg-read-passphrase
184 (format "PGP passphrase for %s: " pgg-pgp-user-id) 184 (format "PGP passphrase for %s: " pgg-pgp-user-id)
185 (pgg-pgp-lookup-key pgg-pgp-user-id 'sign)))) 185 (pgg-pgp-lookup-key pgg-pgp-user-id 'sign))))
186 (args 186 (args
187 (list (if clearsign "-fast" "-fbast") 187 (list (if clearsign "-fast" "-fbast")
188 "+verbose=1" "+language=us" "+batchmode" 188 "+verbose=1" "+language=us" "+batchmode"
diff --git a/lisp/pgg-pgp5.el b/lisp/pgg-pgp5.el
index 3cba59916e5..75c96e59909 100644
--- a/lisp/pgg-pgp5.el
+++ b/lisp/pgg-pgp5.el
@@ -147,23 +147,23 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
147 "Encrypt the current region between START and END." 147 "Encrypt the current region between START and END."
148 (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id)) 148 (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
149 (passphrase (or passphrase 149 (passphrase (or passphrase
150 (when sign 150 (when sign
151 (pgg-read-passphrase 151 (pgg-read-passphrase
152 (format "PGP passphrase for %s: " 152 (format "PGP passphrase for %s: "
153 pgg-pgp5-user-id) 153 pgg-pgp5-user-id)
154 pgg-pgp5-user-id)))) 154 pgg-pgp5-user-id))))
155 (args 155 (args
156 (append 156 (append
157 `("+NoBatchInvalidKeys=off" "-fat" "+batchmode=1" 157 `("+NoBatchInvalidKeys=off" "-fat" "+batchmode=1"
158 ,@(if recipients 158 ,@(if recipients
159 (apply #'append 159 (apply #'append
160 (mapcar (lambda (rcpt) 160 (mapcar (lambda (rcpt)
161 (list "-r" 161 (list "-r"
162 (concat "\"" rcpt "\""))) 162 (concat "\"" rcpt "\"")))
163 (append recipients 163 (append recipients
164 (if pgg-encrypt-for-me 164 (if pgg-encrypt-for-me
165 (list pgg-pgp5-user-id))))))) 165 (list pgg-pgp5-user-id)))))))
166 (if sign '("-s" "-u" pgg-pgp5-user-id))))) 166 (if sign '("-s" "-u" pgg-pgp5-user-id)))))
167 (pgg-pgp5-process-region start end nil pgg-pgp5-pgpe-program args) 167 (pgg-pgp5-process-region start end nil pgg-pgp5-pgpe-program args)
168 (pgg-process-when-success nil))) 168 (pgg-process-when-success nil)))
169 169
@@ -171,10 +171,10 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
171 "Decrypt the current region between START and END." 171 "Decrypt the current region between START and END."
172 (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id)) 172 (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
173 (passphrase 173 (passphrase
174 (or passphrase 174 (or passphrase
175 (pgg-read-passphrase 175 (pgg-read-passphrase
176 (format "PGP passphrase for %s: " pgg-pgp5-user-id) 176 (format "PGP passphrase for %s: " pgg-pgp5-user-id)
177 (pgg-pgp5-lookup-key pgg-pgp5-user-id 'encrypt)))) 177 (pgg-pgp5-lookup-key pgg-pgp5-user-id 'encrypt))))
178 (args 178 (args
179 '("+verbose=1" "+batchmode=1" "+language=us" "-f"))) 179 '("+verbose=1" "+batchmode=1" "+language=us" "-f")))
180 (pgg-pgp5-process-region start end passphrase pgg-pgp5-pgpv-program args) 180 (pgg-pgp5-process-region start end passphrase pgg-pgp5-pgpv-program args)
@@ -184,10 +184,10 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
184 "Make detached signature from text between START and END." 184 "Make detached signature from text between START and END."
185 (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id)) 185 (let* ((pgg-pgp5-user-id (or pgg-pgp5-user-id pgg-default-user-id))
186 (passphrase 186 (passphrase
187 (or passphrase 187 (or passphrase
188 (pgg-read-passphrase 188 (pgg-read-passphrase
189 (format "PGP passphrase for %s: " pgg-pgp5-user-id) 189 (format "PGP passphrase for %s: " pgg-pgp5-user-id)
190 (pgg-pgp5-lookup-key pgg-pgp5-user-id 'sign)))) 190 (pgg-pgp5-lookup-key pgg-pgp5-user-id 'sign))))
191 (args 191 (args
192 (list (if clearsign "-fat" "-fbat") 192 (list (if clearsign "-fat" "-fbat")
193 "+verbose=1" "+language=us" "+batchmode=1" 193 "+verbose=1" "+language=us" "+batchmode=1"
diff --git a/man/ChangeLog b/man/ChangeLog
index cefa3606171..1e491962d61 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,7 @@
12006-05-18 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus.texi (Saving Articles): Clarify gnus-summary-save-article-mail.
4
12006-06-07 Nick Roberts <nickrob@snap.net.nz> 52006-06-07 Nick Roberts <nickrob@snap.net.nz>
2 6
3 * building.texi (Watch Expressions): Move node to end. 7 * building.texi (Watch Expressions): Move node to end.
diff --git a/man/gnus.texi b/man/gnus.texi
index 3cac858469c..91c223155b1 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -7456,7 +7456,7 @@ files.
7456 7456
7457@vindex gnus-default-article-saver 7457@vindex gnus-default-article-saver
7458You can customize the @code{gnus-default-article-saver} variable to make 7458You can customize the @code{gnus-default-article-saver} variable to make
7459Gnus do what you want it to. You can use any of the six ready-made 7459Gnus do what you want it to. You can use any of the eight ready-made
7460functions below, or you can create your own. 7460functions below, or you can create your own.
7461 7461
7462@table @code 7462@table @code
@@ -7497,6 +7497,13 @@ Append the article body to an ordinary file. Uses the function in the
7497@code{gnus-file-save-name} variable to get a file name to save the 7497@code{gnus-file-save-name} variable to get a file name to save the
7498article in. The default is @code{gnus-numeric-save-name}. 7498article in. The default is @code{gnus-numeric-save-name}.
7499 7499
7500@item gnus-summary-write-body-to-file
7501@findex gnus-summary-write-body-to-file
7502Write the article body straight to an ordinary file. The file is
7503overwritten if it exists. Uses the function in the
7504@code{gnus-file-save-name} variable to get a file name to save the
7505article in. The default is @code{gnus-numeric-save-name}.
7506
7500@item gnus-summary-save-in-folder 7507@item gnus-summary-save-in-folder
7501@findex gnus-summary-save-in-folder 7508@findex gnus-summary-save-in-folder
7502@findex gnus-folder-save-name 7509@findex gnus-folder-save-name
@@ -7516,6 +7523,31 @@ Save the article in a VM folder. You have to have the VM mail
7516reader to use this setting. 7523reader to use this setting.
7517@end table 7524@end table
7518 7525
7526The symbol of each function may have the following properties:
7527
7528@table @code
7529@item :decode
7530The value non-@code{nil} means save decoded articles. This is
7531meaningful only with @code{gnus-summary-save-in-file},
7532@code{gnus-summary-save-body-in-file},
7533@code{gnus-summary-write-to-file}, and
7534@code{gnus-summary-write-body-to-file}.
7535
7536@item :function
7537The value specifies an alternative function which appends, not
7538overwrites, articles to a file. This implies that when saving many
7539articles at a time, @code{gnus-prompt-before-saving} is bound to
7540@code{t} and all articles are saved in a single file. This is
7541meaningful only with @code{gnus-summary-write-to-file} and
7542@code{gnus-summary-write-body-to-file}.
7543
7544@item :headers
7545The value specifies the symbol of a variable of which the value
7546specifies headers to be saved. If it is omitted,
7547@code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
7548headers should be saved.
7549@end table
7550
7519@vindex gnus-article-save-directory 7551@vindex gnus-article-save-directory
7520All of these functions, except for the last one, will save the article 7552All of these functions, except for the last one, will save the article
7521in the @code{gnus-article-save-directory}, which is initialized from the 7553in the @code{gnus-article-save-directory}, which is initialized from the