Gnus development mailing list
 help / color / mirror / Atom feed
From: Dmitry Yaitskov <dimas@home.com>
Subject: Re: gnus-subscribe-topics doesn't seem to work (fixed, kind of)
Date: 15 Mar 2001 18:28:01 -0500	[thread overview]
Message-ID: <87ae6mvchq.fsf_-_@home.com> (raw)
In-Reply-To: <vafpufir662.fsf@lucy.cs.uni-dortmund.de> (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "15 Mar 2001 23:58:13 +0100")

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.



  reply	other threads:[~2001-03-15 23:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Dmitry Yaitskov [this message]
2001-03-15 23:38     ` gnus-subscribe-topics doesn't seem to work (fixed, kind of) 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

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=87ae6mvchq.fsf_-_@home.com \
    --to=dimas@home.com \
    /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).