From 8bbf9fc62b4d03a11897a2df9181c9ccb458e35e Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 10 Mar 2006 09:49:12 +0000 Subject: [PATCH] Synch to No Gnus 200603100948. --- lisp/ChangeLog | 15 +++++++++++++++ lisp/gnus-group.el | 5 ++++- lisp/gnus-nocem.el | 18 ++++++++++++------ lisp/gnus-start.el | 9 ++++++--- lisp/gnus.el | 18 ++++++++++++++++-- texi/ChangeLog | 4 ++++ texi/gnus-ja.texi | 8 ++++++++ texi/gnus.texi | 9 +++++++++ 8 files changed, 74 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40ba7ef..0acd74d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2006-03-10 Katsumi Yamaoka + + * gnus-nocem.el (gnus-nocem-scan-groups): Add autoload cookie; + scan latest NoCeM messages instead of old ones. + (gnus-nocem-check-article): Fix regexps so as to match to PGP + delimiters that are recently used. + (gnus-nocem-load-cache): Add autoload cookie. + + * gnus.el (gnus-use-nocem): Enable it to be set to also a number. + + * gnus-start.el (gnus-setup-news): Scan NoCeM messages if a group + level which is larger than gnus-use-nocem is specified. + + * gnus-group.el (gnus-group-get-new-news): Ditto. + 2006-03-08 Reiner Steib * gnus-util.el (gnus-tool-bar-update): New function. diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index fa3ef6f..694f101 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -3831,7 +3831,10 @@ re-scanning. If ARG is non-nil and not a number, this will force ;; We might read in new NoCeM messages here. (when (and gnus-use-nocem - (null arg)) + (or (and (numberp gnus-use-nocem) + (numberp arg) + (>= arg gnus-use-nocem)) + (not arg))) (gnus-nocem-scan-groups)) ;; If ARG is not a number, then we read the active file. (when (and arg (not (numberp arg))) diff --git a/lisp/gnus-nocem.el b/lisp/gnus-nocem.el index bcb75e3..de134a2 100644 --- a/lisp/gnus-nocem.el +++ b/lisp/gnus-nocem.el @@ -140,6 +140,7 @@ valid issuer, which is much faster if you are selective about the issuers." (puthash group t gnus-nocem-real-group-hashtb)) gnus-newsrc-alist)) +;;;###autoload (defun gnus-nocem-scan-groups () "Scan all NoCeM groups for new NoCeM messages." (interactive) @@ -210,10 +211,10 @@ valid issuer, which is much faster if you are selective about the issuers." (not (member (mail-header-message-id header) gnus-nocem-seen-message-ids)))) (push header check-headers))) - (let* ((i 0) - (check-headers - (last check-headers gnus-nocem-check-article-limit)) - (len (length check-headers))) + (setq check-headers (last (nreverse check-headers) + gnus-nocem-check-article-limit)) + (let ((i 0) + (len (length check-headers))) (dolist (h check-headers) (gnus-message 7 "Checking article %d in %s for NoCeM (%d of %d)..." @@ -239,9 +240,13 @@ valid issuer, which is much faster if you are selective about the issuers." (days-to-time gnus-nocem-expiry-wait))) (gnus-request-article-this-buffer (mail-header-number header) group) (goto-char (point-min)) - (when (re-search-forward "-----BEGIN PGP MESSAGE-----" nil t) + (when (re-search-forward + "-----BEGIN PGP\\(?: SIGNED\\)? MESSAGE-----" + nil t) (delete-region (point-min) (match-beginning 0))) - (when (re-search-forward "-----END PGP MESSAGE-----\n?" nil t) + (when (re-search-forward + "-----END PGP \\(?:MESSAGE\\|SIGNATURE\\)-----\n?" + nil t) (delete-region (match-end 0) (point-max))) (goto-char (point-min)) ;; The article has to have proper NoCeM headers. @@ -330,6 +335,7 @@ valid issuer, which is much faster if you are selective about the issuers." gnus-nocem-alist)) t))) +;;;###autoload (defun gnus-nocem-load-cache () "Load the NoCeM cache." (interactive) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 2e4c52f..62f7d83 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1074,9 +1074,12 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." (gnus-check-bogus-newsgroups)) ;; We might read in new NoCeM messages here. - (when (and gnus-use-nocem - (not level) - (not dont-connect)) + (when (and (not dont-connect) + gnus-use-nocem + (or (and (numberp gnus-use-nocem) + (numberp level) + (>= level gnus-use-nocem)) + (not level))) (gnus-nocem-scan-groups)) ;; Read any slave files. diff --git a/lisp/gnus.el b/lisp/gnus.el index ff54268..77a370e 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1601,9 +1601,23 @@ articles. This is not a good idea." :value t))) (defcustom gnus-use-nocem nil - "*If non-nil, Gnus will read NoCeM cancel messages." + "*If non-nil, Gnus will read NoCeM cancel messages. +You can also set this variable to a positive number as a group level. +In that case, Gnus scans NoCeM messages when checking new news if this +value is not exceeding a group level that you specify as the prefix +argument to some commands, e.g. `gnus', `gnus-group-get-new-news', etc. +Otherwise, Gnus does not scan NoCeM messages if you specify a group +level to those commands." :group 'gnus-meta - :type 'boolean) + :type '(choice + (const :tag "off" nil) + (const :tag "on" t) + (list :convert-widget + (lambda (widget) + (list 'integer :tag "group level" + :value (if (boundp 'gnus-level-default-subscribed) + gnus-level-default-subscribed + 3)))))) (defcustom gnus-suppress-duplicates nil "*If non-nil, Gnus will mark duplicate copies of the same article as read." diff --git a/texi/ChangeLog b/texi/ChangeLog index 4d00d1d..fe7bbff 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2006-03-10 Katsumi Yamaoka + + * gnus.texi (NoCeM): Mention gnus-use-nocem can also be a number. + 2006-03-10 Reiner Steib * gnus.texi (Fancy Mail Splitting): Improve sentences so as to be diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 78dd702..5763b65 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -21740,6 +21740,14 @@ gnus はこのグループのメッセージを自動的に読み、解釈することができ、これ ものごとを始めさせるには、この変数を @code{t} に設定して下さい。ディフォ ルトでは @code{nil} です。 +この変数にグループレベルとして正の数値を設定することもできます。その場合、 +この値が @code{gnus} や @code{gnus-group-get-new-news} などのコマンドの +接頭引数として与えるグループレベル以下だったら、gnus は新着ニュースをチェッ +クするときに NoCeM メッセージを走査します。さもなければ、それらのコマン +ドにグループレベルを与えると、gnus は NoCeM メッセージを走査しません。例 +えば、メールグループで 1 か 2 を使っていてニュースグループのレベルがディ +フォルトのままだったら、3 が最も良い選択です。 + @item gnus-nocem-groups @vindex gnus-nocem-groups gnus はこのグループのリストから NoCeM メッセージを探します。ディフォルト diff --git a/texi/gnus.texi b/texi/gnus.texi index 1532a40..a380117 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -22293,6 +22293,15 @@ There are some variables to customize, of course: Set this variable to @code{t} to set the ball rolling. It is @code{nil} by default. +You can also set this variable to a positive number as a group level. +In that case, Gnus scans NoCeM messages when checking new news if this +value is not exceeding a group level that you specify as the prefix +argument to some commands, e.g. @code{gnus}, +@code{gnus-group-get-new-news}, etc. Otherwise, Gnus does not scan +NoCeM messages if you specify a group level to those commands. For +example, if you use 1 or 2 on the mail groups and the levels on the news +groups remain the default, 3 is the best choice. + @item gnus-nocem-groups @vindex gnus-nocem-groups Gnus will look for NoCeM messages in the groups in this list. The -- 1.7.10.4