Gnus development mailing list
 help / color / mirror / Atom feed
* new topic parameter: subscribe-level
@ 2001-12-14  4:10 Josh Huber
  2001-12-18 16:01 ` Didier Verna
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Huber @ 2001-12-14  4:10 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: new topic parameter: subscribe-level
  2001-12-14  4:10 new topic parameter: subscribe-level Josh Huber
@ 2001-12-18 16:01 ` Didier Verna
  0 siblings, 0 replies; 2+ messages in thread
From: Didier Verna @ 2001-12-18 16:01 UTC (permalink / raw)


Josh Huber <huber@alum.wpi.edu> wrote:

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

        I've written a package called "Patcher" (part of the xemacs-devel
package) that automates the process of building diff and changelog skeletons
against CVS archives, committing the changes and sending a message to report
the modifications. Take a look at my [PATCH] or [CHECK IN] messages to this
list.

        Patcher currently only work for XEmacs.

-- 
Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 53 14 59 47
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier@xemacs.org



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-18 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-14  4:10 new topic parameter: subscribe-level Josh Huber
2001-12-18 16:01 ` Didier Verna

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).