From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78796 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.gnus.general Subject: Re: Virtual groups weirdness Date: Wed, 11 May 2011 13:07:49 +0200 Message-ID: <87mxit5wca.fsf@gmail.com> References: <87tyd17enk.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1305112162 30016 80.91.229.12 (11 May 2011 11:09:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 May 2011 11:09:22 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27097@lists.math.uh.edu Wed May 11 13:09:15 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QK7I3-0006AH-BQ for ding-account@gmane.org; Wed, 11 May 2011 13:09:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1QK7H1-0002Hi-8D; Wed, 11 May 2011 06:08:11 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1QK7Gz-0002HR-Iy for ding@lists.math.uh.edu; Wed, 11 May 2011 06:08:09 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1QK7Gy-00029j-8h for ding@lists.math.uh.edu; Wed, 11 May 2011 06:08:08 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1QK7Gv-0006Bc-CR for ding@gnus.org; Wed, 11 May 2011 13:08:05 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QK7Gv-0005ZU-7j for ding@gnus.org; Wed, 11 May 2011 13:08:05 +0200 Original-Received: from portable42.ceremade.dauphine.fr ([193.48.71.42]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2011 13:08:05 +0200 Original-Received: from antoine.levitt by portable42.ceremade.dauphine.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2011 13:08:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: portable42.ceremade.dauphine.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.0 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78796 Archived-At: 11/05/11 11:46, Antoine Levitt > I'm trying to use virtual groups so as to have an "inbox+sent mail" > group (both on nnimap). Doing so I get what I can only describe as > erratic behaviour. > > I did G V and edited the regexp to INBOX\\|Sent. Then I quit gnus and > run it again, and try to open the new virtual group. I get prompted with > how many messages I want to get, enter some value, and then not only do > I not get the summary buffer, but the group's unread count goes to the > total number of messages in both groups - even though I have no unread > messages. > > The log says > > Retrieving newsgroup: nnvirtual:inbox+sent... > Fetching headers for nnvirtual:inbox+sent...done > Making sparse threads...done > No unread news > > This is on a blank .gnus. So yeah, I'm a moron. The virtual group was matching itself, producing weird behaviour. There could be a check for that, though. I tried the following fix, but it doesn't work because nnvirtual-current-group is nil. Any other way to get this information? === modified file 'lisp/gnus/nnvirtual.el' --- lisp/gnus/nnvirtual.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/nnvirtual.el 2011-05-11 11:03:06 +0000 @@ -236,8 +236,13 @@ ;; Go through the newsrc alist and find all component groups. (let ((newsrc (cdr gnus-newsrc-alist)) group) (while (setq group (car (pop newsrc))) - (when (string-match nnvirtual-component-regexp group) ; Match + (when (and (string-match nnvirtual-component-regexp group) ; Match + (not (equal group nnvirtual-current-group))) ;; Add this group to the list of component groups. (setq nnvirtual-component-groups (cons group (delete group nnvirtual-component-groups)))))))