Gnus development mailing list
 help / color / mirror / Atom feed
From: Josh Huber <huber@alum.wpi.edu>
Subject: new topic parameter: subscribe-level
Date: Thu, 13 Dec 2001 23:10:00 -0500	[thread overview]
Message-ID: <87zo4mh27b.fsf@paradoxical.net> (raw)

I've committed this.

2001-12-13  Josh Huber  <huber@alum.wpi.edu>

      * gnus-cus.el (gnus-extra-topic-parameters): added topic parameter
      subscribe-level
      * gnus-topic.el (gnus-subscribe-topics): use it.

Side note: Anyone else using XEmacs here?  To get it to save the
ChangeLog properly, I had to C-x C-m c iso-2022-7bit RET C-x C-s to
save the file in the proper coding.  The buffer-local variable didn't
seem to do the trick for me.

Does anyone have any scripts for handling Gnus development?  Such as,
something for automating commits & commit comments, posting to
gnus.ding, etc?

Index: lisp/gnus-cus.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-cus.el,v
retrieving revision 6.14
diff -u -r6.14 gnus-cus.el
--- lisp/gnus-cus.el	2001/11/06 15:06:21	6.14
+++ lisp/gnus-cus.el	2001/12/14 03:10:44
@@ -242,7 +242,12 @@
 If `gnus-subscribe-newsgroup-method' or
 `gnus-subscribe-options-newsgroup-method' is set to
 `gnus-subscribe-topics', new groups that matches this regexp will
-automatically be subscribed to this topic"))
+automatically be subscribed to this topic")
+    (subscribe-level (integer :tag "Subscribe Level" :value 1) "\
+If this topic parameter is set, when new groups are subscribed
+automatically under this topic (via the `subscribe' topic parameter)
+assign this level to the group, rather than the default level
+set in `gnus-level-default-subscribed'"))
   "Alist of topic parameters that are not also group parameters.
 
 Each entry has the form (NAME TYPE DOC), where NAME is the parameter
Index: lisp/gnus-topic.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-topic.el,v
retrieving revision 6.16
diff -u -r6.16 gnus-topic.el
--- lisp/gnus-topic.el	2001/11/27 19:15:09	6.16
+++ lisp/gnus-topic.el	2001/12/14 03:10:46
@@ -1690,6 +1690,12 @@
 	  (gnus-subscribe-alphabetically newsgroup)
 	  ;; Add the group to the topic.
 	  (nconc (assoc topic gnus-topic-alist) (list newsgroup))
+	  ;; if this topic specifies a default level, use it
+	  (let ((subscribe-level (cdr (assq 'subscribe-level
+					    (gnus-topic-parameters topic)))))
+	    (when subscribe-level
+		(gnus-group-change-level newsgroup subscribe-level
+					 gnus-level-default-subscribed)))
 	  (throw 'end t)))
       nil)))
 
Index: texi/gnus.texi
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v
retrieving revision 6.192
diff -u -r6.192 gnus.texi
--- texi/gnus.texi	2001/12/12 16:26:38	6.192
+++ texi/gnus.texi	2001/12/14 03:11:11
@@ -3776,6 +3776,11 @@
 value should be a regexp to match the groups that should go in that
 topic.
 
+@item subscribe-level
+When subscribing new groups by topic (see the @code{subscribe} parameter),
+the group will be subscribed with the level specified in the 
+@code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
+
 @end table
 
 Group parameters (of course) override topic parameters, and topic


-- 
Josh Huber



             reply	other threads:[~2001-12-14  4:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-14  4:10 Josh Huber [this message]
2001-12-18 16:01 ` Didier Verna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zo4mh27b.fsf@paradoxical.net \
    --to=huber@alum.wpi.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).