From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Nicholas \"Indy\" Ray" Newsgroups: gmane.emacs.bugs Subject: bug#8268: Windows Emacs Console persists while running running emacs.exe. Date: Wed, 16 Mar 2011 20:42:56 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016364d256d05c00d049ea575bd X-Trace: dough.gmane.org 1300336835 4393 80.91.229.12 (17 Mar 2011 04:40:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2011 04:40:35 +0000 (UTC) To: 8268@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 17 05:40:27 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q050d-0006To-DB for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Mar 2011 05:40:27 +0100 Original-Received: from localhost ([127.0.0.1]:57002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q050c-0003QX-6g for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Mar 2011 00:40:26 -0400 Original-Received: from [140.186.70.92] (port=58085 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q04UI-0005XH-2n for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2011 00:07:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q04UG-00051s-Ar for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2011 00:07:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q04UG-00051i-7S for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2011 00:07:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q04TK-0004Eg-L6; Thu, 17 Mar 2011 00:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Nicholas \"Indy\" Ray" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Mar 2011 04:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: emacs-pretest-bug@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130033472316232 (code B ref -1); Thu, 17 Mar 2011 04:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Mar 2011 04:05:23 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q04Sg-0004Di-7t for submit@debbugs.gnu.org; Thu, 17 Mar 2011 00:05:22 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0477-0003jk-02 for submit@debbugs.gnu.org; Wed, 16 Mar 2011 23:43:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37635) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Q0471-00020A-Vt for emacs-pretest-bug@gnu.org; Wed, 16 Mar 2011 23:42:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0470-0000vW-Lb for emacs-pretest-bug@gnu.org; Wed, 16 Mar 2011 23:42:59 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:51628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0470-0000vB-C6 for emacs-pretest-bug@gnu.org; Wed, 16 Mar 2011 23:42:58 -0400 Original-Received: by wyf19 with SMTP id 19so2607359wyf.0 for ; Wed, 16 Mar 2011 20:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=FQ3BHDhFRC/T2PqUmT6+FaJmHKqwLMunP2dhCs7GkCc=; b=Hnxnfgbh3XYV51ukfZ0JDXYoNnIBSS4NcAN8Sa4cOMpnv0cI6+bhj3Pfvf+FNRsXMa o4wmYWWMKacknxaPGvD6htHp3Y7eaucnjgClViK5xdnwzInt7TW77sY2U4IZhQimBn4D SywkJTlQ0R8r6SXopNDmEneE6l3VrKg8pSeHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=MNPoNAKdcR0vw+izRx68uyInPWbLymaUp7j4uVrW8CbR4ISMqWYp+tRkvTiAbnz+7a FyF0tSPPII+jSrAk0ZWabLuQu5qBbT8E84Qya7ycrzcbWf/ZsTveNn7faO2jk7DCOgjS TB80tsW9UJ04HmUNzqcdjjC7M7gRYV4cCaK4k= Original-Received: by 10.216.9.200 with SMTP id 50mr268893wet.83.1300333376945; Wed, 16 Mar 2011 20:42:56 -0700 (PDT) Original-Received: by 10.216.0.140 with HTTP; Wed, 16 Mar 2011 20:42:56 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Thu, 17 Mar 2011 00:05:21 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 17 Mar 2011 00:06:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Thu, 17 Mar 2011 00:40:15 -0400 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45085 Archived-At: --0016364d256d05c00d049ea575bd Content-Type: text/plain; charset=ISO-8859-1 This seems to be related to bug #1849, but perhaps never properly fixed. Anyways, when opening emacs from Emacs.exe, which is difficult to not do in Windows 7 with pinning to the task bar, Emacs will open with an unneeded console window that cannot be destroyed. This seems likely due to the fact that Emacs is spawned as a console application when run in this manner. However, I think there is a simple fix that doesn't cause problems when the program is run as a console app. By calling the FreeConsole win32 function when Emacs initializes it's GUI this should kill any os spawned console windows, had they not been opened separately. See: http://msdn.microsoft.com/en-us/library/ms683150%28v=vs.85%29.aspx I've used this function to great effect in other applications, and am confident it'd work. I'd have fixed it and created a patch myself, but I've spent the last few hours trying to get Emacs to build on this weird setup I have here. Indy --0016364d256d05c00d049ea575bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This seems to be related to bug #1849, but perhaps never=A0properly=A0fixed= .

Anyways, when opening emacs from Emacs.exe, which is d= ifficult to not do in Windows 7 with pinning to the task bar, Emacs will op= en with an unneeded console window that cannot be destroyed.

This seems likely due to the fact that Emacs is spawned= as a console application when run in this manner. =A0However, I think ther= e is a simple fix that doesn't cause problems when the program is run a= s a console app.

By calling the FreeConsole win32 function when Emacs in= itializes it's GUI this should kill any os spawned console windows, had= they not been opened separately.

See:


Indy
--0016364d256d05c00d049ea575bd--