X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/e401daecab43ff974474319d1f996c03a076d319..2f2df00d436b117acd3e0de13548406efaf272b8:/notmuch-emacs-mua diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua index 08be145b..f9d83713 100755 --- a/notmuch-emacs-mua +++ b/notmuch-emacs-mua @@ -39,8 +39,10 @@ USE_EMACSCLIENT= AUTO_DAEMON= CREATE_FRAME= +escape -v pwd "$PWD" + # The crux of it all: construct an elisp progn and eval it. -ELISP="(prog1 'done (require 'notmuch) (notmuch-mua-new-mail)" +ELISP="(prog1 'done (require 'notmuch) (cd \"$pwd\") (notmuch-mua-new-mail)" # Short options compatible with mutt(1). while getopts :s:c:b:i:h opt; do @@ -95,7 +97,7 @@ while getopts :s:c:b:i:h opt; do ELISP="${ELISP} (message-goto-bcc) (insert \"${OPTARG}, \")" ;; --body|i) - ELISP="${ELISP} (message-goto-body) (cd \"${PWD}\") (insert-file \"${OPTARG}\")" + ELISP="${ELISP} (message-goto-body) (insert-file \"${OPTARG}\")" ;; --print) PRINT_ONLY=1