2010-08-31 Computers

Getting those mailto-links up in message-mode!

I don't remember how many times I have customized my Gnome system to use XEmacs with Gnus and message-mode as my mail writer application just to loose those settings due to some upgrade or something. This is a note so that I won't forget it as easily next time.

The trick is to wrap the code in a script. This way it is easy to use the default from the gnome control panel as a pattern for the customization. The script looks like this:

#!/bin/sh

gnuclient -q -eval '(gnus-msg-mail (replace-regexp-in-string "^mailto:" "" "'"$1"'") "'"$2"'")'

Actually I have just picked this from the net with minor modifications.

The $2 arg is the subject line but mailto-links don't have subjects. It can be put to use tough if you execute the script and supply the args manually so I have kept the second arg.