Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-subscribe-topics doesn't seem to work
@ 2001-03-15 20:49 Dmitry Yaitskov
  2001-03-15 22:58 ` Kai Großjohann
  2001-03-15 23:24 ` gnus-subscribe-topics doesn't seem to work ShengHuo ZHU
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry Yaitskov @ 2001-03-15 20:49 UTC (permalink / raw)


I have gnus-subscribe-newsgroup-method set to gnus-subscribe-topics,
and have set subscribe to appropriate values in some topics
parameters. Still, no matter what I do, when after pressing F there
are new groups, they just pop up in the first topic. Any ideas would
be appreciated. Thanks.

-- 
Cheers,
-Dima.



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

* Re: gnus-subscribe-topics doesn't seem to work
  2001-03-15 20:49 gnus-subscribe-topics doesn't seem to work Dmitry Yaitskov
@ 2001-03-15 22:58 ` Kai Großjohann
  2001-03-15 23:28   ` gnus-subscribe-topics doesn't seem to work (fixed, kind of) Dmitry Yaitskov
  2001-03-15 23:24 ` gnus-subscribe-topics doesn't seem to work ShengHuo ZHU
  1 sibling, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2001-03-15 22:58 UTC (permalink / raw)
  Cc: Ding

Can you show us the exact expression you use to set
gnus-subscribe-newsgroup-method?  And what does `G p' on an example
topic show?  And which newsgroup do you expect to go into that topic?

Maybe there is something wrong in the details.

kai
-- 
Be indiscrete.  Do it continuously.


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

* Re: gnus-subscribe-topics doesn't seem to work
  2001-03-15 20:49 gnus-subscribe-topics doesn't seem to work Dmitry Yaitskov
  2001-03-15 22:58 ` Kai Großjohann
@ 2001-03-15 23:24 ` ShengHuo ZHU
  1 sibling, 0 replies; 7+ messages in thread
From: ShengHuo ZHU @ 2001-03-15 23:24 UTC (permalink / raw)


Dmitry Yaitskov <dimas@home.com> writes:

> I have gnus-subscribe-newsgroup-method set to gnus-subscribe-topics,
> and have set subscribe to appropriate values in some topics
> parameters.  Still, no matter what I do, when after pressing F there
> are new groups, they just pop up in the first topic.

Some groups use gnus-subscribe-options-newsgroup-method.

ShengHuo


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

* Re: gnus-subscribe-topics doesn't seem to work (fixed, kind of)
  2001-03-15 22:58 ` Kai Großjohann
@ 2001-03-15 23:28   ` Dmitry Yaitskov
  2001-03-15 23:38     ` ShengHuo ZHU
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Yaitskov @ 2001-03-15 23:28 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Groъjohann) wrote:

> Can you show us the exact expression you use to set
> gnus-subscribe-newsgroup-method?  And what does `G p' on an example
> topic show?  And which newsgroup do you expect to go into that topic?
> 
> Maybe there is something wrong in the details.

I digged into that a bit, and found out why my setup did not work -
there were 2 unrelated places broken really:

First, although I did have

