From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/35362 Path: main.gmane.org!not-for-mail From: Dmitry Yaitskov Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-subscribe-topics doesn't seem to work (fixed, kind of) Date: 15 Mar 2001 18:28:01 -0500 Organization: Just me at home Message-ID: <87ae6mvchq.fsf_-_@home.com> References: <87hf0uzrj4.fsf@home.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035171119 2620 80.91.224.250 (21 Oct 2002 03:31:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:31:59 +0000 (UTC) Return-Path: Original-Received: (qmail 17999 invoked by alias); 15 Mar 2001 23:28:21 -0000 Original-Received: (qmail 17994 invoked from network); 15 Mar 2001 23:28:21 -0000 Original-Received: from 24.66.123.246.on.wave.home.com (HELO lucy.on.wave.home.com) (24.66.123.246) by gnus.org with SMTP; 15 Mar 2001 23:28:21 -0000 Original-Received: from Spooler by lucy.on.wave.home.com (Mercury/32 v3.21c) ID MO0006DE; 15 Mar 01 18:28:20 -0500 Original-Received: from spooler by lucy.on.wave.home.com (Mercury/32 v3.21c); 15 Mar 01 18:28:02 -0500 Original-Received: from lucy.on.wave.home.com (127.0.0.1) by lucy.on.wave.home.com (Mercury/32 v3.21c) with ESMTP ID MG0006DD; 15 Mar 01 18:28:01 -0500 Original-To: Ding In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "15 Mar 2001 23:58:13 +0100") User-Agent: Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.2 (Thelxepeia) Original-Lines: 59 Xref: main.gmane.org gmane.emacs.gnus.general:35362 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:35362 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.