From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80071 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: nnir, gnus-goto-article and such Date: Tue, 27 Sep 2011 16:12:26 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87aa9pu1tx.fsf@lifelogs.com> References: <87pqinvvg4.fsf@lifelogs.com> Reply-To: ding@gnus.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317158036 25934 80.91.229.12 (27 Sep 2011 21:13:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2011 21:13:56 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28365@lists.math.uh.edu Tue Sep 27 23:13:52 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 1R8eyO-0000oe-5f for ding-account@gmane.org; Tue, 27 Sep 2011 23:13:52 +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 1R8exV-00043K-VH; Tue, 27 Sep 2011 16:12:58 -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 1R8exU-000438-Nv for ding@lists.math.uh.edu; Tue, 27 Sep 2011 16:12:56 -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 1R8exT-0000e8-15 for ding@lists.math.uh.edu; Tue, 27 Sep 2011 16:12:56 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1R8exP-0002gU-JS for ding@gnus.org; Tue, 27 Sep 2011 23:12:51 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R8exP-0000PG-8B for ding@gnus.org; Tue, 27 Sep 2011 23:12:51 +0200 Original-Received: from 38.98.147.133 ([38.98.147.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Sep 2011 23:12:51 +0200 Original-Received: from tzz by 38.98.147.133 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Sep 2011 23:12:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 66 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.133 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:S9MpYq8yLXwvfN4oM9OZ17R0ih8= X-Spam-Score: -4.2 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80071 Archived-At: 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, or by subject, or by sender? It lets the user keep registry marks? Are those not exploitative enough? >> 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. 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) I hope that helps... Ted