From: Tomi Ollila Date: Mon, 6 Apr 2015 13:04:13 +0000 (+0300) Subject: Re: [PATCH v2] notmuch-emacs-mua: do not create a frame by default with --client X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d1fadb56a6b35d6e68e8e1d3d8ff4080409d7749;p=notmuch-archives.git Re: [PATCH v2] notmuch-emacs-mua: do not create a frame by default with --client --- diff --git a/b5/d9e5a88d577ae2e33172011be8db19777295cd b/b5/d9e5a88d577ae2e33172011be8db19777295cd new file mode 100644 index 000000000..344deb0d4 --- /dev/null +++ b/b5/d9e5a88d577ae2e33172011be8db19777295cd @@ -0,0 +1,95 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id D8A806DE1919 + for ; Mon, 6 Apr 2015 06:04:39 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 1.214 +X-Spam-Level: * +X-Spam-Status: No, score=1.214 tagged_above=-999 required=5 tests=[AWL=0.562, + SPF_NEUTRAL=0.652] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id EqHDSzkpeMUe for ; + Mon, 6 Apr 2015 06:04:36 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id C0CCD6DE17BF + for ; Mon, 6 Apr 2015 06:04:35 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 3D91210019F; + Mon, 6 Apr 2015 16:04:13 +0300 (EEST) +From: Tomi Ollila +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH v2] notmuch-emacs-mua: do not create a frame by default + with --client +In-Reply-To: <1428132606-8624-1-git-send-email-jani@nikula.org> +References: <87d23o4gzd.fsf@maritornes.cs.unb.ca> + <1428132606-8624-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.19+107~gab55bdb (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 06 Apr 2015 13:04:40 -0000 + +On Sat, Apr 04 2015, Jani Nikula 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