Gnus development mailing list
 help / color / mirror / Atom feed
From: Dave Abrahams <dave@boostpro.com>
To: ding@gnus.org
Subject: Re: nnir, gnus-goto-article and such
Date: Wed, 28 Sep 2011 10:34:45 -0400	[thread overview]
Message-ID: <m2hb3whh16.fsf@pluto.luannocracy.com> (raw)
In-Reply-To: <87aa9pu1tx.fsf@lifelogs.com>


on Tue Sep 27 2011, Ted Zlatanov <tzz-AT-lifelogs.com> wrote:

> On Tue, 27 Sep 2011 11:35:42 -0400 Dave Abrahams <dave@boostpro.com> wrote: 
>
> DA> on Mon Sep 26 2011, Ted Zlatanov <tzz-AT-lifelogs.com> 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
> "<m2wrcu0zht.fsf@pluto.luannocracy.com>".  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




  reply	other threads:[~2011-09-28 14:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 18:24 Dave Abrahams
2011-09-16 15:05 ` gnus-warp-to-article (was: nnir, gnus-goto-article and such) Dave Abrahams
2011-09-21 18:03 ` nnir, gnus-goto-article and such Lars Magne Ingebrigtsen
2011-09-21 21:16   ` John Wiegley
2011-09-22 13:01     ` Andrew Cohen
2011-09-26 19:17       ` Lars Magne Ingebrigtsen
2011-09-26 20:46       ` Dave Abrahams
2011-09-27  7:04         ` John Wiegley
2011-09-27 15:36           ` Dave Abrahams
2011-09-26 20:01   ` Dave Abrahams
2011-09-26 21:35     ` Ted Zlatanov
2011-09-27 15:35       ` Dave Abrahams
2011-09-27 21:12         ` Ted Zlatanov
2011-09-28 14:34           ` Dave Abrahams [this message]
2011-09-29  0:32             ` Ted Zlatanov
2011-09-29  1:19               ` Dave Abrahams
2011-09-29  2:06                 ` Dave Abrahams
2011-09-29  8:27                   ` Ted Zlatanov
2011-09-29 13:40                     ` Dave Abrahams
2011-09-29 14:00                       ` Ted Zlatanov
2011-09-29 14:40                         ` Dave Abrahams
2011-09-29 14:58                           ` Ted Zlatanov
2011-09-29 20:04                             ` Dave Abrahams
2011-09-29 23:40                               ` Ted Zlatanov
2011-09-29  8:22                 ` Ted Zlatanov
2011-09-27 16:04       ` Dave Abrahams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2hb3whh16.fsf@pluto.luannocracy.com \
    --to=dave@boostpro.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).