From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19688: [patch] add support for emacs daemon on Windows Date: Sat, 14 Feb 2015 18:53:31 +0200 Message-ID: <83iof4wi2c.fsf@gnu.org> References: <83h9ver459.fsf@gnu.org> <83d262qdx6.fsf@gnu.org> <54C62B6C.3050608@dancol.org> <834mr8n5or.fsf@gnu.org> <83pp9e42n8.fsf@gnu.org> <8361b4y9qj.fsf@gnu.org> <83wq3kwrjx.fsf@gnu.org> <83r3tswm6d.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423932865 26147 80.91.229.3 (14 Feb 2015 16:54:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2015 16:54:25 +0000 (UTC) Cc: 19688@debbugs.gnu.org To: Mark Laws Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 14 17:54:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMfyv-0005Jg-Vo for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 17:54:14 +0100 Original-Received: from localhost ([::1]:60374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMfyv-00040k-GB for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 11:54:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMfyr-00040H-26 for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 11:54:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMfyk-0002YP-LH for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 11:54:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMfyk-0002YL-IQ for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 11:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YMfyk-0003nQ-Cj for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 11:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Feb 2015 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19688 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19688-submit@debbugs.gnu.org id=B19688.142393282114567 (code B ref 19688); Sat, 14 Feb 2015 16:54:02 +0000 Original-Received: (at 19688) by debbugs.gnu.org; 14 Feb 2015 16:53:41 +0000 Original-Received: from localhost ([127.0.0.1]:44022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMfyP-0003mr-ER for submit@debbugs.gnu.org; Sat, 14 Feb 2015 11:53:41 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:39397) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMfyM-0003md-J5 for 19688@debbugs.gnu.org; Sat, 14 Feb 2015 11:53:39 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NJR00A00SUU3N00@a-mtaout21.012.net.il> for 19688@debbugs.gnu.org; Sat, 14 Feb 2015 18:53:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJR00AAKTL61U60@a-mtaout21.012.net.il>; Sat, 14 Feb 2015 18:53:30 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99395 Archived-At: > Date: Sun, 15 Feb 2015 01:34:48 +0900 > From: Mark Laws > Cc: 19688@debbugs.gnu.org > > I gave it a try, but it doesn't work--most likely because, as you > said, Emacs is built as a console application, so WaitForInputIdle > simply returns immediately because of the race between emacsclient > attempting to wait on Emacs and Emacs establishing a Windows message > queue. No, I think it returns immediately, period. As I wrote, when Emacs establishes the input queue, it's already way past the daemon initialization. > So, the options are either using an event or modifying Emacs to > run under the Windows subsystem--I don't think I need to tell you > which one is the less invasive change. :) The latter is not invasive, it simply cannot be done without losing some very valuable features. So it's out of the question. Back to the event-based method: is using a named event with a fixed name workable? That is, is a situation imaginable where we would need more than one event at the same time on the same system? If a single event is enough, I think a named event with a name specific to Emacs (but not a GUID) is a better alternative. Otherwise, we will have to pass the handle via the command line; using the environment is not an idea I like, because it means complications: possible conflict with other variables, possible overflow of the 32K limit on environment variables, possible conflicts in nested invocations, etc.