ArchiveOrangemail archive

Bug reports for GNU Emacs, the Swiss army knife of text editors


bug-gnu-emacs.gnu.org
(List home) (Recent threads) (394 other GNU lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • High traffic list: 30+ messages per day
  • This list contains about 56,451 messages, beginning Mar 2010
  • 46 messages added yesterday
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

bug#8268: Windows Emacs Console persists while running running emacs.exe.

Ad
Nicholas \Indy\ Ray 1300336835Thu, 17 Mar 2011 04:40:35 +0000 (UTC)
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/ms683...

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
Juanma Barranquero 1300340377Thu, 17 Mar 2011 05:39:37 +0000 (UTC)
> Anyways, when opening emacs from Emacs.exe

Why do you run emacs.exe, and not runemacs.exe?> which is difficult to not do in
> Windows 7 with pinning to the task barWhat do you mean? Do you have any trouble pinning runemacs.exe to the
Start menu or taskbar?

    Juanma
Nicholas \Indy\ Ray 1300340394Thu, 17 Mar 2011 05:39:54 +0000 (UTC)
> Why do you run emacs.exe, and not runemacs.exe?

> What do you mean? Do you have any trouble pinning runemacs.exe to the
> Start menu or taskbar?When I pin runemacs.exe to the taskbar and run it, it loads emacs
which creates another icon on my taskbar, It seems impossible to
currently have the same pin'd icon load up and run emacs under the
same icon without creating the console window.

Ideally, I should be able to have one pinned icon on the taskbar, and
when clicking it it should load emacs without the console window. This
seems impossible.

Indy
Jason Rumney 1300343837Thu, 17 Mar 2011 06:37:17 +0000 (UTC)
On 17/03/2011 13:19, Nicholas "Indy" Ray wrote:

> When I pin runemacs.exe to the taskbar and run it, it loads emacs
> which creates another icon on my taskbar, It seems impossible to
> currently have the same pin'd icon load up and run emacs under the
> same icon without creating the console window.
>
> Ideally, I should be able to have one pinned icon on the taskbar, and
> when clicking it it should load emacs without the console window. This
> seems impossible.
>What version of Emacs are you using?  runemacs, emacs and emacsclient 
should all be treated as the same program by Windows 7 taskbar since 
23.2 if the MSDN documentation is correct.  Perhaps you can help us to 
debug this if you are already using a more recent version.
Jan D. 1300347464Thu, 17 Mar 2011 07:37:44 +0000 (UTC)
Jason Rumney skrev 2011-03-17 07:31:
> On 17/03/2011 13:19, Nicholas "Indy" Ray wrote:
>
>> When I pin runemacs.exe to the taskbar and run it, it loads emacs
>> which creates another icon on my taskbar, It seems impossible to
>> currently have the same pin'd icon load up and run emacs under the
>> same icon without creating the console window.
>>
>> Ideally, I should be able to have one pinned icon on the taskbar, and
>> when clicking it it should load emacs without the console window. This
>> seems impossible.
>
> What version of Emacs are you using? runemacs, emacs and emacsclient
> should all be treated as the same program by Windows 7 taskbar since
> 23.2 if the MSDN documentation is correct. Perhaps you can help us to
> debug this if you are already using a more recent version.
>
>Maybe this is what the original poster meant, it is what happens for me 
in Windows 7:

1. Start runemacs.exe.
2. Pin the emacs icon to the taskbar.
3. Exit emacs.
4. Start emacs by clicking on the newly pinned icon in the taskbar.

Result: You get a new emacs window but also a console window.
This is on 23.2 BTW.  Is there reason to think 23.3 or trunk behaves 
differently?

	Jan D.
Juanma Barranquero 1300365445Thu, 17 Mar 2011 12:37:25 +0000 (UTC)
On Thu, Mar 17, 2011 at 08:19, Jan D.  wrote:

> 1. Start runemacs.exe.
> 2. Pin the emacs icon to the taskbar.IIUC, you're not pinning runemacs.exe, but emacs.exe (which runemacs started).> 3. Exit emacs.
> 4. Start emacs by clicking on the newly pinned icon in the taskbar.
>
> Result: You get a new emacs window but also a console window.
> This is on 23.2 BTW.  Is there reason to think 23.3 or trunk behaves
> differently?Once you've pinned emacs.exe, edit the properties (you can use
shift-right-click) and change the executable path to point to
C:/this/is/your/path/to/runemacs.exe instead of
C:/this/is/your/path/to/emacs.exe

