mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
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>
This commit is contained in:
parent
04174cdfad
commit
a5df39c276
2 changed files with 11 additions and 1 deletions
|
@ -33,6 +33,10 @@ Supported options for **emacs-mua** include
|
||||||
``-i, --body=``\ <file>
|
``-i, --body=``\ <file>
|
||||||
Specify a file to include into the body of the message.
|
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``
|
``--no-window-system``
|
||||||
Even if a window system is available, use the current terminal.
|
Even if a window system is available, use the current terminal.
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ AUTO_DAEMON=
|
||||||
CREATE_FRAME=
|
CREATE_FRAME=
|
||||||
ELISP=
|
ELISP=
|
||||||
MAILTO=
|
MAILTO=
|
||||||
|
HELLO=
|
||||||
|
|
||||||
# Short options compatible with mutt(1).
|
# Short options compatible with mutt(1).
|
||||||
while getopts :s:c:b:i:h opt; do
|
while getopts :s:c:b:i:h opt; do
|
||||||
|
@ -63,7 +64,7 @@ while getopts :s:c:b:i:h opt; do
|
||||||
opt=${opt%%=*}
|
opt=${opt%%=*}
|
||||||
;;
|
;;
|
||||||
# Long options without arguments.
|
# 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
|
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)
|
||||||
CREATE_FRAME="-c"
|
CREATE_FRAME="-c"
|
||||||
;;
|
;;
|
||||||
|
--hello)
|
||||||
|
HELLO=1
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# We should never end up here.
|
# We should never end up here.
|
||||||
echo "$0: internal error (option ${opt})." >&2
|
echo "$0: internal error (option ${opt})." >&2
|
||||||
|
@ -146,6 +150,8 @@ if [ -n "${MAILTO}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ELISP="(browse-url-mail \"${MAILTO}\")"
|
ELISP="(browse-url-mail \"${MAILTO}\")"
|
||||||
|
elif [ -z "${ELISP}" -a -n "${HELLO}" ]; then
|
||||||
|
ELISP="(notmuch)"
|
||||||
else
|
else
|
||||||
ELISP="(notmuch-mua-new-mail) ${ELISP}"
|
ELISP="(notmuch-mua-new-mail) ${ELISP}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue