+2006-03-10 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * 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 <Reiner.Steib@gmx.de>
* gnus-util.el (gnus-tool-bar-update): New function.
;; 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)))
(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)
(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)..."
(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.
gnus-nocem-alist))
t)))
+;;;###autoload
(defun gnus-nocem-load-cache ()
"Load the NoCeM cache."
(interactive)
(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.
: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."
+2006-03-10 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus.texi (NoCeM): Mention gnus-use-nocem can also be a number.
+
2006-03-10 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.texi (Fancy Mail Splitting): Improve sentences so as to be
\e$B$b$N$4$H$r;O$a$5$;$k$K$O!"$3$NJQ?t$r\e(B @code{t} \e$B$K@_Dj$7$F2<$5$$!#%G%#%U%)\e(B
\e$B%k%H$G$O\e(B @code{nil} \e$B$G$9!#\e(B
+\e$B$3$NJQ?t$K%0%k!<%W%l%Y%k$H$7$F@5$N?tCM$r@_Dj$9$k$3$H$b$G$-$^$9!#$=$N>l9g!"\e(B
+\e$B$3$NCM$,\e(B @code{gnus} \e$B$d\e(B @code{gnus-group-get-new-news} \e$B$J$I$N%3%^%s%I$N\e(B
+\e$B@\F,0z?t$H$7$FM?$($k%0%k!<%W%l%Y%k0J2<$@$C$?$i!"\e(Bgnus \e$B$O?7Ce%K%e!<%9$r%A%'%C\e(B
+\e$B%/$9$k$H$-$K\e(B NoCeM \e$B%a%C%;!<%8$rAv::$7$^$9!#$5$b$J$1$l$P!"$=$l$i$N%3%^%s\e(B
+\e$B%I$K%0%k!<%W%l%Y%k$rM?$($k$H!"\e(Bgnus \e$B$O\e(B NoCeM \e$B%a%C%;!<%8$rAv::$7$^$;$s!#Nc\e(B
+\e$B$($P!"%a!<%k%0%k!<%W$G\e(B 1 \e$B$+\e(B 2 \e$B$r;H$C$F$$$F%K%e!<%9%0%k!<%W$N%l%Y%k$,%G%#\e(B
+\e$B%U%)%k%H$N$^$^$@$C$?$i!"\e(B3 \e$B$,:G$bNI$$A*Br$G$9!#\e(B
+
@item gnus-nocem-groups
@vindex gnus-nocem-groups
gnus \e$B$O$3$N%0%k!<%W$N%j%9%H$+$i\e(B NoCeM \e$B%a%C%;!<%8$rC5$7$^$9!#%G%#%U%)%k%H\e(B
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