(setq gnus-subscribe-newsgroup-method 'gnus-subscribe-topics)

in my .gnus.el, I saw that gnus-subscribe-topics never got called. It
turned out that gnus-group-find-new-groups (what is bound to F in the
group buffer) eventually invoked gnus-ask-server-for-new-groups - and
that method calls gnus-subscribe-options-newsgroup-method and not
gnus-subscribe-newsgroup-method, to subscribe to new groups. I do not
understand the logic behind this stuff, so cannot really say what
should be the correct fix - but the way it is seems broken to me.

After I replaced the call to gnus-subscribe-options-newsgroup-method
with the call to gnus-subscribe-newsgroup-method in
gnus-group-find-new-groups, finally the gnus-subscribe-topics was
called - and produced a lisp error. This was because it calls
string-match with a list containing the match string rather than with
the car of that list. The fix for this follows (but I'm not sure
whether car-safe is available in FSF Emacs - I'm using XEmacs):

--------------------------- cut here ---------------------------
Index: gnus-topic.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-topic.el,v
retrieving revision 6.9
diff -u -r6.9 gnus-topic.el
--- gnus-topic.el       2001/02/21 20:28:20     6.9
+++ gnus-topic.el       2001/03/15 23:22:09
@@ -1660,8 +1660,8 @@
   (catch 'end
     (let (match gnus-group-change-level-function)
       (dolist (topic (gnus-topic-list))
-       (when (and (setq match (cdr (assq 'subscribe
-                                         (gnus-topic-parameters topic))))
+       (when (and (setq match (car-safe (cdr (assq 'subscribe
+                                         (gnus-topic-parameters topic)))))
                   (string-match match newsgroup))
          ;; Just subscribe the group.
          (gnus-subscribe-alphabetically newsgroup)
--------------------------- cut here ---------------------------

With these two fixes, it all now seems to work.

> kai

-- 
Cheers,
-Dima.



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

* Re: gnus-subscribe-topics doesn't seem to work (fixed, kind of)
  2001-03-15 23:28   ` gnus-subscribe-topics doesn't seem to work (fixed, kind of) Dmitry Yaitskov
@ 2001-03-15 23:38     ` ShengHuo ZHU
  2001-03-16  5:24       ` Dmitry Yaitskov
  0 siblings, 1 reply; 7+ messages in thread
From: ShengHuo ZHU @ 2001-03-15 23:38 UTC (permalink / raw)


Dmitry Yaitskov <dimas@home.com> writes:


[...]

> in my .gnus.el, I saw that gnus-subscribe-topics never got called. It
> turned out that gnus-group-find-new-groups (what is bound to F in the
> group buffer) eventually invoked gnus-ask-server-for-new-groups - and
> that method calls gnus-subscribe-options-newsgroup-method and not
> gnus-subscribe-newsgroup-method, to subscribe to new groups. I do not
> understand the logic behind this stuff, so cannot really say what
> should be the correct fix - but the way it is seems broken to me.

I bet that those groups you mentioned are options newsgroups.

> After I replaced the call to gnus-subscribe-options-newsgroup-method
> with the call to gnus-subscribe-newsgroup-method in
> gnus-group-find-new-groups, finally the gnus-subscribe-topics was
> called - and produced a lisp error. This was because it calls
> string-match with a list containing the match string rather than with
> the car of that list. The fix for this follows (but I'm not sure
> whether car-safe is available in FSF Emacs - I'm using XEmacs):
> 
> --------------------------- cut here ---------------------------
> Index: gnus-topic.el
> ===================================================================
> RCS file: /usr/local/cvsroot/gnus/lisp/gnus-topic.el,v
> retrieving revision 6.9
> diff -u -r6.9 gnus-topic.el
> --- gnus-topic.el       2001/02/21 20:28:20     6.9
> +++ gnus-topic.el       2001/03/15 23:22:09
> @@ -1660,8 +1660,8 @@
>    (catch 'end
>      (let (match gnus-group-change-level-function)
>        (dolist (topic (gnus-topic-list))
> -       (when (and (setq match (cdr (assq 'subscribe
> -                                         (gnus-topic-parameters topic))))
> +       (when (and (setq match (car-safe (cdr (assq 'subscribe
> +                                         (gnus-topic-parameters topic)))))
>                    (string-match match newsgroup))
>           ;; Just subscribe the group.
>           (gnus-subscribe-alphabetically newsgroup)
> --------------------------- cut here ---------------------------
> 
> With these two fixes, it all now seems to work.

This is NOT a fix. The topic parameters should be something like

        ((subscribe . "nnslashdot:"))

instead of

        ((subscribe "nnslashdot:"))

If you are not sure what it is, use `G c' instead of `G p'.

ShengHuo


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

* Re: gnus-subscribe-topics doesn't seem to work (fixed, kind of)
  2001-03-15 23:38     ` ShengHuo ZHU
@ 2001-03-16  5:24       ` Dmitry Yaitskov
  2001-03-16 15:57         ` Dmitry Yaitskov
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Yaitskov @ 2001-03-16  5:24 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> wrote:

> Dmitry Yaitskov <dimas@home.com> writes:
> 
> 
> [...]
> 
> > in my .gnus.el, I saw that gnus-subscribe-topics never got called. It
> > turned out that gnus-group-find-new-groups (what is bound to F in the
> > group buffer) eventually invoked gnus-ask-server-for-new-groups - and
> > that method calls gnus-subscribe-options-newsgroup-method and not
> > gnus-subscribe-newsgroup-method, to subscribe to new groups. I do not
> > understand the logic behind this stuff, so cannot really say what
> > should be the correct fix - but the way it is seems broken to me.
> 
> I bet that those groups you mentioned are options newsgroups.

Hm. Now that you say it... and I have looked up "options" in gnus'
help, I do understand what goes on here. Yes, the new groups I'm
talking about are nnfolder groups created by expiring into a group. I
*do* want them to be subscribed automatically (which is what the
"options" group - i.e. a one that matches the
gnus-auto-subscribed-groups regexp - means, right?)... but at the same
time I very much want them to be put in apropriate topics (spec'd by
subscribe parameter). The two behaviors - always subscribing new
groups if match certain criteria and putting newly subscribed groups
in certain place - seem completely unrelated, the fact that they are
kind of mutually exclusive seems broken to me.

So... what is the *correct* way to do that?

<snip>
> > With these two fixes, it all now seems to work.
> 
> This is NOT a fix. The topic parameters should be something like
> 
>         ((subscribe . "nnslashdot:"))
> 
> instead of
> 
>         ((subscribe "nnslashdot:"))

Oops, sorry.

> If you are not sure what it is, use `G c' instead of `G p'.

Thank you. (and if I'm not sure what `G c' is - should I use Outlook
Express instead?... just kidding.)

> ShengHuo
> 
> 

-- 
Cheers,
-Dima.



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

* Re: gnus-subscribe-topics doesn't seem to work (fixed, kind of)
  2001-03-16  5:24       ` Dmitry Yaitskov
@ 2001-03-16 15:57         ` Dmitry Yaitskov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Yaitskov @ 2001-03-16 15:57 UTC (permalink / raw)


Dmitry Yaitskov <dimas@home.com> wrote:

<some bs snipped>

Um, sorry - I guess I was not thinking too well yesterday. So, the
obvious answer to my question is - 

(setq gnus-subscribe-options-newsgroup-method 'gnus-subscribe-topics)

What I still think though is, there should be a mention of that in the
help on topic subscribe parameter. Because I for example did not know
about "options" groups till yesterday - and still got bitten by it
because of the default. I may not be alone in that.

-- 
Cheers,
-Dima.



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

end of thread, other threads:[~2001-03-16 15:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-15 20:49 gnus-subscribe-topics doesn't seem to work Dmitry Yaitskov
2001-03-15 22:58 ` Kai Großjohann
2001-03-15 23:28   ` gnus-subscribe-topics doesn't seem to work (fixed, kind of) Dmitry Yaitskov
2001-03-15 23:38     ` ShengHuo ZHU
2001-03-16  5:24       ` Dmitry Yaitskov
2001-03-16 15:57         ` Dmitry Yaitskov
2001-03-15 23:24 ` gnus-subscribe-topics doesn't seem to work ShengHuo ZHU

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