Hope this helps,

    Juanma
Juanma Barranquero 1300390638Thu, 17 Mar 2011 19:37:18 +0000 (UTC)
On Thu, Mar 17, 2011 at 07:31, Jason Rumney  wrote:

> What version of Emacs are you using?  runemacs, emacs and emacsclient should
> all be treated as the same program by Windows 7 taskbar since 23.2 if the
> MSDN documentation is correct.By the way, for

  CompanyName.ProductName.SubProduct.VersionInformation

we're just using CompanyName.ProductName ("GNU.Emacs").

Do we want Windows 7 to group executables from different versions, or
not? I can imagine having shortcuts to 23.3 and trunk and wanting to
keep them separate.

    Juanma
Eli Zaretskii 1300342041Thu, 17 Mar 2011 06:07:21 +0000 (UTC)
> Date: Wed, 16 Mar 2011 20:42:56 -0700
> From: "Nicholas \"Indy\" Ray" 
> Cc: 
> 
> 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.We have runemacs.exe for this very purpose.  Why don't you use it?
Doesn't it work on Windows 7?
Nicholas \Indy\ Ray 1300342055Thu, 17 Mar 2011 06:07:35 +0000 (UTC)
Again, runemacs.exe doesn't interact properly with the task bar.
runemacs.exe and emacs.exe act as separate icons on the task bar. If
runemacs.exe is pinned, then while emacs.exe is running it's you get
two taskbar icons dedicated to emacs.

Thanks,
IndyOn Wed, Mar 16, 2011 at 10:39 PM, Eli Zaretskii  wrote:
>> Date: Wed, 16 Mar 2011 20:42:56 -0700
>> From: "Nicholas \"Indy\" Ray" 
>> Cc:
>>
>> 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.
>
> We have runemacs.exe for this very purpose.  Why don't you use it?
> Doesn't it work on Windows 7?
>
Juanma Barranquero 1300367234Thu, 17 Mar 2011 13:07:14 +0000 (UTC)
> Again, runemacs.exe doesn't interact properly with the task bar.
> runemacs.exe and emacs.exe act as separate icons on the task bar. If
> runemacs.exe is pinned, then while emacs.exe is running it's you get
> two taskbar icons dedicated to emacs.Have you seen my later message? Are you sure you're pinning
runemacs.exe, and not emacs.exe? It's impossible to pin runemacs.exe
by running it, because it almost immediately starts emacs.exe and
exits.

    Juanma
Nicholas \Indy\ Ray 1300379859Thu, 17 Mar 2011 16:37:39 +0000 (UTC)
Unless your fix isn't in Emacs 23.3 then yes. I drag runemacs.exe from
finder into the task bar.

IndyOn Thu, Mar 17, 2011 at 5:48 AM, Juanma Barranquero  wrote:
>> Again, runemacs.exe doesn't interact properly with the task bar.
>> runemacs.exe and emacs.exe act as separate icons on the task bar. If
>> runemacs.exe is pinned, then while emacs.exe is running it's you get
>> two taskbar icons dedicated to emacs.
>
> Have you seen my later message? Are you sure you're pinning
> runemacs.exe, and not emacs.exe? It's impossible to pin runemacs.exe
> by running it, because it almost immediately starts emacs.exe and
> exits.
>
>     Juanma
>
Juanma Barranquero 1300387053Thu, 17 Mar 2011 18:37:33 +0000 (UTC)
On Thu, Mar 17, 2011 at 17:29, Nicholas "Indy" Ray  wrote:

