From: yamaoka Date: Mon, 27 Oct 2003 23:01:34 +0000 (+0000) Subject: Synch to Gnus 200310272146. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ad23ce63e36b851af0d93f5e07f3d00ae5c91c4b;p=elisp%2Fgnus.git- Synch to Gnus 200310272146. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc386d1..5d49c7d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,50 @@ +2003-10-27 Simon Josefsson + + * pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): New optional + parameter key, overrides the key id used to store passphrase + under (uses true key id from gpg output if nil). + (pgg-gpg-encrypt-region): Search for passphrase using user suplied + string STR, instead of (pgg-lookup-key STR t). + (pgg-gpg-encrypt-region): Store passphrase under user suplied + string, instead of real key id taken from gpg output. + (pgg-gpg-decrypt-region): Likewise. + (pgg-gpg-sign-region): Likewise. + * pgg.el (pgg-decrypt-region): Don't set pgg-default-user-id. + +2003-10-27 Romain FRANCOISE + + * gnus-art.el (gnus-article-goto-prev-page): Doc fix. + +2003-10-27 Simon Josefsson + + * mm-bodies.el (mm-body-encoding): Don't use QP when message body + only consists of short lines and ASCII, when + mm-use-ultra-safe-encoding. Refer to 'About foo' thread in + gnus-bug, e.g. , for more discussion. + This make it possible to pipe the raw RFC 822 message into 'gpg' + and have the signature work. Potential problem: what if message + contain data that would be dash-escaped by OpenPGP + implementations? Then PGP 2.x might not be able to parse the raw + RFC 822 message correctly. If that problem is worth fixing, it + should be fixed by detecting the situation, instead of applying QP + to everything. Based on discussion with "John A. Martin" + . + +2003-10-27 Teodor Zlatanov + + * spam.el (spam-mark-spam-as-expired-and-move-routine) + (spam-ham-copy-or-move-routine): don't ask when deleting copied + articles, and use move instead of copy when possible + (spam-split): added the option of specifying a string as a + spam-split parameter; such a string will override + spam-split-group temporarily. + + * nnmail.el (nnmail-cache-insert): protect from nil message IDs, + but should we do something else? + + * gnus-registry.el (gnus-registry-spool-action): protect from nil + message IDs + 2003-10-26 Simon Josefsson * gnus-art.el (gnus-button-alist): Allow & in mailto URLs. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 3b01bd9..1d35d1e 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5356,7 +5356,7 @@ If given a numerical ARG, move forward ARG pages." (defun gnus-article-goto-prev-page () - "Show the next page of the article." + "Show the previous page of the article." (interactive) (if (bobp) (gnus-article-read-summary-keys nil (gnus-character-to-event ?p)) diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el index e3b9177..ec14c53 100644 --- a/lisp/gnus-registry.el +++ b/lisp/gnus-registry.el @@ -324,7 +324,7 @@ tracked this way." ;; do not process the draft IDs ; (unless (string-match "totally-fudged-out-message-id" id) ; (let ((group (gnus-group-guess-full-name group))) - (when (string-match "\r$" id) + (when (and (stringp id) (string-match "\r$" id)) (setq id (substring id 0 -1))) (gnus-message 5 "Registry: article %s spooled to %s" id diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index bc6f4f0..810185c 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -130,8 +130,7 @@ If no encoding was done, nil is returned." (longp (mm-long-lines-p 1000))) (require 'message) (cond - ((and (not mm-use-ultra-safe-encoding) - (not longp) + ((and (not longp) (eq bits '7bit)) bits) ((and (not mm-use-ultra-safe-encoding) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 5fa97b3..16a81ff 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1497,30 +1497,31 @@ See the documentation for the variable `nnmail-split-fancy' for details." (defvar group-art-list) (defvar group-art) (defun nnmail-cache-insert (id grp &optional subject) - (run-hook-with-args 'nnmail-spool-hook - id grp subject) - (when nnmail-treat-duplicates - ;; Store some information about the group this message is written - ;; to. This is passed in as the grp argument -- all locations this - ;; has been called from have been checked and the group is available. - ;; The only ambiguous case is nnmail-check-duplication which will only - ;; pass the first (of possibly >1) group which matches. -Josh - (unless (gnus-buffer-live-p nnmail-cache-buffer) - (nnmail-cache-open)) - (save-excursion - (set-buffer nnmail-cache-buffer) - (goto-char (point-max)) - (if (and grp (not (string= "" grp)) - (gnus-methods-equal-p gnus-command-method - (nnmail-cache-primary-mail-backend))) - (let ((regexp (if (consp nnmail-cache-ignore-groups) - (mapconcat 'identity nnmail-cache-ignore-groups - "\\|") - nnmail-cache-ignore-groups))) - (unless (and regexp (string-match regexp grp)) - (insert id "\t" grp "\n"))) - (insert id "\n"))))) - + (when (stringp id) + (run-hook-with-args 'nnmail-spool-hook + id grp subject) + (when nnmail-treat-duplicates + ;; Store some information about the group this message is written + ;; to. This is passed in as the grp argument -- all locations this + ;; has been called from have been checked and the group is available. + ;; The only ambiguous case is nnmail-check-duplication which will only + ;; pass the first (of possibly >1) group which matches. -Josh + (unless (gnus-buffer-live-p nnmail-cache-buffer) + (nnmail-cache-open)) + (save-excursion + (set-buffer nnmail-cache-buffer) + (goto-char (point-max)) + (if (and grp (not (string= "" grp)) + (gnus-methods-equal-p gnus-command-method + (nnmail-cache-primary-mail-backend))) + (let ((regexp (if (consp nnmail-cache-ignore-groups) + (mapconcat 'identity nnmail-cache-ignore-groups + "\\|") + nnmail-cache-ignore-groups))) + (unless (and regexp (string-match regexp grp)) + (insert id "\t" grp "\n"))) + (insert id "\n")))))) + (defun nnmail-cache-primary-mail-backend () (let ((be-list (cons gnus-select-method gnus-secondary-select-methods)) (be nil) diff --git a/lisp/spam.el b/lisp/spam.el index 0c359e2..0f13940 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -548,7 +548,7 @@ spamoracle database." (defun spam-mark-spam-as-expired-and-move-routine (&rest groups) (gnus-summary-kill-process-mark) (let ((articles gnus-newsgroup-articles) - article tomove todelete) + article tomove deletep) (dolist (article articles) (when (eq (gnus-summary-article-mark article) gnus-spam-mark) (gnus-summary-mark-article article gnus-expirable-mark) @@ -561,22 +561,26 @@ spamoracle database." (dolist (article tomove) (gnus-summary-set-process-mark article)) (when tomove - (gnus-summary-copy-article nil group) - (setq todelete t)))) + (if (> (length groups) 1) + (progn + (gnus-summary-copy-article nil group) + (setq deletep t)) + (gnus-summary-move-article nil group))))) ;; now delete the articles, if there was a copy done - (when todelete + (when deletep (dolist (article tomove) (gnus-summary-set-process-mark article)) (when tomove - (gnus-summary-delete-article nil))) + (let ((gnus-novice-user nil)) ; don't ask me if I'm sure + (gnus-summary-delete-article nil)))) (gnus-summary-yank-process-mark))) (defun spam-ham-copy-or-move-routine (copy groups) (gnus-summary-kill-process-mark) (let ((articles gnus-newsgroup-articles) - article mark todo todelete) + article mark todo deletep) (dolist (article articles) (when (spam-group-ham-mark-p gnus-newsgroup-name (gnus-summary-article-mark article)) @@ -589,16 +593,22 @@ spamoracle database." (when spam-mark-ham-unread-before-move-from-spam-group (gnus-summary-mark-article article gnus-unread-mark)) (gnus-summary-set-process-mark article)) - (gnus-summary-copy-article nil group) - (setq todelete t))) + + (if (> (length groups) 1) + (progn + (gnus-summary-copy-article nil group) + (setq deletep t)) + (gnus-summary-move-article nil group)))) - ;; now delete the articles, unless copy is t, and when there was a copy done + ;; now delete the articles, unless a) copy is t, and when there was a copy done + ;; b) a move was done to a single group (unless copy - (when todelete + (when deletep (dolist (article todo) (gnus-summary-set-process-mark article)) (when todo - (gnus-summary-delete-article nil))))) + (let ((gnus-novice-user nil)) ; don't ask me if I'm sure + (gnus-summary-delete-article nil)))))) (gnus-summary-yank-process-mark)) @@ -713,32 +723,42 @@ splitters that need to have the full message body available.") ;;;TODO: modify to invoke self with each specific check if invoked without specific checks (defun spam-split (&rest specific-checks) "Split this message into the `spam' group if it is spam. -This function can be used as an entry in `nnmail-split-fancy', for -example like this: (: spam-split). It can take checks as parameters. +This function can be used as an entry in `nnmail-split-fancy', +for example like this: (: spam-split). It can take checks as +parameters. A string as a parameter will set the +spam-split-group to that string. See the Info node `(gnus)Fancy Mail Splitting' for more details." (interactive) - (save-excursion - (save-restriction - (dolist (check spam-list-of-statistical-checks) - (when (symbol-value check) - (widen) - (gnus-message 8 "spam-split: widening the buffer (%s requires it)" - (symbol-name check)) - (return))) - ;; (progn (widen) (debug (buffer-string))) - (let ((list-of-checks spam-list-of-checks) - decision) - (while (and list-of-checks (not decision)) - (let ((pair (pop list-of-checks))) - (when (and (symbol-value (car pair)) - (or (null specific-checks) - (memq (car pair) specific-checks))) - (gnus-message 5 "spam-split: calling the %s function" (symbol-name (cdr pair))) - (setq decision (funcall (cdr pair)))))) - (if (eq decision t) - nil - decision))))) + (let ((spam-split-group-choice spam-split-group)) + (dolist (check specific-checks) + (when (stringp check) + (setq spam-split-group-choice check) + (setq specific-checks (delq check specific-checks)))) + + (let ((spam-split-group spam-split-group-choice)) + (save-excursion + (save-restriction + (dolist (check spam-list-of-statistical-checks) + (when (and (symbolp check) (symbol-value check)) + (widen) + (gnus-message 8 "spam-split: widening the buffer (%s requires it)" + (symbol-name check)) + (return))) + ;; (progn (widen) (debug (buffer-string))) + (let ((list-of-checks spam-list-of-checks) + decision) + (while (and list-of-checks (not decision)) + (let ((pair (pop list-of-checks))) + (when (and (symbol-value (car pair)) + (or (null specific-checks) + (memq (car pair) specific-checks))) + (gnus-message 5 "spam-split: calling the %s function" + (symbol-name (cdr pair))) + (setq decision (funcall (cdr pair)))))) + (if (eq decision t) + nil + decision))))))) (defun spam-setup-widening () (dolist (check spam-list-of-statistical-checks) diff --git a/texi/ChangeLog b/texi/ChangeLog index 00460c2..58591ff 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,15 @@ +2003-10-27 Teodor Zlatanov + + * gnus.texi (Filtering Spam Using The Spam ELisp Package): added + example of using a string as a parameter to spam-split in order + to override the default spam-split-group value + +2003-10-27 Jesper Harder + + * gnusref.tex (subsection*{Notes}): do. + + * gnus.texi (Exiting the Summary Buffer): Add keybinding. + 2003-10-23 Reiner Steib * emacs-mime.texi: Markup: Use @acronym for MML and MIME. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index f99478b..b88cae4 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -9670,8 +9670,10 @@ Parameters}) $B$rJT=8$7$^$9(B (@code{gnus-summary-edit-parameters})$B!#(B @table @kbd @item Z Z +@itemx Z Q @itemx q @kindex Z Z ($B35N,(B) +@kindex Z Q ($B35N,(B) @findex q ($B35N,(B) @findex gnus-summary-exit @vindex gnus-summary-exit-hook @@ -9716,7 +9718,9 @@ Parameters}) $B$rJT=8$7$^$9(B (@code{gnus-summary-edit-parameters})$B!#(B $B$9(B (@code{gnus-summary-catchup-and-goto-next-group})$B!#(B @item Z R +@itemx C-x C-s @kindex Z R ($B35N,(B) +@kindex C-x C-s ($B35N,(B) @findex gnus-summary-reselect-current-group $B8=:_$N%0%k!<%W$r=P$F!"$=$l$+$iF~$jD>$7$^(B $B$9(B (@code{gnus-summary-reselect-current-group})$B!#$b$7@\F,0z?t$rM?$($i$l(B @@ -21627,8 +21631,8 @@ Spam $B%0%k!<%W$G$O!"%G%#%U%)%k%H$G$9$Y$F$N%a%C%;!<%8$,(B spam $B$G$"$k$H2r @example nnimap-split-fancy '(| - (: spam-split 'spam-use-regex-headers) +;;; spam-use-regex-headers $B$G8!=P$5$l$?$9$Y$F$N(B spam $B$O(B "regex-spam" $B$X!#(B + (: spam-split "regex-spam" 'spam-use-regex-headers) (any "ding" "ding") +;;; spam-split $B$G8!=P$5$l$?B>$N$9$Y$F$N(B spam $B$O(B spam-split-group $B$X!#(B (: spam-split) ;; default mailbox "mail") @end example $B4pK\E*$K!"$3$l$OFC$K$"$J$?$NI,MW$K0MB8$7$?FCDj$N(B @code{spam-split} $B8!(B -$B::$r5/F0$5$;$^$9!#$9$Y$F$N%a!<%k$r$9$Y$F$N(B spam $B%F%9%H$KEj$2$kI,MW$O$"$j(B -$B$^$;$s!#$3$l$,NI$$JL$NM}M3$O!"5,B'$r;}$C$F$$$k%a!<%j%s%0%j%9%H$X$N%a%C%;!<(B -$B%8$KBP$7$F!";q8;=8LsE*$J%V%i%C%/%[!<%k!&%A%'%C%/$r$} %% @@ -1008,7 +1008,7 @@ Z P & Exit and go to the {\bf previous} group.\\ % Z G & (M-g) Check for new articles in this group ({\bf get}).\\ - Z R & Exit this group, and then enter it again ({\bf reenter}). + Z R & (C-x C-s) Exit this group, and then enter it again ({\bf reenter}). [Prefix: select all articles, read and unread.]\\ Z s & Update and save the dribble buffer. [Prefix: save .newsrc* as well]\\ \end{keys}