From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80069 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.gnus.general Subject: Re: nnir, gnus-goto-article and such Date: Tue, 27 Sep 2011 12:04:56 -0400 Message-ID: References: <87pqinvvg4.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317139991 24661 80.91.229.12 (27 Sep 2011 16:13:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2011 16:13:11 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28363@lists.math.uh.edu Tue Sep 27 18:13:07 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 1R8aHK-0006jP-Fj for ding-account@gmane.org; Tue, 27 Sep 2011 18:13:06 +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 1R8aH5-0002hX-05; Tue, 27 Sep 2011 11:12:51 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1R8aH3-0002hN-QE for ding@lists.math.uh.edu; Tue, 27 Sep 2011 11:12:49 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R8aH2-00059U-Lh for ding@lists.math.uh.edu; Tue, 27 Sep 2011 11:12:49 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1R8aH1-0003Yg-AY for ding@gnus.org; Tue, 27 Sep 2011 18:12:47 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R8aH0-0006Xf-4J for ding@gnus.org; Tue, 27 Sep 2011 18:12:46 +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 ; Tue, 27 Sep 2011 18:12:45 +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 ; Tue, 27 Sep 2011 18:12:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 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:3GOk3elGj8E5Wbf9vjQiC7B5dD8= X-Spam-Score: -5.4 (-----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80069 Archived-At: on Mon Sep 26 2011, Ted Zlatanov wrote: DA> on Wed Sep 21 2011, Lars Magne Ingebrigtsen wrote: >>> Then the registry should be able to tell you what group it came from, >>> too, I think? > > DA> Maybe... I'm still not sure how to use it. But I'll take another look. > > Simply call it like this (for message-ID "34"): > > (gnus-registry-get-id-key "34" 'group) > (gnus-registry-get-id-key "34" 'subject) So here's an example where I tried it out. (defun gnus-goto-article (message-id) (with-temp-buffer (erase-buffer) ;; Insert dummy article (insert (format "From nobody Tue Sep 13 22:05:34 2011\n\n")) (gnus-group-read-ephemeral-group message-id `(nndoc ,message-id (nndoc-address ,(current-buffer)) (nndoc-article-type mbox)) 'activate (not 'quit-config) (not 'request-only) '(-1) ; 'select-articles (not 'parameters) 0 ; ' number ) (gnus-summary-refer-article message-id) (message "group from registry: %s" (gnus-registry-get-id-key message-id 'group)) )) I queried the registry at the point where I'd like to know the group of that article. Unfortunately, I get back nil. And if I wanted to conjure up an article number, well, it's -1, so that's not going to be much help, is it? It seems like this shouldn't be so hard... -- Dave Abrahams BoostPro Computing http://www.boostpro.com