From 747e12ff1c149822165748232ac93d20e359c2ca Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 26 Oct 2004 13:22:27 +0000 Subject: [PATCH] Synch to No Gnus 200410261250. --- lisp/ChangeLog | 48 +++++++++++++++++++++++++++++++++++++++++++++++- lisp/gnus-agent.el | 2 +- lisp/gnus-registry.el | 2 ++ lisp/gnus-start.el | 46 ++++++++++++++++++++++++++++++++-------------- lisp/hashcash.el | 2 +- lisp/html2text.el | 22 +++++++++------------- lisp/message.el | 27 +++++++++++++++++++++++---- lisp/nnspool.el | 5 ++++- lisp/pop3.el | 9 ++++++++- lisp/spam-stat.el | 2 ++ lisp/spam.el | 2 ++ texi/ChangeLog | 15 +++++++++++++++ texi/gnus-ja.texi | 28 ++++++++++++++++------------ texi/gnus.texi | 35 ++++++++++++++++++++--------------- texi/message-ja.texi | 2 +- texi/message.texi | 3 +-- 16 files changed, 184 insertions(+), 66 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bfb9675..6605379 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2004-10-26 Katsumi Yamaoka + + * nnspool.el (nnspool-spool-directory): Use news-path if the + news-directory variable is not bound. + + * gnus-start.el (gnus-check-reasonable-setup): Use an alternative + function instead of display-warning if it is not available. + +2004-10-26 Reiner Steib + + * gnus-agent.el (gnus-agent-expire-group-1): Fix last merge from + v5-10: Use `point-at-bol'. + +2004-10-26 Simon Josefsson + + * hashcash.el: Fix URL in comment, reported by Cheng Gao + . + +2004-10-25 Reiner Steib + + * html2text.el (html2text-buffer-head): Removed. Use `goto-char' + instead. + 2004-10-25 Teodor Zlatanov * nnimap.el (nnimap-remove-server-from-buffer-alist): new function @@ -93,6 +116,29 @@ * nnimap.el (nnimap-open-connection): use netrc-machine-user-or-password +2004-10-17 Richard M. Stallman + + * gnus-registry.el (gnus-registry-unload-hook): + Set as a variable with add-hook. + + * nnspool.el (nnspool-spool-directory): Use news-directory instead + of news-path. + + * spam-stat.el (spam-stat-unload-hook): Set as a variable w/ add-hook. + + * spam.el: Delete duplicate `provide'. + (spam-unload-hook): Set as a variable with add-hook. + +2004-10-15 Reiner Steib + + * pop3.el (pop3-leave-mail-on-server): Describe possible problems + in the doc string. + + * message.el (message-ignored-news-headers) + (message-ignored-supersedes-headers) + (message-ignored-resent-headers) + (message-forward-ignored-headers): Improve custom type. + 2004-10-13 Katsumi Yamaoka * message.el (message-tokenize-header): Fix 2004-09-06 change @@ -2505,7 +2551,7 @@ 2004-03-04 Kevin Greiner - * gnus-agent.el (gnus-agent-file-header-cache): Removed. + * gnus-agent.el (gnus-agent-file-header-cache): Removed. (gnus-agent-possibly-alter-active): Avoid null in numeric comparison. (gnus-agent-set-local): Refuse to save null in local object table. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index eddf402..632e263 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -3921,7 +3921,7 @@ entry of article %s deleted." l1)) gnus-agent-article-alist)))) (when regenerated - (gnus-agent-update-files-total-fetched-for group nil))) + (gnus-agent-update-files-total-fetched-for group nil))) (gnus-message 5 "") regenerated))) diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el index 62d438f..c939d6a 100644 --- a/lisp/gnus-registry.el +++ b/lisp/gnus-registry.el @@ -706,6 +706,8 @@ Returns the first place where the trail finds a group name." (remove-hook 'gnus-summary-prepare-hook 'gnus-registry-register-message-ids)) +(add-hook 'gnus-registry-unload-hook 'gnus-registry-unload-hook) + (when gnus-registry-install (gnus-registry-install-hooks) (gnus-registry-read)) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index e940a43..4c06c79 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -3287,21 +3287,39 @@ Would otherwise be an alias for `display-time-event-handler'." nil)))) (defun gnus-check-reasonable-setup () ;; Check whether nnml and nnfolder share a directory. - (let ((actives nil)) + (let ((display-warn + (if (boundp 'display-warning) + 'display-warning + (lambda (type message) + (if noninteractive + (message "Warning (%s): %s" type message) + (let (window) + (with-current-buffer (get-buffer-create "*Warnings*") + (goto-char (point-max)) + (unless (bolp) + (insert "\n")) + (insert (format "Warning (%s): %s\n" type message)) + (setq window (display-buffer (current-buffer))) + (set-window-start + window + (prog2 + (forward-line (- 1 (window-height window))) + (point) + (goto-char (point-max)))))))))) + method active actives match) (dolist (server gnus-server-alist) - (let* ((method (gnus-server-to-method server)) - (active (intern (format "%s-active-file" (car method)))) - match) - (when (and (member (car method) '(nnml nnfolder)) - (gnus-server-opened method) - (boundp active)) - (when (setq match (assoc (symbol-value active) actives)) - (display-warning - :warning (format "%s and %s share the same active file %s" - (car method) - (cadr match) - (car match)))) - (push (list (symbol-value active) method) actives)))))) + (setq method (gnus-server-to-method server) + active (intern (format "%s-active-file" (car method)))) + (when (and (member (car method) '(nnml nnfolder)) + (gnus-server-opened method) + (boundp active)) + (when (setq match (assoc (symbol-value active) actives)) + (funcall display-warn 'gnus-server + (format "%s and %s share the same active file %s" + (car method) + (cadr match) + (car match)))) + (push (list (symbol-value active) method) actives))))) (provide 'gnus-start) diff --git a/lisp/hashcash.el b/lisp/hashcash.el index b63bf16..712eb87 100644 --- a/lisp/hashcash.el +++ b/lisp/hashcash.el @@ -25,7 +25,7 @@ ;;; Commentary: -;; The hashcash binary is at http://www.cypherspace.org/hashcash/ +;; The hashcash binary is at http://www.hashcash.org/. ;; ;; Call mail-add-payment to add a hashcash payment to a mail message ;; in the current buffer. diff --git a/lisp/html2text.el b/lisp/html2text.el index 1fa0c0b..511a139 100644 --- a/lisp/html2text.el +++ b/lisp/html2text.el @@ -116,10 +116,6 @@ formatting, and then moved afterward.") ;; ;; -(defun html2text-buffer-head () - (if (string= mode-name "Article") - (beginning-of-buffer) - (beginning-of-buffer))) (defun html2text-replace-string (from-string to-string p1 p2) (goto-char p1) @@ -321,11 +317,11 @@ formatting, and then moved afterward.") "This _tries_ to fix up the paragraphs - this is done in quite a ad-hook fashion, quite close to pure guess-work. It does work in some cases though." (interactive) - (html2text-buffer-head) + (goto-char (point-min)) (replace-regexp "^
$" "") ;; Removing lonely
on a single line, if they are left intact we ;; dont have any paragraphs at all. - (html2text-buffer-head) + (goto-char (point-min)) (while (not (eobp)) (let ((p1 (point))) (forward-paragraph 1) @@ -351,8 +347,8 @@ fashion, quite close to pure guess-work. It does work in some cases though." See the documentation for that variable." (interactive) (dolist (tag tag-list) - (html2text-buffer-head) - (while (re-search-forward (format "]*>" tag) (point-max) t) + (goto-char (point-min)) + (while (re-search-forward (format "\\(]*>\\)" tag) (point-max) t) (delete-region (match-beginning 0) (match-end 0))))) (defun html2text-format-tags () @@ -361,8 +357,8 @@ See the documentation for that variable." (dolist (tag-and-function html2text-format-tag-list) (let ((tag (car tag-and-function)) (function (cdr tag-and-function))) - (html2text-buffer-head) - (while (re-search-forward (format "<%s\\( [^>]*\\)?>" tag) + (goto-char (point-min)) + (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) (point-max) t) (let ((p1) (p2 (point)) @@ -382,7 +378,7 @@ See the documentation for that variable." "See the variable \"html2text-replace-list\" for documentation" (interactive) (dolist (e html2text-replace-list) - (html2text-buffer-head) + (goto-char (point-min)) (let ((old-string (car e)) (new-string (cdr e))) (html2text-replace-string old-string new-string (point-min) (point-max))) @@ -394,8 +390,8 @@ See the documentation for that variable." (dolist (tag-and-function html2text-format-single-element-list) (let ((tag (car tag-and-function)) (function (cdr tag-and-function))) - (html2text-buffer-head) - (while (re-search-forward (format "<%s\\( [^>]*\\)?>" tag) + (goto-char (point-min)) + (while (re-search-forward (format "\\(<%s\\( [^>]*\\)?>\\)" tag) (point-max) t) (let ((p1) (p2 (point))) diff --git a/lisp/message.el b/lisp/message.el index 6bc1aa6..dcf4e6c 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -419,7 +419,12 @@ included. Organization and User-Agent are optional." :group 'message-news :group 'message-headers :link '(custom-manual "(message)Message Headers") - :type 'regexp) + :type '(repeat :value-to-internal (lambda (widget value) + (custom-split-regexp-maybe value)) + :match (lambda (widget value) + (or (stringp value) + (widget-editable-list-match widget value))) + regexp)) (defcustom message-ignored-mail-headers "^[GF]cc:\\|^Resent-Fcc:\\|^Xref:\\|^X-Draft-From:\\|^X-Gnus-Agent-Meta-Information:" @@ -435,7 +440,12 @@ It's best to delete old Path and Date headers before posting to avoid any confusion." :group 'message-interface :link '(custom-manual "(message)Superseding") - :type 'regexp) + :type '(repeat :value-to-internal (lambda (widget value) + (custom-split-regexp-maybe value)) + :match (lambda (widget value) + (or (stringp value) + (widget-editable-list-match widget value))) + regexp)) (defcustom message-supersede-setup-function 'message-supersede-setup-for-mime-edit @@ -652,13 +662,22 @@ Done before generating the new subject of a forward." "*All headers that match this regexp will be deleted when resending a message." :group 'message-interface :link '(custom-manual "(message)Resending") - :type 'regexp) + :type '(repeat :value-to-internal (lambda (widget value) + (custom-split-regexp-maybe value)) + :match (lambda (widget value) + (or (stringp value) + (widget-editable-list-match widget value))) + regexp)) (defcustom message-forward-ignored-headers "^Content-Transfer-Encoding:\\|^X-Gnus" "*All headers that match this regexp will be deleted when forwarding a message." :version "21.1" :group 'message-forwarding - :type '(choice (const :tag "None" nil) + :type '(repeat :value-to-internal (lambda (widget value) + (custom-split-regexp-maybe value)) + :match (lambda (widget value) + (or (stringp value) + (widget-editable-list-match widget value))) regexp)) (defcustom message-ignored-cited-headers "." diff --git a/lisp/nnspool.el b/lisp/nnspool.el index c949b40..996ab64 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -45,7 +45,10 @@ This is most commonly `inews' or `injnews'.") "Switches for nnspool-request-post to pass to `inews' for posting news. If you are using Cnews, you probably should set this variable to nil.") -(defvoo nnspool-spool-directory (file-name-as-directory news-path) +(defvoo nnspool-spool-directory + (file-name-as-directory (if (boundp 'news-directory) + (symbol-value 'news-directory) + news-path)) "Local news spool directory.") (defvoo nnspool-nov-directory (concat nnspool-spool-directory "over.view/") diff --git a/lisp/pop3.el b/lisp/pop3.el index 7316465..cd75469 100644 --- a/lisp/pop3.el +++ b/lisp/pop3.el @@ -131,7 +131,14 @@ values are 'apop." :group 'pop3) (defcustom pop3-leave-mail-on-server nil - "*Non-nil if the mail is to be left on the POP server after fetching." + "*Non-nil if the mail is to be left on the POP server after fetching. + +If the `pop3-leave-mail-on-server' is non-`nil' the mail is to be +left on the POP server after fetching. Note that POP servers +maintain no state information between sessions, so what the +client believes is there and what is actually there may not match +up. If they do not, then the whole thing can fall apart and +leave you with a corrupt mailbox." :version "21.4" ;; Oort Gnus :type 'boolean :group 'pop3) diff --git a/lisp/spam-stat.el b/lisp/spam-stat.el index b0c3535..e3bc83f 100644 --- a/lisp/spam-stat.el +++ b/lisp/spam-stat.el @@ -605,6 +605,8 @@ COUNT defaults to 5" (remove-hook 'gnus-select-article-hook 'spam-stat-store-gnus-article-buffer)) +(add-hook 'spam-stat-unload-hook 'spam-stat-unload-hook) + (provide 'spam-stat) ;;; spam-stat.el ends here diff --git a/lisp/spam.el b/lisp/spam.el index 9a44ab2..52043ae 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -2867,6 +2867,8 @@ installed through spam-necessary-extra-headers." (remove-hook 'gnus-get-new-news-hook 'spam-setup-widening) (remove-hook 'gnus-summary-prepare-hook 'spam-find-spam)) +(add-hook 'spam-unload-hook 'spam-unload-hook) + (when spam-install-hooks (spam-initialize)) ;;}}} diff --git a/texi/ChangeLog b/texi/ChangeLog index 82162b5..82346a4 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,18 @@ +2004-10-26 Simon Josefsson + + * gnus.texi (Hashcash): Fix URL. Add pref to spam section. + (Anti-spam Hashcash Payments): No need to load hashcash.el now. + +2004-10-15 Reiner Steib + + * gnus.texi (New Features): Add 5.11. + + * message.texi (Resending): Remove wrong default value. + + * gnus.texi (Mail Source Specifiers): Describe possible problems + of `pop3-leave-mail-on-server'. Add `pop3-movemail' and + `pop3-leave-mail-on-server' to the index. + 2004-10-15 Reiner Steib * gnus.texi (Adaptive Scoring): Added gnus-adaptive-pretty-print. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index ac34ce0..4cfd338 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -903,7 +903,7 @@ New Features * Red Gnus:: $B;0HVL\$N:G>e$N$b$N(B---Gnus 5.4/5.5 * Quassia Gnus:: 2 $B$+$1$k(B 2 $B$O(B 4$B!"$b$7$/$O(B Gnus 5.6/5.7 * Pterodactyl Gnus:: $B8^HVL\!"(BP $B$G;O$^$k!"$b$7$/$O(B Gnus 5.8/5.9 $B$H$7$FCN$i$l$F$$$k$b$N(B -* Oort Gnus:: $B5pBg$J!#1s$/MZ$+$J!#(BGnus 5.10$B!#(B +* Oort Gnus:: $B5pBg$J!#1s$/MZ$+$J!#(BGnus 5.10/5.11$B!#(B * No Gnus:: Lars $B$5$s!"D>$7$F(B! Customization @@ -12795,10 +12795,16 @@ fetchmail %u@@%s -P %p %t $B$9!#%G%#%U%)%k%H$O(B @code{nil} $B$G$9!#(B @end table +@vindex pop3-movemail +@vindex pop3-leave-mail-on-server @code{:program} $B$H(B @code{:function} $B%-!<%o!<%I$,;XDj$5$l$F$$$J$$$H!"(B -@code{pop3-movemail} $B$,;HMQ$5$l$^$9!#(B +@code{pop3-movemail} $B$,;HMQ$5$l$^$9!#(B@code{pop3-movemail} $B$r;H$&>l9g!"(B @code{pop3-leave-mail-on-server} $B$,Hs(B-@code{nil} $B$@$C$?$i!"%a!<%k$OuBV$N>pJs$r0];}$7$^$;$s!#%/%i%$%"%s%H$,?.Mj$G$-$k>pJs$O%/%i%$(B +$B%"%s%H$=$N$b$N$K$"$j$^$9$,!"pJs$r0];}$7$J$$>l9g$O!"$9$Y$F$,Jx2u(B +$B$7$F!"$"$J$?$O2u$l$?%a!<%k%\%C%/%9$H$H$b$KCV$-5n$j$K$J$k2DG=@-$,$"$j$^$9!#(B $B$3$l$O$$$/$D$+$NNc$G$9!#=i4|MxMQ$G!"=i4|(B @acronym{POP} $B%5!<%P!<$+$i(B $B\$7$$$3$H!"$=$7$F$3$N5!G=$r;H$&$?$a$K%$%s%9%H!<%k$9$kI,MW$,$"$k30It%"%W(B $B%j%1!<%7%g%s$N(B @code{hashcash} $B$K$D$$$F(B -$B$O(B @uref{http://www.cypherspace.org/~adam/hashcash/} $B$r;2>H$7$F2<$5$$!#(B -$B$5$i$J$k>pJs$,(B @uref{http://www.camram.org/} $B$G8+$D$+$k$G$7$g$&!#(B +$B$O(B @uref{http://www.hashcash.org/} $B$r;2>H$7$F2<$5$$!#$5$i$J$k>pJs(B +$B$,(B @uref{http://www.camram.org/} $B$G8+$D$+$k$G$7$g$&!#(B $BAw?.$9$k%a%C%;!<%8$N$=$l$>$l$K$D$$$F(B hashcash $B$r@8@.$5$;$h$&$H;W$&$J$i!"(B $B0J2<$N$h$&$K(B @code{message-generate-hashcash} (@pxref{Mail Headers,,Mail @@ -21636,7 +21642,7 @@ Gnus $B$O(B hashcash $B%/%C%-!<$rG'>Z$9$k$3$H$,$G$-$^$9$,!"e$N$b$N(B---Gnus 5.4/5.5 * Quassia Gnus:: 2 $B$+$1$k(B 2 $B$O(B 4$B!"$b$7$/$O(B Gnus 5.6/5.7 * Pterodactyl Gnus:: $B8^HVL\!"(BP $B$G;O$^$k!"$b$7$/$O(B Gnus 5.8/5.9 $B$H$7$FCN$i$l$F$$$k$b$N(B -* Oort Gnus:: $B5pBg$J!#1s$/MZ$+$J!#(BGnus 5.10$B!#(B +* Oort Gnus:: $B5pBg$J!#1s$/MZ$+$J!#(BGnus 5.10/5.11$B!#(B * No Gnus:: Lars $B$5$s!"D>$7$F(B! @end menu diff --git a/texi/gnus.texi b/texi/gnus.texi index a232f7b..0ade938 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -888,7 +888,7 @@ New Features * Red Gnus:: Third time best---Gnus 5.4/5.5. * Quassia Gnus:: Two times two is four, or Gnus 5.6/5.7. * Pterodactyl Gnus:: Pentad also starts with P, AKA Gnus 5.8/5.9. -* Oort Gnus:: It's big. It's far out. Gnus 5.10. +* Oort Gnus:: It's big. It's far out. Gnus 5.10/5.11. * No Gnus:: Lars, FIXME! Customization @@ -13593,10 +13593,16 @@ message retrieval. The default is @code{nil}. @end table +@vindex pop3-movemail +@vindex pop3-leave-mail-on-server If the @code{:program} and @code{:function} keywords aren't specified, @code{pop3-movemail} will be used. If the @code{pop3-leave-mail-on-server} is non-@code{nil} the mail is to be -left on the POP server after fetching. +left on the @acronym{POP} server after fetching when using +@code{pop3-movemail}. Note that POP servers maintain no state +information between sessions, so what the client believes is there and +what is actually there may not match up. If they do not, then the whole +thing can fall apart and leave you with a corrupt mailbox. Here are some examples. Fetch from the default @acronym{POP} server, using the default user name, and default fetcher: @@ -22492,11 +22498,11 @@ one of them separately. @cindex X-Hashcash The ``something costly'' is to burn CPU time, more specifically to compute a hash collision up to a certain number of bits. The -resulting hashcash cookie is inserted in a @samp{X-Hashcash:} -header. For more details, and for the external application -@code{hashcash} you need to install to use this feature, see -@uref{http://www.cypherspace.org/~adam/hashcash/}. Even more -information can be found at @uref{http://www.camram.org/}. +resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header. +For more details, and for the external application @code{hashcash} you +need to install to use this feature, see +@uref{http://www.hashcash.org/}. Even more information can be found +at @uref{http://www.camram.org/}. If you wish to generate hashcash for each message you send, you can customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail @@ -22541,7 +22547,8 @@ hand customized mail filtering scripts. To verify a hashcash cookie in a message, use the @code{mail-check-payment} function in the @code{hashcash.el} library. You can also use the @code{spam.el} package with the @code{spam-use-hashcash} backend to validate hashcash -cookies in incoming mail and filter mail accordingly. +cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam +Hashcash Payments}). @node Filtering Spam Using The Spam ELisp Package @subsection Filtering Spam Using The Spam ELisp Package @@ -23356,12 +23363,10 @@ Gmane provides. Similar to @code{spam-use-whitelist} (@pxref{Blacklists and Whitelists}), but uses hashcash tokens for whitelisting messages -instead of the sender address. You must have the @code{hashcash.el} -package loaded for @code{spam-use-hashcash} to work properly. -Messages without a hashcash payment token will be sent to the next -spam-split rule. This is an explicit filter, meaning that unless a -hashcash token is found, the messages are not assumed to be spam or -ham. +instead of the sender address. Messages without a hashcash payment +token will be sent to the next spam-split rule. This is an explicit +filter, meaning that unless a hashcash token is found, the messages +are not assumed to be spam or ham. @end defvar @@ -25061,7 +25066,7 @@ actually are people who are using Gnus. Who'd'a thunk it! * Red Gnus:: Third time best---Gnus 5.4/5.5. * Quassia Gnus:: Two times two is four, or Gnus 5.6/5.7. * Pterodactyl Gnus:: Pentad also starts with P, AKA Gnus 5.8/5.9. -* Oort Gnus:: It's big. It's far out. Gnus 5.10. +* Oort Gnus:: It's big. It's far out. Gnus 5.10/5.11. * No Gnus:: Lars, FIXME! @end menu diff --git a/texi/message-ja.texi b/texi/message-ja.texi index 8b0d40f..f7d050d 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -326,7 +326,7 @@ non @acronym{MIME}-savvy versions of Gnus would do. @vindex message-ignored-resent-headers $B@55,I=8=(B @code{message-ignored-resent-headers} $B$K9gCW$9$k%X%C%@!<$O%a%C(B -$B%;!<%8$rAw$kA0$K