From 18307950d4827013803427cffaab13458a22574a Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 15 Jun 2003 22:24:35 +0000 Subject: [PATCH] Synch to Gnus 200306151234. --- lisp/ChangeLog | 19 +++++++++++ lisp/gnus-sum.el | 1 + lisp/message.el | 91 +++++++++++++++++++++++--------------------------- lisp/nnimap.el | 2 +- texi/ChangeLog | 10 ++++++ texi/gnus.texi | 2 +- texi/message-ja.texi | 18 +++++++++- texi/message.texi | 18 +++++++++- 8 files changed, 107 insertions(+), 54 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1914599..af890cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2003-06-15 Reiner Steib + + * gnus-sum.el (gnus-summary-force-verify-and-decrypt): Bind + `gnus-article-emulate-mime'. + +2003-06-15 Kai Gro,A_(Bjohann + From Tommi Vainikainen . + + * message.el (message-is-yours-p): New function. Separated common + code from message-cancel-news and message-supersede. Added + matching code which uses message-alternative-emails regexp as last + resort. + (message-cancel-news, message-supersede): Use message-is-yours-p. + +2003-06-13 Kai Gro,A_(Bjohann + + * nnimap.el (nnimap-split-articles): Narrow the right buffer to + the headers. From Niklas Morberg . + 2003-06-12 Dave Love * nnheader.el (nnheader-functionp): Deleted. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index e9c88f2..7e315b5 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -7039,6 +7039,7 @@ be displayed." (interactive) (let ((mm-verify-option 'known) (mm-decrypt-option 'known) + (gnus-article-emulate-mime t) (gnus-buttonized-mime-types (append (list "multipart/signed" "multipart/encrypted") gnus-buttonized-mime-types))) diff --git a/lisp/message.el b/lisp/message.el index 2f9854f..1f1e1de 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -6468,31 +6468,7 @@ If ARG, allow editing of the cancellation message." message-id (message-fetch-field "message-id" t) distribution (message-fetch-field "distribution"))) ;; Make sure that this article was written by the user. - (unless (or - ;; Canlock-logic as suggested by Per Abrahamsen - ;; - ;; - ;; IF article has cancel-lock THEN - ;; IF we can verify it THEN - ;; issue cancel - ;; ELSE - ;; error: cancellock: article is not yours - ;; ELSE - ;; Use old rules, comparing sender... - (if (message-fetch-field "Cancel-Lock") - (if (null (canlock-verify)) - t - (error "Failed to verify Cancel-lock: This article is not yours")) - nil) - (message-gnksa-enable-p 'cancel-messages) - (and sender - (string-equal - (downcase sender) - (downcase (message-make-sender)))) - (string-equal - (downcase (cadr (std11-extract-address-components from))) - (downcase (cadr (std11-extract-address-components - (message-make-from)))))) + (unless (message-is-yours-p) (error "This article is not yours")) (when (yes-or-no-p "Do you really want to cancel this article? ") ;; Make control message. @@ -6534,31 +6510,7 @@ header line with the old Message-ID." (sender (message-fetch-field "sender")) (from (message-fetch-field "from"))) ;; Check whether the user owns the article that is to be superseded. - (unless (or - ;; Canlock-logic as suggested by Per Abrahamsen - ;; - ;; - ;; IF article has cancel-lock THEN - ;; IF we can verify it THEN - ;; issue cancel - ;; ELSE - ;; error: cancellock: article is not yours - ;; ELSE - ;; Use old rules, comparing sender... - (if (message-fetch-field "Cancel-Lock") - (if (null (canlock-verify)) - t - (error "Failed to verify Cancel-lock: This article is not yours")) - nil) - (message-gnksa-enable-p 'cancel-messages) - (and sender - (string-equal - (downcase sender) - (downcase (message-make-sender)))) - (string-equal - (downcase (cadr (std11-extract-address-components from))) - (downcase (cadr (std11-extract-address-components - (message-make-from)))))) + (unless (message-is-yours-p) (error "This article is not yours")) ;; Get a normal message buffer. (message-pop-to-buffer (message-buffer-name "supersede")) @@ -7178,6 +7130,45 @@ regexp varstr." (cdr local))))) locals))) +;;;###autoload +(defun message-is-yours-p () + "Non-nil means current article is yours. +If you have added 'cancel-messages to 'message-shoot-gnksa-feet', all articles +are yours except those that have Cancel-Lock header not belonging to you. +Instead of shooting GNKSA feet, you should modify 'message-alternative-emails' +regexp to match all of yours addresses." + ;; Canlock-logic as suggested by Per Abrahamsen + ;; + ;; + ;; IF article has cancel-lock THEN + ;; IF we can verify it THEN + ;; issue cancel + ;; ELSE + ;; error: cancellock: article is not yours + ;; ELSE + ;; Use old rules, comparing sender... + (if (message-fetch-field "Cancel-Lock") + (if (null (canlock-verify)) + t + (error "Failed to verify Cancel-lock: This article is not yours")) + (or + (message-gnksa-enable-p 'cancel-messages) + (and sender + (string-equal + (downcase sender) + (downcase (message-make-sender)))) + ;; Email address in From field equals to our address + (string-equal + (downcase (cadr (std11-extract-address-components from))) + (downcase (cadr (std11-extract-address-components + (message-make-from))))) + ;; Email address in From field matches + ;; 'message-alternative-emails' regexp + (and message-alternative-emails + (string-match + message-alternative-emails + (cadr (std11-extract-address-components from))))))) + ;;; @ for MIME Edit mode ;;; diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 306f54e..ae0774f 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1272,7 +1272,7 @@ function is generally only called when Gnus is shutting down." nnimap-split-download-body-default nnimap-split-download-body) (and (nnimap-request-article article) - (mail-narrow-to-head)) + (with-current-buffer nntp-server-buffer (mail-narrow-to-head))) (nnimap-request-head article)) ;; copy article to right group(s) (setq removeorig nil) diff --git a/texi/ChangeLog b/texi/ChangeLog index 75a02f2..cbf88b6 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,13 @@ +2003-06-15 Reiner Steib + + * gnus.texi (Daemons): Fixed typo. + +2003-06-15 Kai Gro,A_(Bjohann + + * message.texi (Message Headers): Extend + `message-subject-re-regexp' example. From Niklas Morberg + . + 2003-06-11 Teodor Zlatanov * gnus.texi (Bogofilter): revise docs to mention threshold is now diff --git a/texi/gnus.texi b/texi/gnus.texi index a4fb001..fdbfee6 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -21271,7 +21271,7 @@ Emacs is idle: (gnus-demon-scan-pgp 60 t) @end lisp -This @var{time} parameter and than @var{idle} parameter work together +This @var{time} parameter and that @var{idle} parameter work together in a strange, but wonderful fashion. Basically, if @var{idle} is @code{nil}, then the function will be called every @var{time} minutes. diff --git a/texi/message-ja.texi b/texi/message-ja.texi index 0b89455..bfeac71 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -1362,7 +1362,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!<% @lisp (setq message-subject-re-regexp - "^\\(\\(\\([Rr][Ee]\\|[Ss][Vv]\\|[Aa][Ww]\\): *\\)+\\)") + (concat + "^[ \t]*" + "\\(" + "\\(" + "[Aa][Nn][Tt][Ww]\\.?\\|" ; antw + "[Aa][Ww]\\|" ; aw + "[Ff][Ww][Dd]?\\|" ; fwd + "[Oo][Dd][Pp]\\|" ; odp + "[Rr][Ee]\\|" ; re + "[Rr][\311\351][Ff]\\.?\\|" ; ref + "[Ss][Vv]" ; sv + "\\)" + "\\(\\[[0-9]*\\]\\)" + "*:[ \t]*" + "\\)" + "*[ \t]*" + )) @end lisp @item message-subject-trailing-was-query diff --git a/texi/message.texi b/texi/message.texi index d9dae0d..f4ec956 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1355,7 +1355,23 @@ responding to a message: @lisp (setq message-subject-re-regexp - "^\\(\\(\\([Rr][Ee]\\|[Ss][Vv]\\|[Aa][Ww]\\): *\\)+\\)") + (concat + "^[ \t]*" + "\\(" + "\\(" + "[Aa][Nn][Tt][Ww]\\.?\\|" ; antw + "[Aa][Ww]\\|" ; aw + "[Ff][Ww][Dd]?\\|" ; fwd + "[Oo][Dd][Pp]\\|" ; odp + "[Rr][Ee]\\|" ; re + "[Rr][\311\351][Ff]\\.?\\|" ; ref + "[Ss][Vv]" ; sv + "\\)" + "\\(\\[[0-9]*\\]\\)" + "*:[ \t]*" + "\\)" + "*[ \t]*" + )) @end lisp @item message-subject-trailing-was-query -- 1.7.10.4