From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80087 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.gnus.general Subject: Re: nnir, gnus-goto-article and such Date: Wed, 28 Sep 2011 10:34:45 -0400 Message-ID: References: <87pqinvvg4.fsf@lifelogs.com> <87aa9pu1tx.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317220547 28154 80.91.229.12 (28 Sep 2011 14:35:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 28 Sep 2011 14:35:47 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28381@lists.math.uh.edu Wed Sep 28 16:35:41 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 1R8vEb-0001Fr-7C for ding-account@gmane.org; Wed, 28 Sep 2011 16:35:41 +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 1R8vEP-0000ZF-1w; Wed, 28 Sep 2011 09:35:29 -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 1R8vEN-0000Z7-S4 for ding@lists.math.uh.edu; Wed, 28 Sep 2011 09:35:27 -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 1R8vEM-00046q-HV for ding@lists.math.uh.edu; Wed, 28 Sep 2011 09:35:27 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1R8vEL-0004GF-68 for ding@gnus.org; Wed, 28 Sep 2011 16:35:25 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R8vEH-00017j-Sr for ding@gnus.org; Wed, 28 Sep 2011 16:35:21 +0200 Original-Received: from 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com ([207.172.223.249]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Sep 2011 16:35:21 +0200 Original-Received: from dave by 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Sep 2011 16:35:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 94 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (darwin) Cancel-Lock: sha1:4ENtRo+Zbbs5T2r2k6dyFmdd5eo= X-Spam-Score: -5.4 (-----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80087 Archived-At: on Tue Sep 27 2011, Ted Zlatanov wrote: > On Tue, 27 Sep 2011 11:35:42 -0400 Dave Abrahams wrote: > > DA> on Mon Sep 26 2011, Ted Zlatanov wrote: > >>> The registry is a place where we record interesting things (group, >>> subject, sender, recipients, registry marks) about articles, keyed by >>> the message ID. But it's also a general key-val store with some >>> indexing. For Lars' point, the registry is an opportunistic cache that >>> remember where you've seen a message-ID (server name and group name) and >>> where it's been split before. > > DA> Yes, I understand all that... I know what it is as a library component. > DA> What I don't see is how *at the user level* it can easily and usefully > DA> be exploited. > > Er, you can split to the reference parent, I don't use client-side splitting, so I guess that doesn't make much difference to me, but I guess it might for others. > or by subject, or by sender? You can't split by subject or sender without the registry?! You're kidding, right? Like I said, I never ask Gnus to shuffle mail into different folders for me but that seems pretty basic. > It lets the user keep registry marks? Are those not exploitative > enough? What's a user going to *do* with registry marks? That's another tool whose real utility escapes me. >>> Simply call it like this (for message-ID "34"): >>> >>> (gnus-registry-get-id-key "34" 'group) >>> (gnus-registry-get-id-key "34" 'subject) > > DA> "34" sounds like a message number, not a Message-ID (like what's found > DA> in mail headers). How is gnus-registry going to know which group's > DA> number 34 I'm referencing? > > No, I said message-ID was 34 so I didn't have to type > "". Sorry for the confusion. np, thanks for the clarification. > DA> So here's an example where I tried it out. > > DA> (defun gnus-goto-article (message-id) > DA> (with-temp-buffer > DA> (erase-buffer) > DA> ;; Insert dummy article > DA> (insert (format "From nobody Tue Sep 13 22:05:34 2011\n\n")) > DA> (gnus-group-read-ephemeral-group message-id > DA> `(nndoc ,message-id > DA> (nndoc-address ,(current-buffer)) > DA> (nndoc-article-type mbox)) > DA> 'activate > DA> (not 'quit-config) > DA> (not 'request-only) > DA> '(-1) ; 'select-articles > DA> (not 'parameters) > DA> 0 ; ' number > DA> ) > DA> (gnus-summary-refer-article message-id) > DA> (message "group from registry: %s" (gnus-registry-get-id-key message-id 'group)) > DA> )) > > DA> I queried the registry at the point where I'd like to know the group of > DA> that article. Unfortunately, I get back nil. And if I wanted to > DA> conjure up an article number, well, it's -1, so that's not going to be > DA> much help, is it? > > The registry notices articles when you visit a group or when articles > are split. To feed it artificial data, use: > > (defun gnus-registry-handle-action (id from to subject sender > &optional recipients) Umm, sorry. That function isn't documented. How do I use it? How would I get the group that gnus-summary-refer-article finds the message in into the registry? I don't even see a parameter for group. > I hope that helps... Getting there, but not quite yet. -- Dave Abrahams BoostPro Computing http://www.boostpro.com