From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/63383 Path: news.gmane.org!not-for-mail From: Andreas Seltenreich Newsgroups: gmane.emacs.gnus.general Subject: bug in gnus-group-kill-group; smarter gnus-find-method-for-group Date: Tue, 20 Jun 2006 22:59:53 +0200 Message-ID: <87bqsnfsqe.fsf@gate450.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1150837567 19797 80.91.229.2 (20 Jun 2006 21:06:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Jun 2006 21:06:07 +0000 (UTC) Original-X-From: ding-owner+m11910@lists.math.uh.edu Tue Jun 20 23:05:58 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FsnQ3-0001Oo-Rj for ding-account@gmane.org; Tue, 20 Jun 2006 23:05:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FsnPn-0007f5-00; Tue, 20 Jun 2006 16:05:39 -0500 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FsnKV-0007ex-00 for ding@lists.math.uh.edu; Tue, 20 Jun 2006 16:00:11 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1FsnKR-0007Yf-Rm for ding@lists.math.uh.edu; Tue, 20 Jun 2006 16:00:11 -0500 Original-Received: from smtp1.rz.uni-karlsruhe.de ([129.13.185.217]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FsnKL-0006NX-00 for ; Tue, 20 Jun 2006 23:00:01 +0200 Original-Received: from rzstud2.stud.uni-karlsruhe.de (exim@rzstud2.stud.uni-karlsruhe.de [193.196.41.38]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.50 #1) id 1FsnKK-000084-Pq; Tue, 20 Jun 2006 23:00:00 +0200 Original-Received: from uwi7 by rzstud2.stud.uni-karlsruhe.de with local (Exim 4.43) id 1FsnKK-0007HF-Fl for ding@gnus.org; Tue, 20 Jun 2006 23:00:00 +0200 Original-To: ding@gnus.org X-Face: $:F<87a[gD1?#R6S3j21cr1&C&7bd63GHC.tSdskUb}hhwG(ci*=D5kJ<_N+p9q(7-,PnG. Et.Yh --=-=-= I just found out why groups I killed using gnus-group-kill-group from a secondary nnml server kept reappearing when I hit gnus-group-find-new-groups in the group buffer. It turned out gnus-group-change-level didn't put them into gnus-killed-list. This is because it calls gnus-group-foreign-p after removing the group's entry from gnus-active-hashtb. gnus-group-foreign-p uses gnus-find-method-for-group on the group name, which currently invents a new method if it can't find an entry in gnus-active-hashtb, ignoring a possibly existing definition for the virtual server name used. To fix it, I propose the following patch to make gnus-find-method-for-group smarter when presented with an unknown group, and only invent a new method as a last resort. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gnus.el.diff Index: gnus.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus.el,v retrieving revision 7.54 diff -c -r7.54 gnus.el *** gnus.el 1 May 2006 15:14:44 -0000 7.54 --- gnus.el 20 Jun 2006 20:18:58 -0000 *************** *** 4123,4130 **** (or gnus-override-method (and (not group) gnus-select-method) ! (and (not (gnus-group-entry group)) ;; a new group ! (gnus-group-name-to-method group)) (let ((info (or info (gnus-get-info group))) method) (if (or (not info) --- 4123,4135 ---- (or gnus-override-method (and (not group) gnus-select-method) ! (and (not (gnus-group-entry group)) ! ;; Killed or otherwise unknown group. ! (or ! ;; If we know a virtual server by that name, return its method. ! (gnus-server-to-method (gnus-group-server group)) ! ;; Invent a new method as last resort. ! (gnus-group-name-to-method group))) (let ((info (or info (gnus-get-info group))) method) (if (or (not info) --=-=-= Note that this change would also have prevented the method cache corruption problem with nnir.el (which has been worked around using gnus-override-method). Any objections to applying it? regards, andreas --=-=-=--