Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: getting article numbers from message-ids?
Date: Mon, 02 Jun 2014 23:13:16 +0800	[thread overview]
Message-ID: <874n03jqer.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87lhtfk9qo.fsf@ericabrahamsen.net>

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I'm starting with a list of org-gnus links, and trying to create an
> ephemeral group (via nnir) displaying those messages. I think
> everything's working, except that what I've got is each message's
> Message-ID, and nnir wants article numbers:
>
> Incoming: "nnimap+Server:group-name#A9ED-1B41EF8FC63E@example-server.fr"
>
> Outgoing: ["group-name" ARTICLE_NUMBER 100]
>
> I could, for each message link, use org-gnus-open to actually visit the
> message in its home group and get the article with
> `gnus-summary-article-number', but I'm hoping there's a more direct way.
>
> These message could be coming from any backend -- I can't know for sure
> if they'll be imap, or maildir, or what have you.
>
> Can the registry be used to save information like this? It would be nice
> to look first in the registry, which I assume would be quickest, and
> then fall back to something more manual and expensive.
>
> Anyway, any tips would be much appreciated!

Answering my own question:

(gnus-request-head "A9ED-1B41EF8FC63E@example-server.fr"
"nnimap+Server:group-name")

=>

("group-name" . ARTICLE_NUMBER)

No buffer setup or teardown, no messing about, extremely fast response.
A highly profitable two-and-a-half hours spent with the gnus codebase :)

E




  reply	other threads:[~2014-06-02 15:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02  8:15 Eric Abrahamsen
2014-06-02 15:13 ` Eric Abrahamsen [this message]
2014-09-24 21:12 ` Ted Zlatanov
2014-09-25  0:15   ` Eric Abrahamsen
2014-09-25 12:36     ` Ted Zlatanov
2014-09-25 18:25       ` Eric Abrahamsen

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=874n03jqer.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).