From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39529 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Bug fix for B c and B m Date: Sat, 20 Oct 2001 11:50:01 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87g08erdpg.fsf@squeaker.lickey.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175226 28484 80.91.224.250 (21 Oct 2002 04:40:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:40:26 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: (qmail 550 invoked from network); 20 Oct 2001 09:52:08 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 20 Oct 2001 09:52:08 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15usnA-00027S-00; Sat, 20 Oct 2001 04:51:44 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 20 Oct 2001 04:51:21 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id EAA19635 for ; Sat, 20 Oct 2001 04:51:10 -0500 (CDT) Original-Received: (qmail 540 invoked by alias); 20 Oct 2001 09:51:27 -0000 Original-Received: (qmail 535 invoked from network); 20 Oct 2001 09:51:27 -0000 Original-Received: from unknown (HELO dolk.extundo.com) (195.42.214.242) by gnus.org with SMTP; 20 Oct 2001 09:51:27 -0000 Original-Received: from barbar.josefsson.org (slipsten.extundo.com [195.42.214.241]) (authenticated bits=0) by dolk.extundo.com (8.12.1/8.12.1) with ESMTP id f9K9osHB016156; Sat, 20 Oct 2001 11:50:55 +0200 Original-To: Matt Armstrong In-Reply-To: <87g08erdpg.fsf@squeaker.lickey.com> (Matt Armstrong's message of "Sat, 20 Oct 2001 01:08:11 -0600") Mail-Copies-To: nobody Original-Lines: 90 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39529 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39529 Matt Armstrong writes: > I'd appreciate it if someone with CVS commit privs could look at this > and consider committing it. > > Bug summary: "B c nnfolder:foo" when no nnfolder:foo group or even > nnfolder: server exists yet will end up putting the group with > nnfolder+archive: (at least partially). In fact, an nnfolder:foo > group is created, but nnfolder+archive: stuff does end up getting set > in .newsrc.eld and things are generally weird afterward. > > I tracked this down to a use of gnus-group-method, which seems to do a > prefix match on the server portion of the group name and consider it a > match. So the nnfolder+archive server will satisfy a request for a > server for nnfolder:FOO. > > We don't want this for "B c" and "B m" since the user is specifying an > exact server name. A comment in gnus-group-method says "you probably > want to be using gnus-find-method-for-group", and so I changed > gnus-sum.el to do so. The problem is fixed. > gnus-find-method-for-group seems to handle the "I'm creating a new > method" case correctly by making up a new '(nnfolder "") select > method. > > Patch attached. Does your patch work with new groups? Compare with: 2000-03-01 Simon Josefsson * gnus-sum.el (gnus-read-move-group-name): (gnus-summary-move-article): Use `gnus-group-method' to find out what method the manually entered group belong to. `gnus-group-name-to-method' doesn't return any method parameters and `gnus-find-method-for-group' uses `gnus-group-name-to-method' for new groups so they wouldn't work. Looking at `gnus-group-method' it looks it should do the right thing for new groups, and it seem to work when I run it interactively as well. Can you edebug it for some example that gives the wrong answer and post it here? > > -- > matt > > ? patch.txt > Index: ChangeLog > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v > retrieving revision 6.779 > diff -u -r6.779 ChangeLog > --- ChangeLog 2001/10/19 14:58:54 6.779 > +++ ChangeLog 2001/10/20 07:04:24 > @@ -1,3 +1,9 @@ > +2001-10-20 Matt Armstrong > + > + * gnus-sum.el (gnus-summary-move-article): Use > + gnus-find-method-for-group, not gnus-group-method. > + (gnus-read-move-group-name): Ditto. > + > 2001-10-19 Per Abrahamsen > > * mm-decode.el (mm-default-directory): Fix customize type. > Index: gnus-sum.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v > retrieving revision 6.117 > diff -u -r6.117 gnus-sum.el > --- gnus-sum.el 2001/10/18 19:49:05 6.117 > +++ gnus-sum.el 2001/10/20 07:04:49 > @@ -8021,7 +8021,7 @@ > (set (intern (format "gnus-current-%s-group" action)) to-newsgroup)) > (setq to-method (or select-method > (gnus-server-to-method > - (gnus-group-method to-newsgroup)))) > + (gnus-find-method-for-group to-newsgroup)))) > ;; Check the method we are to move this article to... > (unless (gnus-check-backend-function > 'request-accept-article (car to-method)) > @@ -9960,7 +9960,8 @@ > (nreverse split-name)) > nil nil nil > 'gnus-group-history)))) > - (to-method (gnus-server-to-method (gnus-group-method to-newsgroup)))) > + (to-method (gnus-server-to-method > + (gnus-find-method-for-group to-newsgroup)))) > (when to-newsgroup > (if (or (string= to-newsgroup "") > (string= to-newsgroup prefix))