[PATCH v2] notmuch-emacs-mua: do not create a frame by default with --client

Tomi Ollila tomi.ollila at iki.fi
Mon Apr 6 06:04:13 PDT 2015


On Sat, Apr 04 2015, Jani Nikula <jani at nikula.org> wrote:

> Make the default behaviour for --client the same as emacsclient
> default: do not create a new frame. Add a new option --create-frame,
> passing the same option to emacsclient to create a frame.
>
> ---
>
> v2: fix killing frame with --create-frame
> ---
>  doc/man1/notmuch-emacs-mua.rst | 14 +++++++++-----
>  notmuch-emacs-mua              | 29 ++++++++++++++++++++---------
>  2 files changed, 29 insertions(+), 14 deletions(-)
>
> diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst
> index 36b51cdc3b18..e39d9e5fba1f 100644
> --- a/doc/man1/notmuch-emacs-mua.rst
> +++ b/doc/man1/notmuch-emacs-mua.rst
> @@ -122,6 +125,14 @@ for arg; do
>      ELISP="${ELISP} (message-goto-to) (insert \"${arg}, \")"
>  done
>  
> +# If reusing a frame in emacsclient, don't kill the buffer.
> +if [ -n "$CREATE_FRAME" ]; then
> +    ELISP="${ELISP} (setq message-exit-actions (list #'save-buffers-kill-terminal))"
> +elif [ -z "$USE_EMACSCLIENT" ]; then
> +    echo "$0: --create-frame is only applicable with --client." >&2
> +    exit 1
> +fi
> +

# If reusing a frame in emacsclient, don't kill the buffer.
if [ -n "$CREATE_FRAME" ]; then
    if [ -z "$USE_EMACSCLIENT" ]; then
        echo "$0: --create-frame is only applicable with --client." >&2
        exit 1
    fi
    ELISP="${ELISP} (setq message-exit-actions (list #'save-buffers-kill-terminal))"
fi

should work better...

Tomi


More information about the notmuch mailing list