From: Lars Magne Ingebrigtsen Date: Mon, 13 Dec 2010 16:40:57 +0000 (+0100) Subject: Auto-subscribe groups from all mail-like backends. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=1de61a6ea2013292fa65eae5dccebed0ebbee3a1;p=gnus Auto-subscribe groups from all mail-like backends. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ed1413fe..35fdd415e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * gnus-start.el (gnus-auto-subscribed-groups): Add nnimap to the list of automatically subscribed groups. + (gnus-auto-subscribed-categories): New variable. + (gnus-matches-options-n): Use it. 2010-12-13 Andrew Cohen diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 2934ccdec..fa765e34d 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -341,6 +341,15 @@ hierarchy in its entirety." :group 'gnus-group-new :type 'boolean) +(defcustom gnus-auto-subscribed-categories '(mail post-mail) + "*New groups from methods of these categories will be subscribed automatically. +Note that this variable only deals with new groups. It has no +effect whatsoever on old groups. The default is to automatically +subscribe all groups from mail-like backends." + :version "24.1" + :group 'gnus-group-new + :type '(repeat symbol)) + (defcustom gnus-auto-subscribed-groups "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl\\|^nnmaildir\\|^nnimap" "*All new groups that match this regexp will be subscribed automatically. @@ -1158,6 +1167,11 @@ for new groups, and subscribe the new groups as zombies." ((and gnus-options-subscribe (string-match gnus-options-subscribe group)) 'subscribe) + ((let ((do-subscribe nil)) + (dolist (category gnus-auto-subscribed-categories) + (when (gnus-member-of-valid category group) + (setq do-subscribe t)))) + 'subscribe) ((and gnus-auto-subscribed-groups (string-match gnus-auto-subscribed-groups group)) 'subscribe) diff --git a/texi/ChangeLog b/texi/ChangeLog index 14b2b2550..d5fc6b36d 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2010-12-13 Lars Magne Ingebrigtsen + + * gnus.texi (Filtering New Groups): Mention + gnus-auto-subscribed-categories. + 2010-12-06 Tassilo Horn * gnus.texi (Server Commands): Point to the rest of the server diff --git a/texi/gnus.texi b/texi/gnus.texi index c3517b8b9..975d780fc 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1321,11 +1321,18 @@ but I thought it would be nice to have two of these. This variable is more meant for setting some ground rules, while the other variable is used more for user fiddling. By default this variable makes all new groups that come from mail back ends (@code{nnml}, @code{nnbabyl}, -@code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir}) -subscribed. If you don't like that, just set this variable to -@code{nil}. - -New groups that match this regexp are subscribed using +@code{nnfolder}, @code{nnmbox}, @code{nnmh}, @code{nnimap}, and +@code{nnmaildir}) subscribed. If you don't like that, just set this +variable to @code{nil}. + +@vindex gnus-auto-subscribed-categories +As if that wasn't enough, @code{gnus-auto-subscribed-categories} also +allows you to specify that new groups should be subcribed based on the +category their select methods belong to. The default is @samp{(mail +post-mail)}, meaning that all new groups from mail-like backends +should be subscribed automatically. + +New groups that match these variables are subscribed using @code{gnus-subscribe-options-newsgroup-method}.