--- /dev/null
+Return-Path: <tomi.ollila@iki.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 02FCA6DE17FE\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Sep 2015 23:13:32 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.15\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.15 tagged_above=-999 required=5 tests=[AWL=-0.246, \r
+ SPF_NEUTRAL=0.652, URIBL_SBL=0.644, URIBL_SBL_A=0.1]\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 KwITHwJnlZRf for <notmuch@notmuchmail.org>;\r
+ Tue, 29 Sep 2015 23:13:29 -0700 (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 5764A6DE17FD\r
+ for <notmuch@notmuchmail.org>; Tue, 29 Sep 2015 23:13:28 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 56AAE100080;\r
+ Wed, 30 Sep 2015 09:13:30 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, Jani Nikula <jani@nikula.org>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v4 5/5] notmuch-emacs-mua: do not create a frame by\r
+ default with --client\r
+In-Reply-To: <m2si5xm3tr.fsf@guru.guru-group.fi>\r
+References: <cover.1439629384.git.jani@nikula.org>\r
+ <455026447d3f75b1038ac11cebe734431604be9d.1439629384.git.jani@nikula.org>\r
+ <m21tepvpm5.fsf@guru.guru-group.fi> <87wpva3j37.fsf@zancas.localnet>\r
+ <m2si5xm3tr.fsf@guru.guru-group.fi>\r
+User-Agent: Notmuch/0.20.2+68~g0c35549 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 30 Sep 2015 09:13:30 +0300\r
+Message-ID: <m2pp10wi2d.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Wed, 30 Sep 2015 06:13:32 -0000\r
+\r
+On Tue, Sep 29 2015, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+\r
+> On Mon, Sep 28 2015, David Bremner <david@tethera.net> wrote:\r
+>\r
+>> Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+>>\r
+>>\r
+>>> if [ -n "$AUTO_DAEMON" -a -z "$CREATE_FRAME" ]; then\r
+>>> echo "$0: --auto-daemon is only applicable with --create-frame." >&2\r
+>>> exit 1 \r
+>>> fi\r
+>>>\r
+>>> without this one may execute ./notmuch-emacs-mua --client --auto-daemon\r
+>>> which yields starting emacs in daemon mode (in this example it is expected\r
+>>> emacs is not running; otherwise --auto-daemon has no use in this example)\r
+>>> -- but no ui to that newly-running emacs is provided. Similar behaviour\r
+>>> can be observed by the following\r
+>>>\r
+>>\r
+>> I think what you propose is fine for a followup patch; note that the\r
+>> scenario you worry about also needs --client to be a problem. Apparently\r
+>> nothing is uncontroversial here, but if auto-daemon only works with\r
+>> create frame, then perhaps the followup would be to have auto-daemon\r
+>> imply create-frame\r
+>\r
+> Without --client --auto-daemon is no-op (as it is no-op in case emacs\r
+> server is already running). I am (only) concerned about user experience\r
+> when one runs --client --auto-daemon and user gets nothing (i.e. emacs\r
+> server is running in the background w/o any clients connected to it.\r
+>\r
+> We could make --auto-daemon imply --create-frame, but then \r
+>\r
+> ./notmuch-emacs-mua --auto-daemon (i.e. w/o --client) starts new mail\r
+> compose window to separate frame (even though user did not request\r
+> it w/ --create-frame)\r
+\r
+Hmm, a few more tests. it now looks like in case the command line is\r
+\r
+./notmuch-emacs-mua --client --auto-daemon\r
+\r
+Then the --create-frame should be implied. w/o --client --create-frame\r
+would ... well, create that (only) emacs frame anyways... oh, the\r
+combinations; for reference I just paste from my history...\r
+\r
+\r
+ 1 07:57 0:01 ccd notmuch\r
+ 2 07:57 0:06 git pull --rebase\r
+ 3 07:57 0:01 git log\r
+ 4 07:57 0:04 tig\r
+ 5 07:58 0:10 ./notmuch-emacs-mua --auto-daemon\r
+ 6 07:58 0:00 ps ax\r
+ 8 07:58 0:00 emacs &\r
+ 9 07:58 0:07 ./notmuch-emacs-mua --auto-daemon\r
+ 10 07:59 0:01 ./notmuch-emacs-mua --client --auto-daemon\r
+ 12 08:01 0:03 ./notmuch-emacs-mua --auto-daemon\r
+ 13 08:02 0:00 ps ax\r
+ 14 08:02 0:00 ls /tmp/emacs1001\r
+ 15 08:02 0:00 ./notmuch-emacs-mua -nw --auto-daemon\r
+ 16 08:02 0:04 DISPLAY= ./notmuch-emacs-mua --auto-daemon\r
+ 17 08:02 0:05 tig\r
+ 18 08:03 0:02 DISPLAY= ./notmuch-emacs-mua --auto-daemon\r
+ 19 08:04 0:01 DISPLAY= ./notmuch-emacs-mua --client --auto-daemon\r
+ 20 08:04 0:00 ps ax\r
+ 21 08:04 0:00 kill 1860\r
+ 22 08:04 0:00 ps ax\r
+ 23 08:06 0:00 ./notmuch-emacs-mua --client --auto-daemon\r
+ 24 08:06 0:00 ps ax\r
+ 25 08:06 0:00 kill 1875\r
+ 26 08:06 0:00 ./notmuch-emacs-mua --client --auto-daemon\r
+ 27 08:06 0:00 ps ax\r
+ 28 08:06 0:00 kill 1926\r
+ 29 08:06 0:06 ./notmuch-emacs-mua --client --auto-daemon --create-frame\r
+ 30 08:07 0:28 ./notmuch-emacs-mua --auto-daemon --create-frame\r
+ 31 08:08 0:00 ps x\r
+ 32 08:08 0:00 h\r
+\r
+So. I'm going w/ the suggestion making --auto-daemon imply --create-frame\r
+\r
+\r
+>\r
+> (actually I already did the 'imply' option (easy, one line in script,\r
+> another in namual), just that testing it gave this thought...\r
+>\r
+> ... therefore I'd rather make ./notmuch-emacs-mua --auto-daemon\r
+> spit an error and exit -- but I can be convinced otherwise :)\r
+>\r
+> Tomi\r