> Unless your fix isn't in Emacs 23.3 then yes. I drag runemacs.exe from
> finder into the task bar.I've tried dragging runemacs.exe to the taskbar (both my own compiled
23.3 and the one in emacs-23.3-bin-i386.zip) and both behave as
expected: running Emacs from them does not show additional icons, nor
console windows.

    Juanma
Nicholas \Indy\ Ray 1300387029Thu, 17 Mar 2011 18:37:09 +0000 (UTC)
Hmm, thanks for that info. It seems then I've run into some form of
bug rather then what I originally thought.

Any thoughts on the matter? the runemacs.exe if from my emacs 32.3
folder recentlly extracted from emacs-23.3-bin-i386.zip and running
M-x version on the resultant emacs window gives me:

GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600) of 2011-03-10 on 3249CTO

Thanks,
IndyOn Thu, Mar 17, 2011 at 11:19 AM, Juanma Barranquero  wrote:
> On Thu, Mar 17, 2011 at 17:29, Nicholas "Indy" Ray  wrote:
>
>> Unless your fix isn't in Emacs 23.3 then yes. I drag runemacs.exe from
>> finder into the task bar.
>
> I've tried dragging runemacs.exe to the taskbar (both my own compiled
> 23.3 and the one in emacs-23.3-bin-i386.zip) and both behave as
> expected: running Emacs from them does not show additional icons, nor
> console windows.
>
>     Juanma
>
Juanma Barranquero 1300390640Thu, 17 Mar 2011 19:37:20 +0000 (UTC)
> Any thoughts on the matter? the runemacs.exe if from my emacs 32.3
> folder recentlly extracted from emacs-23.3-bin-i386.zip and running
> M-x version on the resultant emacs window gives me:
>
> GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600) of 2011-03-10 on 3249CTOI've tested that very same version.

Hmm. Perhaps some of the calls to
SetCurrentProcessExplicitAppUserModelID are failing? Could you try to
debug that?

    Juanma
Nicholas \Indy\ Ray 1300421293Fri, 18 Mar 2011 04:08:13 +0000 (UTC)
I could. I'm probally going to have to actually build a version of
emacs locally to do that. Is it possible to build it in MSVC 2008, or
should I probally get MinGW working? the version installed with git
seems unsuitable to do the job.

IndyOn Thu, Mar 17, 2011 at 12:27 PM, Juanma Barranquero  wrote:
>> Any thoughts on the matter? the runemacs.exe if from my emacs 32.3
>> folder recentlly extracted from emacs-23.3-bin-i386.zip and running
>> M-x version on the resultant emacs window gives me:
>>
>> GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600) of 2011-03-10 on 3249CTO
>
> I've tested that very same version.
>
> Hmm. Perhaps some of the calls to
> SetCurrentProcessExplicitAppUserModelID are failing? Could you try to
> debug that?
>
>     Juanma
>
Juanma Barranquero 1300432038Fri, 18 Mar 2011 07:07:18 +0000 (UTC)
On Fri, Mar 18, 2011 at 04:53, Nicholas "Indy" Ray  wrote:

> I could. I'm probally going to have to actually build a version of
> emacs locally to do that.Thanks.> Is it possible to build it in MSVC 2008, or
> should I probally get MinGW working?I think there was some work done to make it compile with MSVC 2008,
but certainly you won't have trouble with MinGW, which I recommend.

    Juanma
Eli Zaretskii 1300437437Fri, 18 Mar 2011 08:37:17 +0000 (UTC)
> Date: Thu, 17 Mar 2011 20:53:19 -0700
> From: "Nicholas \"Indy\" Ray" 
> Cc: Eli Zaretskii , 
> 
> I could. I'm probally going to have to actually build a version of
> emacs locally to do that. Is it possible to build it in MSVC 2008, or
> should I probally get MinGW working?You could even try debugging the pre-compiled binaries if you install
the sources as well.  Assuming the binary you are using is not
stripped, that is.

