X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-emacs-mua;h=f9d83713b78958093e1fdd731596271ab3af3be4;hp=08be145b24a7f45ba7eecf76c76622c75f62f8f7;hb=ced03a11efecce893b3c795bff7512d4e2b7abc9;hpb=e401daecab43ff974474319d1f996c03a076d319 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