diff options
| author | Jani Nikula <jani@nikula.org> | 2016-11-21 23:13:36 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-11-26 08:15:11 -0400 |
| commit | a5df39c276be5c6f8e67685ff5ef960d30e36e07 (patch) | |
| tree | dfe84f8e4f62e6ed031043b1cd4d93e42086e109 | |
| parent | 04174cdfadb88237242e0ed2728829c65dc440ec (diff) | |
notmuch-emacs-mua: add --hello parameter
If the --hello parameter is given, display the notmuch hello buffer
instead of the message composition buffer if no message composition
parameters are given.
Signed-off-by: Jani Nikula <jani@nikula.org>
| -rw-r--r-- | doc/man1/notmuch-emacs-mua.rst | 4 | ||||
| -rwxr-xr-x | emacs/notmuch-emacs-mua | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst index b80aa5f9..87787e20 100644 --- a/doc/man1/notmuch-emacs-mua.rst +++ b/doc/man1/notmuch-emacs-mua.rst @@ -33,6 +33,10 @@ Supported options for **emacs-mua** include ``-i, --body=``\ <file> Specify a file to include into the body of the message. + ``--hello`` + Go to the Notmuch hello screen instead of the message composition + window if no message composition parameters are given. + ``--no-window-system`` Even if a window system is available, use the current terminal. diff --git a/emacs/notmuch-emacs-mua b/emacs/notmuch-emacs-mua index 98103972..a5214977 100755 --- a/emacs/notmuch-emacs-mua +++ b/emacs/notmuch-emacs-mua @@ -40,6 +40,7 @@ AUTO_DAEMON= CREATE_FRAME= ELISP= MAILTO= +HELLO= # Short options compatible with mutt(1). while getopts :s:c:b:i:h opt; do @@ -63,7 +64,7 @@ while getopts :s:c:b:i:h opt; do opt=${opt%%=*} ;; # Long options without arguments. - --help|--print|--no-window-system|--client|--auto-daemon|--create-frame) + --help|--print|--no-window-system|--client|--auto-daemon|--create-frame|--hello) ;; *) echo "$0: unknown long option ${opt}, or argument mismatch." >&2 @@ -112,6 +113,9 @@ while getopts :s:c:b:i:h opt; do --create-frame) CREATE_FRAME="-c" ;; + --hello) + HELLO=1 + ;; *) # We should never end up here. echo "$0: internal error (option ${opt})." >&2 @@ -146,6 +150,8 @@ if [ -n "${MAILTO}" ]; then exit 1 fi ELISP="(browse-url-mail \"${MAILTO}\")" +elif [ -z "${ELISP}" -a -n "${HELLO}" ]; then + ELISP="(notmuch)" else ELISP="(notmuch-mua-new-mail) ${ELISP}" fi |
