summaryrefslogtreecommitdiff
path: root/emacsmail.sh
blob: a815997cd982fc78708b82d80898111dd758a8b1 (plain)
1
2
3
4
5
6
7
8
9
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)'