From 896161c483ceef3ed16e2f19a5c05106bed04512 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 21 Jun 2011 21:44:46 -0400 Subject: I can't believe I didn't have this in git before. --- emacsmail.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 emacsmail.sh (limited to 'emacsmail.sh') diff --git a/emacsmail.sh b/emacsmail.sh new file mode 100644 index 0000000..a815997 --- /dev/null +++ b/emacsmail.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# emacs-mailto-handler + +mailto=$1 +mailto="mailto:${mailto#mailto:}" +mailto=$(printf '%s\n' "$mailto" | sed -e 's/[\"]/\\&/g') +elisp_expr="(mailto-compose-mail \"$mailto\")" + +emacsclient -a "" -c -n --eval "$elisp_expr" \ + '(set-window-dedicated-p (selected-window) t)' -- cgit v1.2.3