Gnus development mailing list
 help / color / mirror / Atom feed
* Canonical way to find messages by message-id
@ 2004-08-15 15:04 Sacha Chua
  2004-08-16 17:38 ` Ted Zlatanov
  0 siblings, 1 reply; 2+ messages in thread
From: Sacha Chua @ 2004-08-15 15:04 UTC (permalink / raw)


Hello, everyone!

What is the canonical way to find a message by message ID? I maintain
planner.el, and right now we're doing it with this code snippet:

(defun planner-gnus-browse-url (url)
  "If this is a Gnus URL, jump to it."
  (when (string-match "^gnus://\\(.+\\)/\\(.+\\)" url)
    (let ((group (match-string 1 url))
          (article (match-string 2 url)))
      (gnus-fetch-group group 1)
      (or (gnus-summary-goto-article article nil t)
          (when (fboundp 'gnus-summary-insert-cached-articles)
            (gnus-summary-insert-cached-articles)
            (gnus-summary-goto-article article nil t))
          (message "Message could not be found."))
      t)))

where an example URL would be

gnus://mail.planner/<20040813162910.GA3241@khazad-dum>

Unfortunately, (gnus-fetch-group group 1) fails when the most recent
message is no longer in the group, and we occasionally have problems
with cached articles.

(gnus-fetch-group group) sorta works if we remember to specify a large
enough number of messages, but the prompt can be slightly annoying.
Loading all messages and waiting for the summary to display takes a
lot of time.

Is there a way to quickly jump to a specific message given the message
ID, and then display the article and the summary buffer with just that
message in it? I tried tracing through some functions in the summary
and article code, but got pretty lost. <sheepish grin>

Thanks for your help!

-- 
Sacha Chua <sacha@free.net.ph> - open source geekette
interests: emacs, gnu/linux, making computer science education fun
wearable computing, personal information management
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-16 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-15 15:04 Canonical way to find messages by message-id Sacha Chua
2004-08-16 17:38 ` Ted Zlatanov

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).