From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/85276 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus uses a cache? And how it affects mairix searches... Date: Thu, 13 Nov 2014 08:26:56 +0800 Message-ID: <87r3x8q71r.fsf@ericabrahamsen.net> References: <87oaus4brr.fsf@skimble.plus.com> <8761gyvr67.fsf_-_@uwo.ca> <87y4saicdd.fsf@uwo.ca> <87vbn9h55q.fsf@ericabrahamsen.net> <87k33kuux3.fsf@uwo.ca> <874muonktk.fsf@igel.home> <878ujhnqco.fsf@ericabrahamsen.net> <87vbmlm7yq.fsf@ericabrahamsen.net> <87oasc5csk.fsf@uwo.ca> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1415838324 30606 80.91.229.3 (13 Nov 2014 00:25:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2014 00:25:24 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33520@lists.math.uh.edu Thu Nov 13 01:25:16 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XoiDq-000223-TH for ding-account@gmane.org; Thu, 13 Nov 2014 01:25:15 +0100 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 1XoiDD-0008VG-EP; Wed, 12 Nov 2014 18:24:35 -0600 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 1XoiDB-0008Ut-4K for ding@lists.math.uh.edu; Wed, 12 Nov 2014 18:24:33 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XoiD9-0000Ou-Iw for ding@lists.math.uh.edu; Wed, 12 Nov 2014 18:24:32 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XoiD7-0000lb-Id for ding@gnus.org; Thu, 13 Nov 2014 01:24:29 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XoiD3-0001hF-KX for ding@gnus.org; Thu, 13 Nov 2014 01:24:25 +0100 Original-Received: from 50.56.99.223 ([50.56.99.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Nov 2014 01:24:25 +0100 Original-Received: from eric by 50.56.99.223 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Nov 2014 01:24:25 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 124 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 50.56.99.223 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:cVvBoieMCVtaDTcAnTIjMo9kz7E= X-Spam-Score: -0.3 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:85276 Archived-At: --=-=-= Content-Type: text/plain Dan Christensen writes: > Eric Abrahamsen writes: > >> Eric Abrahamsen writes: >> >>> Andreas Schwab writes: >>> >>>> Dan Christensen writes: >>>> >>>>> In gnus.el, it doesn't list nnmairix at all, but somehow when using >>>>> nnmairix, an entry for nnmairix gets added to this list, without the >>>>> virtual keyword (see below). >>>> >>>> diff --git a/lisp/nnmairix.el b/lisp/nnmairix.el >>>> index 0cef699..b2f74e3 100644 >>>> --- a/lisp/nnmairix.el >>>> +++ b/lisp/nnmairix.el >>>> @@ -417,7 +417,7 @@ Other back ends might or might not work.") >>>> >>>> (nnoo-define-basics nnmairix) >>>> >>>> -(gnus-declare-backend "nnmairix" 'mail 'address) >>>> +(gnus-declare-backend "nnmairix" 'mail 'address 'virtual) >>>> >>>> (deffoo nnmairix-open-server (server &optional definitions) >>>> ;; just set server variables >>>> >>>> Andreas. >>> >>> After look at this for a while, I do think this is the right solution -- >>> what do you all think? Can someone apply this change? >> >> Oh never mind, I guess I didn't look long enough. For any backend >> declared as virtual, `gnus-cache-possibly-enter-article' will use >> `nnvirtual-find-group-art' to get the real group name. >> >> That means that if a backend is declared 'virtual but isn't actually >> nnvirtual, the caching mechanism will use the wrong lookup function. > > I don't follow you. Isn't the relevant function gnus-backlog-enter-article, > which skips the backlog for groups that are declared virtual? > > I haven't actually tested the patch and instead simply disabled the > backlog entirely, but I suspect the patch will work. Ha, yes! Between then and now I somehow started looking at the wrong mechanism altogether. Sorry about that. I've attached patches for both the backlog edit and the nnmairix edit. Eric --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Mark-nnmairix-as-a-virtual-backend.patch >From 0f70f9fedda2de3a424384272c2e1adfdad9fdd7 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 13 Nov 2014 08:15:35 +0800 Subject: [PATCH 1/2] Mark nnmairix as a virtual backend * lisp/nnmairix.el: Add 'virtual to call to `gnus-declare-backend' --- lisp/nnmairix.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/nnmairix.el b/lisp/nnmairix.el index 0cef699..b2f74e3 100644 --- a/lisp/nnmairix.el +++ b/lisp/nnmairix.el @@ -417,7 +417,7 @@ Other back ends might or might not work.") (nnoo-define-basics nnmairix) -(gnus-declare-backend "nnmairix" 'mail 'address) +(gnus-declare-backend "nnmairix" 'mail 'address 'virtual) (deffoo nnmairix-open-server (server &optional definitions) ;; just set server variables -- 2.1.3 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Disable-backlog-altogethe-for-virtual-groups.patch >From f297d0bdc31e69661ad3e09279e16fd6605da621 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 13 Nov 2014 08:16:13 +0800 Subject: [PATCH 2/2] Disable backlog altogethe for virtual groups * lisp/gnus-bcklg.el (gnus-backlog-enter-article): No articles from virtual groups should be added to the backlog. --- lisp/gnus-bcklg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus-bcklg.el b/lisp/gnus-bcklg.el index db80800..eb3c9f0 100644 --- a/lisp/gnus-bcklg.el +++ b/lisp/gnus-bcklg.el @@ -61,7 +61,7 @@ (defun gnus-backlog-enter-article (group number buffer) (when (and (numberp number) - (not (string-match "^nnvirtual" group))) + (not (gnus-virtual-group-p group))) (gnus-backlog-setup) (let ((ident (intern (concat group ":" (int-to-string number)) gnus-backlog-hashtb)) -- 2.1.3 --=-=-=--