Failing that, installing MinGW is the recommended way.

> the version installed with git seems unsuitable to do the job.

What "version installed with git"?
Nicholas \Indy\ Ray 1300918041Wed, 23 Mar 2011 22:07:21 +0000 (UTC)
Is there a specific way to build in debug mode? I presume GDB is the
proper debugger to be using? I'm uncertain how to load the proper
source to set breakpoints.

IndyOn Fri, Mar 18, 2011 at 1:08 AM, Eli Zaretskii  wrote:
>> Date: Thu, 17 Mar 2011 20:53:19 -0700
>> From: "Nicholas \"Indy\" Ray" 
>> Cc: Eli Zaretskii , 
>>
>> I could. I'm probally going to have to actually build a version of
>> emacs locally to do that. Is it possible to build it in MSVC 2008, or
>> should I probally get MinGW working?
>
> You could even try debugging the pre-compiled binaries if you install
> the sources as well.  Assuming the binary you are using is not
> stripped, that is.
>
> Failing that, installing MinGW is the recommended way.
>
>> the version installed with git seems unsuitable to do the job.
>
> What "version installed with git"?
>
Eli Zaretskii 1300941439Thu, 24 Mar 2011 04:37:19 +0000 (UTC)
> Date: Wed, 23 Mar 2011 14:50:55 -0700
> From: "Nicholas \"Indy\" Ray" 
> Cc: , 
> 
> Is there a specific way to build in debug mode?Yes, "configure --no-opt --enable-checking".

> I presume GDB is the proper debugger to be using?

Yes, if you compile with MinGW.

> I'm uncertain how to load the proper source to set breakpoints.

Sorry, I don't understand.  Are you asking what are the GDB commands
to set a breakpoint?
oCameLo 1301830827Sun, 03 Apr 2011 11:40:27 +0000 (UTC)
On Mar 18, 3:27 am, Juanma Barranquero  wrote:
> > Any thoughts on the matter? the runemacs.exe if from my emacs 32.3
> > folder recentlly extracted from emacs-23.3-bin-i386.zip and running
> > M-x version on the resultant emacs window gives me:
>
> > GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600) of 2011-03-10 on 3249CTO
>
> I've tested that very same version.
>
> Hmm. Perhaps some of the calls to
> SetCurrentProcessExplicitAppUserModelID are failing? Could you try to
> debug that?
>
>     JuanmaI think I've found out the problem.

Double click runemacs.exe in the explorer, pin it to the taskbar, then
right click on the icon, change the target from emacs.exe to
runemacs.exe, click the icon, everything work fine.

Drag runemacs.exe from the explorer to the taskbar, click on it,
another icon will apply to the taskbar.

The shortcut file (location in C:\Users\[User NAME]\AppData\Roaming
\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar) created
by the 2nd way didn't have a System.AppUserModel.ID property.


oCameLo
Juanma Barranquero 1301834273Sun, 03 Apr 2011 12:37:53 +0000 (UTC)
On Sun, Apr 3, 2011 at 12:46, oCameLo  wrote:

> Double click runemacs.exe in the explorer, pin it to the taskbar, then
> right click on the icon, change the target from emacs.exe to
> runemacs.exe, click the icon, everything work fine.So the shortcut is created from a running instance of emacs.exe.> Drag runemacs.exe from the explorer to the taskbar, click on it,
> another icon will apply to the taskbar.And this one is created from the executable.> The shortcut file (location in C:\Users\[User NAME]\AppData\Roaming
> \Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar) created
> by the 2nd way didn't have a System.AppUserModel.ID property.Sound quite logical, because the executable isn't associated with the
"GNU.Emacs" ID until it runs and sets it itself.

So this should be documented in nt/README.W32, and perhaps addpm.c
should set the System.AppUserModel.ID property in the shortcuts it
creates.

    Juanma
Ad
Home | About | Privacy