1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by arlo.cworth.org (Postfix) with ESMTP id 65FC46DE1A2F
\r
6 for <notmuch@notmuchmail.org>; Sat, 15 Aug 2015 02:05:35 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
10 X-Spam-Score: -0.121
\r
12 X-Spam-Status: No, score=-0.121 tagged_above=-999 required=5 tests=[AWL=0.599,
\r
13 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01]
\r
15 Received: from arlo.cworth.org ([127.0.0.1])
\r
16 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id LT2DbgYHoBRN for <notmuch@notmuchmail.org>;
\r
18 Sat, 15 Aug 2015 02:05:33 -0700 (PDT)
\r
19 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com
\r
21 by arlo.cworth.org (Postfix) with ESMTPS id 54F936DE1A3A
\r
22 for <notmuch@notmuchmail.org>; Sat, 15 Aug 2015 02:05:19 -0700 (PDT)
\r
23 Received: by wicja10 with SMTP id ja10so40755502wic.1
\r
24 for <notmuch@notmuchmail.org>; Sat, 15 Aug 2015 02:05:17 -0700 (PDT)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=YPz7r5fuWFOOc5iIi8DHQoZHFeUlgGrPligRyITtfAc=;
\r
30 b=cK3korgwOgwJOy2YE++uS6qsB7iQKNSkMk8q4STrv1a4DbzreyLQJ/zezjBBsIhHd8
\r
31 z6cEmTuXxF2l1oCok13XFJVv/2WWGQIDcYi5u8OBoE4RFXnKBr49vMDJmRt+lswkZsh/
\r
32 3GcG+rryeBEyW/dJ45arahUhkOKpqVjxTCwaP6hi/HU7OUAztBhEWt2gmKSIeNvOI8MI
\r
33 khj1xXRjp0cwU2Tf/Pnn5L2kdYuOwgQMWMHe1dU5vFrEkL9bQpCZIBRMIBH+5F7F5Yci
\r
34 T3IcCkO8+4ytdoijJ9FmCTChj83Bklkyq4q1jlfIHjAb9YWAIwyBVOp3zBKRfy1C/YUv
\r
37 ALoCoQk7EVT2QXNBZ4GQkWTx240Ev7UpghOyKBoVELwXZL9ZXw+f9hcdBAc8ZM2TY0bb00xilz2J
\r
38 X-Received: by 10.180.12.148 with SMTP id y20mr14249367wib.80.1439629517897;
\r
39 Sat, 15 Aug 2015 02:05:17 -0700 (PDT)
\r
40 Received: from localhost (mobile-access-bcee4f-131.dhcp.inet.fi.
\r
42 by smtp.gmail.com with ESMTPSA id cd16sm6880084wib.19.2015.08.15.02.05.17
\r
43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
44 Sat, 15 Aug 2015 02:05:17 -0700 (PDT)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: notmuch@notmuchmail.org
\r
47 Subject: [PATCH v4 4/5] notmuch-emacs-mua: add --auto-daemon option to start
\r
48 Emacs daemon as needed
\r
49 Date: Sat, 15 Aug 2015 12:05:14 +0300
\r
51 <ed5cc25f2dfb978192f69c7f458771115381c359.1439629384.git.jani@nikula.org>
\r
52 X-Mailer: git-send-email 2.1.4
\r
53 In-Reply-To: <cover.1439629384.git.jani@nikula.org>
\r
54 References: <cover.1439629384.git.jani@nikula.org>
\r
55 In-Reply-To: <cover.1439629384.git.jani@nikula.org>
\r
56 References: <cover.1439629384.git.jani@nikula.org>
\r
57 Cc: Tomi Ollila <tomi.ollila@iki.fi>
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.18
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Sat, 15 Aug 2015 09:05:35 -0000
\r
72 Automatically starting Emacs in daemon mode if the Emacs server is not
\r
73 running is a matter of preference better not hard coded in
\r
74 notmuch-emacs-mua. Add an option to control the behaviour.
\r
76 doc/man1/notmuch-emacs-mua.rst | 9 +++++++--
\r
77 notmuch-emacs-mua | 8 ++++++--
\r
78 2 files changed, 13 insertions(+), 4 deletions(-)
\r
80 diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst
\r
81 index 7c2f5c24f1c0..89a2fead17b1 100644
\r
82 --- a/doc/man1/notmuch-emacs-mua.rst
\r
83 +++ b/doc/man1/notmuch-emacs-mua.rst
\r
84 @@ -37,8 +37,13 @@ Supported options for **notmuch-emacs-mua** include
\r
85 Even if a window system is available, use the current terminal.
\r
88 - Use **emacsclient**, rather than **emacs**. This will start
\r
89 - an Emacs daemon process if necessary.
\r
90 + Use **emacsclient**, rather than **emacs**. For
\r
91 + **emacsclient** to work, you need an already running Emacs
\r
92 + with a server, or use ``--auto-daemon``.
\r
95 + Automatically start Emacs in daemon mode, if the Emacs server
\r
96 + is not running. Applicable with ``--client``.
\r
99 Output the resulting elisp to stdout instead of evaluating it.
\r
100 diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua
\r
101 index 1f088c42feb9..ac03a4a60d56 100755
\r
102 --- a/notmuch-emacs-mua
\r
103 +++ b/notmuch-emacs-mua
\r
104 @@ -36,6 +36,7 @@ EMACSCLIENT=${EMACSCLIENT-emacsclient}
\r
111 # The crux of it all: construct an elisp progn and eval it.
\r
112 @@ -64,7 +65,7 @@ while getopts :s:c:b:i:h opt; do
\r
115 # Long options without arguments.
\r
116 - --help|--print|--no-window-system|--client)
\r
117 + --help|--print|--no-window-system|--client|--auto-daemon)
\r
120 echo "$0: unknown long option ${opt}, or argument mismatch." >&2
\r
121 @@ -107,6 +108,9 @@ while getopts :s:c:b:i:h opt; do
\r
123 USE_EMACSCLIENT="yes"
\r
126 + AUTO_DAEMON="--alternate-editor="
\r
129 # We should never end up here.
\r
130 echo "$0: internal error (option ${opt})." >&2
\r
131 @@ -134,7 +138,7 @@ fi
\r
133 if [ -n "$USE_EMACSCLIENT" ]; then
\r
134 # Evaluate the progn.
\r
135 - exec ${EMACSCLIENT} ${NO_WINDOW} ${CREATE_FRAME} -a '' --eval "${ELISP}"
\r
136 + exec ${EMACSCLIENT} ${NO_WINDOW} ${CREATE_FRAME} ${AUTO_DAEMON} --eval "${ELISP}"
\r
138 exec ${EMACS} ${NO_WINDOW} --eval "${ELISP}"
\r