From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/72447 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: [PATCH] Add `nnregistry', for use in `gnus-refer-article-method' Date: Sat, 02 Oct 2010 00:33:29 +0200 Message-ID: <87ocbd5yrq.fsf@gnu.org> References: <8763d8opn4.fsf@gnu.org> <87iqgmqxmg.fsf@gnu.org> <874odb893n.fsf@gnu.org> <877hi6lx44.fsf@gnu.org> <87fwwr2tmq.fsf@gnu.org> <87eicb8dru.fsf@lifelogs.com> <877hi2515y.fsf@lifelogs.com> <8739sq500h.fsf@lifelogs.com> <87eic97uaa.fsf@gnu.org> <87hbh5yiof.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1285972468 25823 80.91.229.12 (1 Oct 2010 22:34:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Oct 2010 22:34:28 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M20819@lists.math.uh.edu Sat Oct 02 00:34:27 2010 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 1P1oBO-0007dp-2A for ding-account@gmane.org; Sat, 02 Oct 2010 00:34:26 +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 1P1oAq-0000AD-60; Fri, 01 Oct 2010 17:33:52 -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 1P1oAn-00009q-QK for ding@lists.math.uh.edu; Fri, 01 Oct 2010 17:33:49 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1P1oAl-0001gs-Pz for ding@lists.math.uh.edu; Fri, 01 Oct 2010 17:33:49 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1P1oAl-0002kk-00 for ; Sat, 02 Oct 2010 00:33:47 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P1oAj-0007Uq-1x for ding@gnus.org; Sat, 02 Oct 2010 00:33:45 +0200 Original-Received: from yoda.fdn.fr ([80.67.169.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Oct 2010 00:33:45 +0200 Original-Received: from ludo by yoda.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 02 Oct 2010 00:33:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 182 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: yoda.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 =?iso-8859-1?Q?Vend=E9miaire?= an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:BAGXFc+AXWB/VARrpje9HojCCA4= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:72447 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ted Zlatanov writes: > On Fri, 01 Oct 2010 18:27:25 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wr= ote:=20 > > LC> Hi! > LC> Ted Zlatanov writes: > > LMI> And nnregistry should be documented in gnus.texi. >>>=20 > TZ> Ludovic? > > LC> Yes, sure. > > Can you write some documentation for the manual? Yes, really. :-) See the attached patch. What do you think? >>> Probably it should be in the gnus-registry section of the manual (with a >>> minimal link elsewhere), explaining that it has to be loaded *after* >>> gnus-registry.el but *before* gnus-registry-initialize is called. > > LC> Hmm, why before =E2=80=98gnus-registry-initialize=E2=80=99 is called? > > Because `gnus-refer-article-method' should not contain 'nnregistry > automatically. So =E2=80=98gnus-registry-initialize=E2=80=99 needs to ch= eck for the > 'nnregistry feature. I had that check in > `gnus-registry-install-nnregistry' but moved it one level higher so > users can call it directly if they want. See the revised docs I just pus= hed. Hmm, I=E2=80=99m not convinced by =E2=80=98gnus-registry-install-nnregistry= =E2=80=99 because: 1. it does things under the hood; 2. it /appends/ =E2=80=98nnregistry=E2=80=99 to =E2=80=98gnus-refer-artic= le-method=E2=80=99, whereas it=E2=80=99s likely to perform better if it appears right after =E2=80= =98current=E2=80=99. What do you think? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Document-nnregistry.patch Content-Transfer-Encoding: quoted-printable Content-Description: the patch From=2024dd8d7c7cb01c317861c4053cbfa83ba37d6a4a Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Ludovic=3D20Court=3DC3=3DA8s?=3D Date: Sat, 2 Oct 2010 00:29:48 +0200 Subject: [PATCH] Document `nnregistry'. * texi/gnus.texi (Finding the Parent): Add xref to `Registry Article Refer Method'. (The Gnus Registry): Mention the refer method. (Registry Article Refer Method): New node. =2D-- texi/gnus.texi | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 49 insertions(+), 2 deletions(-) diff --git a/texi/gnus.texi b/texi/gnus.texi index 2858990..cb1648f 100644 =2D-- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -10989,9 +10989,12 @@ do not do a particularly excellent job at it. Tha= t is, @code{nnmbox}, @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate articles from any groups, while @code{nnfolder}, and @code{nnimap} are only able to locate articles that have been posted to the current =2Dgroup. (Anything else would be too time consuming.) @code{nnmh} does =2Dnot support this at all. +group. @code{nnmh} does not support this at all. =20 +Fortunately, the special @code{nnregistry} back end is able to locate +articles in any groups, regardless of their back end (@pxref{Registry +Article Refer Method, fetching by @code{Message-ID} using the +registry}). =20 @node Alternative Approaches @section Alternative Approaches @@ -25427,6 +25430,13 @@ the sender in addition to the Message-ID. Several= strategies are available. =20 @item +Refer to messages by ID + +Commands like @code{gnus-summary-refer-parent-article} can take +advantage of the registry to jump to the referred article, regardless +of the group the message is in. + +@item Store custom flags and keywords =20 The registry can store custom flags and keywords for a message. For @@ -25445,6 +25455,7 @@ of all messages matching a particular set of criter= ia. @menu * Setup:: * Fancy splitting to parent:: +* Registry Article Refer Method:: * Store custom flags and keywords:: * Store arbitrary data:: @end menu @@ -25521,6 +25532,42 @@ registry will keep. The file where the registry will be stored between Gnus sessions. @end defvar =20 +@node Registry Article Refer Method +@subsection Fetching by @code{Message-ID} Using the Registry + +The registry knows how to map each @code{Message-ID} to the group it's +in. This can be leveraged to enhance the ``article refer method'', +the thing that tells Gnus how to look up an article given its +Message-ID (@pxref{Finding the Parent}). + +@vindex nnregistry +@vindex gnus-refer-article-method + +The @code{nnregistry} refer method does exactly that. It has the +advantage that an article may be found regardless of the group it's +in---provided its @code{Message-ID} is known to the registry. It can +be enabled by augmenting the start-up file with something along these +lines: + +@example +;; Keep enough entries to have a good hit rate when referring to an +;; article using the registry. Use long group names so that Gnus +;; knows where the article is. +(setq gnus-registry-max-entries 2500 + gnus-registry-use-long-group-names t) + +(gnus-registry-initialize) + +(setq gnus-refer-article-method + '(current + (nnregistry) + (nnweb "gmane" (nnweb-type gmane)))) +@end example + +The example above instructs Gnus to first look up the article in the +current group, or, alternatively, using the registry, and finally, if +all else fails, using Gmane. + @node Fancy splitting to parent @subsection Fancy splitting to parent =20 =2D-=20 1.7.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iEYEARECAAYFAkymYb0ACgkQd92V4upS7PQ8eQCeME4hQEN8YtUoxOWscsyOeb2B 4BwAn0psO9i/qnrYC6MYRZec5hYehSUg =Jy/W -----END PGP SIGNATURE----- --==-=-=--