Getting a mailing-list archive URL from a Message-ID

It happens often to me: I am reading a mailing list on mutt and I want to send a pointer to the message to somebody.

I always wanted to be able to press a key on mutt, and a script would query mailing list archives and find a URL for the message on a mailing list archive. Today I have found this to be possible. Gmane has a “Message-Id” URL format tha allows you to do it. Just point to http://mid.gmane.org/<message-id> and it will redirect to the message on the archives, if it is present.

Now, getting a URL for a mailing list message is as simple as piping the message from mutt to this small script:

#!/bin/bash
mid="$(grep -m 1 -i ^Message-ID: | cut -d: -f2 | sed -e 's/^ *//')"
kfmclient openURL 'http://mid.gmane.org/'"$mid"

And this can be bound this to a keystroke under mutt by simply using something like this on .muttrc:

macro pager U "msg2url\n"

There are other mailing list archives with similar features. But they are more specific to some mailing lists, so they are not as comprehensive as Gmane. Some examples:

  • http://kerneltrap.org/mailarchive/message-id/<message-id> (for KernelTrap mailing list archives)
  • http://www.red-bean.com/threadfind (mostly Subversion-related mailing lists)

Twitter

Rendi-me à nova modinha.

Quem quiser pode me acompanhar: ehabkost (em inglês) e ehabkost\_pt\_BRbotobr (português).

A utilidade principal que eu espero dele é ter um canal de “broadcast” para falar sobre assuntos aleatórios. O tipo de coisa para a qual eu geralmente escolho alguém aleatóriamente no IM como vítima para ouvir algum comentário. A idéia é mover isso pra lá. Afinal, se é um assunto aleatório e é para jogar conversa fora, outras pessoas podem querer ler e discutir.