From 8252b0b9a27f98fe3e84cbc4a6e33770788b11cb Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 11 Sep 2005 22:50:32 +0000 Subject: [PATCH] Synch to No Gnus 200509112237. --- lisp/ChangeLog | 21 ++++++++++++++++++++- lisp/ChangeLog.2 | 4 ++-- lisp/html2text.el | 38 ++++++++++++++++++++++++++++++++++++-- lisp/message.el | 24 +++++++++++++++++------- lisp/nnml.el | 8 +++++++- lisp/spam-report.el | 4 +++- texi/ChangeLog | 9 +++++++++ texi/gnus-ja.texi | 12 ++++++++++-- texi/gnus.texi | 10 +++++++++- texi/message-ja.texi | 22 +++++++++++++++++----- texi/message.texi | 19 +++++++++++++++++-- 11 files changed, 147 insertions(+), 24 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 16e46e6..be292b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,21 @@ +2005-09-11 Jari Aalto + + * html2text.el: (html2text-replace-list): Add new entities. + 2005-09-11 Romain Francoise + * message.el (message-alternative-emails): Improve docstring. + (message-setup-1): Call `message-use-alternative-email-as-from' + after `message-setup-hook' to give it precedence over posting + styles, etc. + (message-use-alternative-email-as-from): Add docstring. Remove + the original From header if present. + + * nnml.el (nnml-compressed-files-size-threshold): New variable. + (nnml-save-mail): Use it. + * gnus-uu.el (gnus-uu-mark-series): Return number of marked - articles. New argument `silent'. + articles. Add new argument `silent'. (gnus-uu-mark-all): Report the total number of marked articles. 2005-09-10 Romain Francoise @@ -9,6 +23,11 @@ * gnus-uu.el (gnus-message-process-mark): Use gnus-message. (gnus-uu-mark-series): Likewise. +2005-09-10 Reiner Steib + + * spam-report.el (spam-report-gmane): Fix generation of spam + report URL. + 2005-09-10 Simon Josefsson * gnus-agent.el (gnus-agent-synchronize-flags): Make the default diff --git a/lisp/ChangeLog.2 b/lisp/ChangeLog.2 index 6bbec68..f3fd679 100644 --- a/lisp/ChangeLog.2 +++ b/lisp/ChangeLog.2 @@ -7658,7 +7658,7 @@ * spam.el: more compilation fixes for BBDB - * spam-stat.el added code from Alex Schroeder + * spam-stat.el: added code from Alex Schroeder (spam-stat-reduce-size): Interactive. (spam-stat-reset): New function. (spam-stat-save): Interactive. @@ -12404,7 +12404,7 @@ 2001-12-05 Katsumi Yamaoka - * mm-view.wl (mm-inline-text): Decode a charset-encoded rich text. + * mm-view.el (mm-inline-text): Decode a charset-encoded rich text. 2001-12-04 08:00:00 ShengHuo ZHU diff --git a/lisp/html2text.el b/lisp/html2text.el index 53d3ff8..7e9f2ef 100644 --- a/lisp/html2text.el +++ b/lisp/html2text.el @@ -43,8 +43,42 @@ (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr))) (defvar html2text-replace-list - '((" " . " ") (">" . ">") ("<" . "<") (""" . "\"") - ("&" . "&") ("'" . "'")) + '(("´" . "`") + ("&" . "&") + ("'" . "'") + ("¦" . "|") + ("¢" . "c") + ("ˆ" . "^") + ("©" . "(C)") + ("¤" . "(#)") + ("°" . "degree") + ("÷" . "/") + ("€" . "e") + ("½" . "1/2") + (">" . ">") + ("¿" . "?") + ("«" . "<<") + ("&ldquo" . "\"") + ("‹" . "(") + ("‘" . "`") + ("<" . "<") + ("—" . "--") + (" " . " ") + ("–" . "-") + ("‰" . "%%") + ("±" . "+-") + ("£" . "£") + (""" . "\"") + ("»" . ">>") + ("&rdquo" . "\"") + ("®" . "(R)") + ("›" . ")") + ("’" . "'") + ("§" . "§") + ("¹" . "^1") + ("²" . "^2") + ("³" . "^3") + ("˜" . "~")) "The map of entity to text. This is an alist were each element is a dotted pair consisting of an diff --git a/lisp/message.el b/lisp/message.el index 1ffad3f..71a8263 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1634,8 +1634,13 @@ should be sent in several parts. If it is nil, the size is unlimited." (integer 1000000))) (defcustom message-alternative-emails nil - "A regexp to match the alternative email addresses. -The first matched address (not primary one) is used in the From field." + "*Regexp matching alternative email addresses. +The first address in the To, Cc or From headers of the original +article matching this variable is used as the From field of +outgoing messages. + +This variable has precedence over posting styles and anything that runs +off `message-setup-hook'." :group 'message-headers :link '(custom-manual "(message)Message Headers") :type '(choice (const :tag "Always use primary" nil) @@ -6226,11 +6231,6 @@ are not included." (when message-default-mail-headers (insert message-default-mail-headers) (or (bolp) (insert ?\n))) - (save-restriction - (message-narrow-to-headers) - (if (and replybuffer - message-alternative-emails) - (message-use-alternative-email-as-from))) (when message-generate-headers-first (message-generate-headers (message-headers-to-generate @@ -6249,6 +6249,12 @@ are not included." ;; Generate hashcash headers for recipients already known (mail-add-payment-async)) (run-hooks 'message-setup-hook) + ;; Do this last to give it precedence over posting styles, etc. + (when (message-mail-p) + (save-restriction + (message-narrow-to-headers) + (if message-alternative-emails + (message-use-alternative-email-as-from)))) (message-position-point) (undo-boundary)) @@ -7697,6 +7703,9 @@ regexp VARSTR." (read-string prompt initial-contents)))) (defun message-use-alternative-email-as-from () + "Set From field of the outgoing message to the first matching +address in `message-alternative-emails', looking at To, Cc and +From headers in the original article." (require 'mail-utils) (let* ((fields '("To" "Cc" "From")) (emails @@ -7711,6 +7720,7 @@ regexp VARSTR." emails nil)) (pop emails)) (unless (or (not email) (equal email user-mail-address)) + (message-remove-header "From") (goto-char (point-max)) (insert "From: " (let ((user-mail-address email)) (message-make-from)) "\n")))) diff --git a/lisp/nnml.el b/lisp/nnml.el index 2249bab..dcdb5ea 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -86,6 +86,12 @@ marks file will be regenerated properly by Gnus.") (defvoo nnml-use-compressed-files nil "If non-nil, allow using compressed message files.") +(defvoo nnml-compressed-files-size-threshold 1000 + "Default size threshold for compressed message files. +Message files with bodies larger than that many characters will +be automatically compressed if `nnml-use-compressed-files' is +non-nil.") + (defconst nnml-version "nnml 1.0" @@ -623,7 +629,7 @@ marks file will be regenerated properly by Gnus.") (setq chars (nnmail-insert-lines)) (setq extension (and nnml-use-compressed-files - (> chars 1000) + (> chars nnml-compressed-files-size-threshold) ".gz")) (nnmail-insert-xref group-art) (run-hooks 'nnmail-prepare-save-mail-hook) diff --git a/lisp/spam-report.el b/lisp/spam-report.el index b437dba..b985e5b 100644 --- a/lisp/spam-report.el +++ b/lisp/spam-report.el @@ -150,7 +150,9 @@ Reports is as ham when HAM is set." (match-string 1 field))) (setq report (match-string 2 field)) (when (string-equal "permalink.gmane.org" host) - (setq host "spam.gmane.org")) + (setq host "spam.gmane.org") + (setq report (gnus-replace-in-string + report "/\\([0-9]+\\)$" ":\\1"))) (setq url (format "http://%s%s" host report)) (if (not (and host report url)) (gnus-message diff --git a/texi/ChangeLog b/texi/ChangeLog index 10153a6..e825e15 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,12 @@ +2005-09-11 Romain Francoise + + * message.texi (Message Headers): Explain what + `message-alternative-emails' does in more detail. + + * gnus.texi (Mail Spool): Mention that `nnml-use-compressed-files' + requires `auto-compression-mode' to be enabled. Add new nnml + variable `nnml-compressed-files-size-threshold'. + 2005-09-07 Reiner Steib * gnus.texi (Sorting the Summary Buffer): Added diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index ba3b243..1e9d685 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -14397,8 +14397,16 @@ rmail box $B$N$?$a$N%"%/%F%#%V%U%!%$%k$NL>A0!#4{DjCM(B @item nnml-use-compressed-files @vindex nnml-use-compressed-files -$BHs(B-@code{nil} $B$@$C$?$i(B @code{nnml} $B$O05=L$5$l$?%a%C%;!<%8%U%!%$%k$r;H$&(B -$B$3$H$r9MN8$KF~$l$^$9!#(B +$BHs(B-@code{nil} $B$@$C$?$i(B @code{nnml} $B$O%a%C%;!<%8%U%!%$%k$r05=L$7$^$9!#$?(B +$B$@$7(B @code{auto-compression-mode} $B$,M-8z$K$J$C$F$$$J$1$l$P$J$j$^$;(B +$B$s(B (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs +Manual})$B!#(B + +@item nnml-compressed-files-size-threshold +@vindex nnml-compressed-files-size-threshold +$B%a%C%;!<%8%U%!%$%k$r05=L$9$k$+$I$&$+$rH=CG$9$k$?$a$N!"%5%$%:$NogCM$G$9!#(B +@code{nnml-use-compressed-files} $B$,Hs(B-@code{nil} $B$K@_Dj$5$l$F$$$F!"K\J8(B +$B$NJ8;z?t$,$3$NJQ?t$NCM$h$jBg$-$+$C$?$i!"%a%C%;!<%8%U%!%$%k$O05=L$5$l$^$9!#(B @end table @findex nnml-generate-nov-databases diff --git a/texi/gnus.texi b/texi/gnus.texi index 979d094..cf49eee 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -15119,7 +15119,15 @@ The name of the @dfn{marks} files. The default is @file{.marks}. @item nnml-use-compressed-files @vindex nnml-use-compressed-files If non-@code{nil}, @code{nnml} will allow using compressed message -files. +files. This variable requires @code{auto-compression-mode} to be +enabled (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs +Manual}) + +@item nnml-compressed-files-size-threshold +@vindex nnml-compressed-files-size-threshold +Default size threshold for compressed message files. Message files with +bodies larger than that many characters will be automatically compressed +if @code{nnml-use-compressed-files} is non-nil. @end table diff --git a/texi/message-ja.texi b/texi/message-ja.texi index b00e8f8..6c2c05d 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -1403,11 +1403,23 @@ Message $B$,(B gnus $B>e$GAv$C$F$$$k>l9g!"%a%C%;!<%8%P%C%U%!$O%I%i%U%H%0%k!<% @item message-alternative-emails @vindex message-alternative-emails -$BBe$o$j$N%a!<%k%"%I%l%9$K9gCW$9$k@55,I=8=$G$9!#:G=i$K%^%C%A$7$?(B ($BBh0l5A$G(B -$B$O$J$$(B) $B%"%I%l%9$,(B @code{From} $B%U%#!<%k%I$G;H$o$l$^$9!#(B -($BLuCm(B: To $B$+(B Cc $B$K$"$k%"%I%l%9$G!":G=i$K$3$N@55,I=8=$K9gCW$7!"(B -$B$+$D(B @code{user-mail-address} $B$H$O0c$&$b$N$,!"(B@code{From} $B%U%#!<%k%I$N%a!<(B -$B%k%"%I%l%9$H$7$F;H$o$l$^$9!#(B) +$BBe$o$j$N%a!<%k%"%I%l%9$K9gCW$9$k@55,I=8=$G$9!#85$N5-;v$N(B To$B!"(BCc $B$^$?$O(B +From $B%X%C%@!<$K$"$k:G=i$N%"%I%l%9$G!"$3$NJQ?t$K9gCW$9$k$b$N$,!"=P$F9T$/(B +$B%a%C%;!<%8$N(B From $BMs$H$7$F!"%G%#%U%)%k%H$N(B From $B$NCM$rCV$-49$($F;HMQ$5$l(B +$B$^$9!#(B + +$BNc$($P!"$"$J$?$,(B john@@home.net $B$*$h$S(B john.doe@@work.com $B$H$$$&BhFs$NEE(B +$B;R%a!<%k%"%I%l%9$r;}$C$F$$$F!"$=$l$i$K08$F$FAw$i$l$F$-$?%a%C%;!<%8$KJV?.(B +$B$9$k$H$-$K!"$=$l$i$r(B From $BMs$G;H$$$?$1$l$P!"$3$NJQ?t$r