[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I start a draft following mailto: link



At Tue, 11 Jan 2011 12:51:42 -0700,
Adrian Owen wrote:
> Hi,
> 
> I am trying to follow a link with a format like:
> 
>  Save message: [mailto:voicemail@example.com?subject=Save_AAAAAV0AAAB2lSAV]
> 
> or:
> 
> [mailto:voicemail@example.com?subject=Delete_AAAAAV0AAAB2lSAV]
> 
> I would like it to start a draft with the subject, as this is a
> feature I need quite frequently.   Secondly, although I can follow a
> link out of, for example erc client, in wl there is no response.

I do this using emacsclient and a small Bash script:

 #!/bin/bash

 ARGS=""

 for arg in $@
 do
     a=`echo ${arg} | sed "s/+/ /"`
     ARGS=$ARGS\ \"${a}\"
 done

 func="(compose-mail${ARGS})"
 emacsclient -e "${func}"

I have this script as my mailto: handler for XULrunner. It relies,
however, on the client generating the call to the script passing in
arguments in the same order that (compose-mail) expects them; so it's
not a particularly robust solution.

Best,
Richard
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
ISMS, Computing
Goldsmiths, University of London
Tel: +44 (0)20 7078 5134
Skype: richardjlewis
JID: ironchicken@jabber.earth.li
http://www.richardlewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-