From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A DOS box starting Emacs (w32) Date: Wed, 12 Feb 2014 18:20:10 +0200 Message-ID: <83txc4s3ph.fsf@gnu.org> References: <52FAA9DA.3030302@alice.it> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392222029 28885 80.91.229.3 (12 Feb 2014 16:20:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Feb 2014 16:20:29 +0000 (UTC) Cc: lekktu@gmail.com, angelo.graziosi@alice.it, emacs-devel@gnu.org To: Dani Moncayo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 12 17:20:36 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WDcY8-0000N5-00 for ged-emacs-devel@m.gmane.org; Wed, 12 Feb 2014 17:20:36 +0100 Original-Received: from localhost ([::1]:39812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDcY7-0002xi-Hd for ged-emacs-devel@m.gmane.org; Wed, 12 Feb 2014 11:20:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDcXy-0002vs-Lp for emacs-devel@gnu.org; Wed, 12 Feb 2014 11:20:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDcXt-0008Om-Bi for emacs-devel@gnu.org; Wed, 12 Feb 2014 11:20:26 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:58598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDcXt-0008ON-3b for emacs-devel@gnu.org; Wed, 12 Feb 2014 11:20:21 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0N0W00E0059TAL00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Wed, 12 Feb 2014 18:20:19 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0W00EKD5DVA610@a-mtaout23.012.net.il>; Wed, 12 Feb 2014 18:20:19 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169560 Archived-At: > Date: Wed, 12 Feb 2014 08:37:15 +0100 > From: Dani Moncayo > Cc: Emacs developers , > Angelo Graziosi > > If it was possible, it'd be nice if we could get rid of > "runemacs.exe", and always use "emacs.exe" like on the rest of > platforms. If it's possible, yes. Patches are welcome. > AFAIK, what "runemacs.exe" does is to asynchronously invoke > "emacs.exe" and then close/kill the CMD window. No, that's not what runemacs does. It invokes emacs.exe while specifying that its console window be hidden in the first place, and never shown, neither on the desktop nor in the task bar. This prevents momentarily flashing the console window, as well as several other potential problems. As a side effect, it also emulates the Posix "&" shell operator, when runemacs is invoked from a shell prompt (although this is not the main reason for having runemacs, as there are other method of achieving the same). > Wouldn't it be possible to achieve the same behavior from > "emacs.exe"? Maybe it is possible, but certainly not trivial, AFAIK. Patches are welcome; the requirements for such a single emacs.exe executable are as follows: . It should be able to run it as a console application with output to the same console from which it was invoked, when given the -nw or the -batch/--script options. . When run without the above switches, it should behave as a GUI application, i.e. create a GUI frame, start the message pump, etc. . When invoked from a shell prompt, it should support redirection as in "emacs > foo" (including redirection of stderr with 2> and 2>&1), both in GUI and in -nw/batch modes. . When invoked from a shell prompt, it should not release the console (this is actually a subtle prerequisite of the previous requirement, but is mentioned here explicitly because it is not immediately self-evident). . When invoked in the GUI mode, it should not display a console window of any kind, shape, or form, including not in the task bar. . It should support invocation in GUI mode using any method Windows provides for activating applications, including from a desktop shortcut, from the Start menu, and from the icon pinned to the task bar. . When invoked in the console/batch mode, it should not display any additional windows, GUI or otherwise. . In batch mode, it should be able to read keyboard input typed into the console window from which it was invoked. . It should support invocation from a debugger, as in "gdb ./emacs.exe". . It should be possible to invoke Emacs "as Administrator".