From 2615bb81ae8281a65e0b0111d721142692effd47 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Mon, 11 May 2015 22:19:53 +0300 Subject: [PATCH] [PATCH] notmuch-emacs-mua: do not start emacs daemon w/o --create-frame --- 50/d7a500de4263b77ebe0423fa90fad9bb40bb4d | 109 ++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 50/d7a500de4263b77ebe0423fa90fad9bb40bb4d diff --git a/50/d7a500de4263b77ebe0423fa90fad9bb40bb4d b/50/d7a500de4263b77ebe0423fa90fad9bb40bb4d new file mode 100644 index 000000000..e9eb79914 --- /dev/null +++ b/50/d7a500de4263b77ebe0423fa90fad9bb40bb4d @@ -0,0 +1,109 @@ +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 5805B6DE00DF + for ; Mon, 11 May 2015 12:28:55 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.475 +X-Spam-Level: +X-Spam-Status: No, score=0.475 tagged_above=-999 required=5 tests=[AWL=1.015, + RP_MATCHES_RCVD=-0.55, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] + 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 ksILafX9rLle for ; + Mon, 11 May 2015 12:28:52 -0700 (PDT) +X-Greylist: delayed 481 seconds by postgrey-1.35 at arlo; + Mon, 11 May 2015 12:28:52 PDT +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id 52EAA6DE00DD + for ; Mon, 11 May 2015 12:28:52 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 3F18E10009D; Mon, 11 May 2015 22:20:26 +0300 (EEST) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Subject: [PATCH] notmuch-emacs-mua: do not start emacs daemon w/o + --create-frame +Date: Mon, 11 May 2015 22:19:53 +0300 +Message-Id: <1431371993-24292-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 2.0.0 +In-Reply-To: <1431194464-2595-1-git-send-email-jani@nikula.org> +References: <1431194464-2595-1-git-send-email-jani@nikula.org> +Cc: tomi.ollila@iki.fi +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, 11 May 2015 19:28:55 -0000 + +notmuch-emacs-mua --client used to start daemon process if it was +not running -- just that no emacs mail window of any kind from +that is visible to the user. + +When not starting emacs server in this case notmuch-emacs-mua +user will get the same message as would emacsclient user +have, which should be enough for such user to understand how +to proceed starting emacs server in a way that it is useable +for this purpose. +--- + +After trying quite a few alternatives, perhaps this is +the way to close this case... + + doc/man1/notmuch-emacs-mua.rst | 6 +++--- + notmuch-emacs-mua | 8 ++++++-- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst +index e39d9e5fba1f..edaecc272e0f 100644 +--- a/doc/man1/notmuch-emacs-mua.rst ++++ b/doc/man1/notmuch-emacs-mua.rst +@@ -37,12 +37,12 @@ Supported options for **notmuch-emacs-mua** include + Even if a window system is available, use the current terminal. + + ``--client`` +- Use **emacsclient**, rather than **emacs**. This will start +- an emacs daemon process if necessary. ++ Use **emacsclient**, rather than **emacs**. + + ``--create-frame`` + When --client is specified, create a new frame instead of trying +- to use the current Emacs frame. ++ to use the current Emacs frame. This will also start an emacs ++ daemon process if necessary. + + ``--print`` + Output the resulting elisp to stdout instead of evaluating it. +diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua +index 102410a23f3e..34ff4db3469b 100755 +--- a/notmuch-emacs-mua ++++ b/notmuch-emacs-mua +@@ -142,9 +142,13 @@ if [ -n "$PRINT_ONLY" ]; then + exit 0 + fi + ++# Evaluate the progn. + if [ -n "$USE_EMACSCLIENT" ]; then +- # Evaluate the progn. +- exec ${EMACSCLIENT} ${CREATE_FRAME} ${NO_WINDOW} -a '' --eval "${ELISP}" ++ if [ -n "$CREATE_FRAME" ]; then ++ exec ${EMACSCLIENT} ${CREATE_FRAME} ${NO_WINDOW} -a '' --eval "${ELISP}" ++ else ++ exec ${EMACSCLIENT} ${CREATE_FRAME} ${NO_WINDOW} --eval "${ELISP}" ++ fi + else + exec ${EMACS} ${NO_WINDOW} --eval "${ELISP}" + fi +-- +2.0.0 + -- 2.26.2