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 C01E06DE1A3A
\r
6 for <notmuch@notmuchmail.org>; Sat, 15 Aug 2015 02:05:36 -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.126
\r
12 X-Spam-Status: No, score=-0.126 tagged_above=-999 required=5 tests=[AWL=0.594,
\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 sJ5hIBbdlHLx for <notmuch@notmuchmail.org>;
\r
18 Sat, 15 Aug 2015 02:05:35 -0700 (PDT)
\r
19 Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com
\r
21 by arlo.cworth.org (Postfix) with ESMTPS id 29A506DE1A1C
\r
22 for <notmuch@notmuchmail.org>; Sat, 15 Aug 2015 02:05:21 -0700 (PDT)
\r
23 Received: by wicne3 with SMTP id ne3so35939740wic.0
\r
24 for <notmuch@notmuchmail.org>; Sat, 15 Aug 2015 02:05:19 -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=xzaayMHM26NsqHwVFkIeSFyM+hUzgiHOcOBsNHoClw0=;
\r
30 b=Dsr3h9yZ4sTYJ6KFqUQgtA67pOqpyO1mcRqMaryDqxBRT8SVWtIuRQPR0FENgCwOCu
\r
31 AT9JdsmjobaGifaocgM2DTPjFqynBZwyuvKl3zwa21CqUCLHOFX+aFUTxe2d+15/RxVx
\r
32 JbJgydJLNZ2y5Cd0FiyjfZ6VAhxNIw7FcQk52RbTOjmjs1pK+cDc1ASWyvXMKe2LlbuN
\r
33 AtMyanXWGTkjne3PLlUI+ktVelH2RbBo11cU08Awp0k1NfNJx4YFnsEOlR33jsePvr+X
\r
34 MAbG5Ifxp22mv3tVNQ33utvDJSBFHbBAgkXj/xhhdGLBrDvum6aXZ4pAUzMhxoLO/qn4
\r
37 ALoCoQkFhTlZ3WX/uUufUdPpmaSUm1f4y+JCmKsS9E4rh+Xw8tje0sKivI0ECwh6EKzhSNs5K/5V
\r
38 X-Received: by 10.194.122.200 with SMTP id lu8mr8124032wjb.83.1439629519716;
\r
39 Sat, 15 Aug 2015 02:05:19 -0700 (PDT)
\r
40 Received: from localhost (mobile-access-bcee4f-131.dhcp.inet.fi.
\r
42 by smtp.gmail.com with ESMTPSA id kb1sm12021350wjc.24.2015.08.15.02.05.18
\r
43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
44 Sat, 15 Aug 2015 02:05:19 -0700 (PDT)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: notmuch@notmuchmail.org
\r
47 Subject: [PATCH v4 5/5] notmuch-emacs-mua: do not create a frame by default
\r
49 Date: Sat, 15 Aug 2015 12:05:15 +0300
\r
51 <455026447d3f75b1038ac11cebe734431604be9d.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:36 -0000
\r
72 Make the default behaviour for --client the same as emacsclient
\r
73 default: do not create a new frame. Add a new option --create-frame,
\r
74 passing the same option to emacsclient to create a frame.
\r
78 v2: fix killing frame with --create-frame
\r
80 v3: fix --create-frame w/o --client parameter check
\r
82 v4: fix kill terminal logic, document behaviour with daemon mode
\r
84 doc/man1/notmuch-emacs-mua.rst | 6 ++++++
\r
85 notmuch-emacs-mua | 14 ++++++++++----
\r
86 2 files changed, 16 insertions(+), 4 deletions(-)
\r
88 diff --git a/doc/man1/notmuch-emacs-mua.rst b/doc/man1/notmuch-emacs-mua.rst
\r
89 index 89a2fead17b1..c3689eb82c8a 100644
\r
90 --- a/doc/man1/notmuch-emacs-mua.rst
\r
91 +++ b/doc/man1/notmuch-emacs-mua.rst
\r
92 @@ -45,6 +45,12 @@ Supported options for **notmuch-emacs-mua** include
\r
93 Automatically start Emacs in daemon mode, if the Emacs server
\r
94 is not running. Applicable with ``--client``.
\r
96 + ``--create-frame``
\r
97 + Create a new frame instead of trying to use the current Emacs
\r
98 + frame. Applicable with ``--client``. This will be required
\r
99 + when Emacs is running (or automatically started with
\r
100 + ``--auto-daemon``) in daemon mode.
\r
103 Output the resulting elisp to stdout instead of evaluating it.
\r
105 diff --git a/notmuch-emacs-mua b/notmuch-emacs-mua
\r
106 index ac03a4a60d56..b51d8d0e2c5b 100755
\r
107 --- a/notmuch-emacs-mua
\r
108 +++ b/notmuch-emacs-mua
\r
109 @@ -37,11 +37,10 @@ PRINT_ONLY=
\r
116 # The crux of it all: construct an elisp progn and eval it.
\r
117 ELISP="(prog1 'done (require 'notmuch) (notmuch-mua-new-mail)"
\r
118 -ELISP="${ELISP} (setq message-exit-actions (list #'save-buffers-kill-terminal))"
\r
120 # Short options compatible with mutt(1).
\r
121 while getopts :s:c:b:i:h opt; do
\r
122 @@ -65,7 +64,7 @@ while getopts :s:c:b:i:h opt; do
\r
125 # Long options without arguments.
\r
126 - --help|--print|--no-window-system|--client|--auto-daemon)
\r
127 + --help|--print|--no-window-system|--client|--auto-daemon|--create-frame)
\r
130 echo "$0: unknown long option ${opt}, or argument mismatch." >&2
\r
131 @@ -103,7 +102,6 @@ while getopts :s:c:b:i:h opt; do
\r
133 --no-window-system)
\r
138 USE_EMACSCLIENT="yes"
\r
139 @@ -111,6 +109,9 @@ while getopts :s:c:b:i:h opt; do
\r
141 AUTO_DAEMON="--alternate-editor="
\r
144 + CREATE_FRAME="-c"
\r
147 # We should never end up here.
\r
148 echo "$0: internal error (option ${opt})." >&2
\r
149 @@ -128,6 +129,11 @@ for arg; do
\r
150 ELISP="${ELISP} (message-goto-to) (insert \"${arg}, \")"
\r
153 +# Kill the terminal/frame if we're creating one.
\r
154 +if [ -z "$USE_EMACSCLIENT" -o -n "$CREATE_FRAME" -o -n "$NO_WINDOW" ]; then
\r
155 + ELISP="${ELISP} (setq message-exit-actions (list #'save-buffers-kill-terminal))"
\r