[PATCH] notmuch-emacs-mua: do not start emacs daemon w/o --create-frame
authorTomi Ollila <tomi.ollila@iki.fi>
Mon, 11 May 2015 19:19:53 +0000 (22:19 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:54 +0000 (14:48 -0700)
50/d7a500de4263b77ebe0423fa90fad9bb40bb4d [new file with mode: 0644]

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