Gnus and Google Groups

Eternal September notwithstanding, i have great daily fun reading a bunch of usenet groups, and their articles are sometimes a source of ideas for blogging. Of course, my usenet client is Gnus; but in a blog post one needs the Google Groups URL when mentioning and article. So, i just spent five minutes writing a snippet to go from Gnus to GG in a keystroke:

(defun jao-gnus-goto-google ()
  (when (memq major-mode '(gnus-summary-mode gnus-article-mode))
    (when (eq major-mode 'gnus-article-mode) 
    (let* ((article (gnus-summary-article-number))
           (header (gnus-summary-article-header article))
           (id (substring (mail-header-id header) 1 -1)))
       (format "" id)))))

As you see, i just check that i’m viewing a post, obtain the message identifier (trimming surrounding markup) and construct a query that looks up the corresponding GG article.

Talk about extensibility.

%d bloggers like this: