Add KDE-emacs/GNUS mail integration tools
[emacsstuff.git] / mail / emacs-mail
1 #!/usr/bin/python
2
3 import sys
4 import re
5 import os
6
7 QRE = re.compile("[\\\"]")
8
9 def quote(s):
10     def repl(m): return "\\"+m.group(0)
11     return QRE.sub(repl,s)
12         
13 os.spawnlp(os.P_WAIT,"gnuclient","gnuclient","--eval",
14            "(write-mail \"" + "\" \"".join(map(quote,sys.argv[1:])) + "\")")