public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Is it possible to hide emacs-w32 console window?
@ 2016-05-28 23:35 Oleksandr Gavenko
  2016-05-29  3:08 ` Ken Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Oleksandr Gavenko @ 2016-05-28 23:35 UTC (permalink / raw)
  To: cygwin

emacs-w32 starts console window and that useless window disturbs during task
switching (by Alt+TAB) and take space on TaskBar.

Is it possible to hide emacs-w32 console window?

== TL;TR =======================================================

I uses native Emacs for long time but now emacs-w32 package is present which I
think built on native GUI and have natural copy/paste abilities.

So it's better to install Cygwin Emacs than spent time to find and download
NT Emacs from ftp.gnu.org even though with cygwin-mount.el NT Emacs is seamlessly
integrated with Cygwin.

Existent Emacs for X requires X packages and running X server which is not
convenient.

-- 
http://defun.work/


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is it possible to hide emacs-w32 console window?
  2016-05-28 23:35 Is it possible to hide emacs-w32 console window? Oleksandr Gavenko
@ 2016-05-29  3:08 ` Ken Brown
  2016-05-29 14:05   ` Oleksandr Gavenko
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2016-05-29  3:08 UTC (permalink / raw)
  To: cygwin

On 5/28/2016 5:08 PM, Oleksandr Gavenko wrote:
> emacs-w32 starts console window and that useless window disturbs during task
> switching (by Alt+TAB) and take space on TaskBar.
>
> Is it possible to hide emacs-w32 console window?

Sorry, I don't know what console window you're talking about.  Exactly 
how do you start emacs-w32?  I start it by typing 'emacs-w32 &' in a 
Cygwin terminal (mintty), and there's no console window.

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is it possible to hide emacs-w32 console window?
  2016-05-29  3:08 ` Ken Brown
@ 2016-05-29 14:05   ` Oleksandr Gavenko
  2016-05-29 17:25     ` Ken Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Oleksandr Gavenko @ 2016-05-29 14:05 UTC (permalink / raw)
  To: cygwin

On 2016-05-29, Ken Brown wrote:

> On 5/28/2016 5:08 PM, Oleksandr Gavenko wrote:
>> emacs-w32 starts console window and that useless window disturbs during task
>> switching (by Alt+TAB) and take space on TaskBar.
>>
>> Is it possible to hide emacs-w32 console window?
>
> Sorry, I don't know what console window you're talking about.  Exactly how do
> you start emacs-w32?  I start it by typing 'emacs-w32 &' in a Cygwin terminal
> (mintty), and there's no console window.
>
Sorry I forgot to add this detail.

I use Win+R emacs-w32 ENTER.

If I start from terminal (cmd.exe or mintty) it works as in your case.

But otherwise "ConsoleWindowClass" (from spy++) window is opened (like cmd.exe
but without working prompt) along with regular Emacs windows.

Closing that window also closes Emacs.

I try:

  #include <windows.h>
  int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow) {
      MessageBoxW(NULL, L"Hello", L"Ok", MB_OK);
      return 0;
  }

with:

  gcc -Wl,--subsystem,windows -o mb.exe mb.c

and on:

   Win+R C:\home\my\tmp\mb.exe ENTER

I don't see console window.

I don't know if it is possible to link emacs-w32 with --subsystem=windows.

mintty.exe has dependency on cygwin1.dll and does not bring up cmd-like
console along with xterm console.

-- 
http://defun.work/


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is it possible to hide emacs-w32 console window?
  2016-05-29 14:05   ` Oleksandr Gavenko
@ 2016-05-29 17:25     ` Ken Brown
  2016-05-30 10:40       ` Oleksandr Gavenko
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2016-05-29 17:25 UTC (permalink / raw)
  To: cygwin

On 5/29/2016 8:43 AM, Oleksandr Gavenko wrote:
> On 2016-05-29, Ken Brown wrote:
>
>> On 5/28/2016 5:08 PM, Oleksandr Gavenko wrote:
>>> emacs-w32 starts console window and that useless window disturbs during task
>>> switching (by Alt+TAB) and take space on TaskBar.
>>>
>>> Is it possible to hide emacs-w32 console window?
>>
>> Sorry, I don't know what console window you're talking about.  Exactly how do
>> you start emacs-w32?  I start it by typing 'emacs-w32 &' in a Cygwin terminal
>> (mintty), and there's no console window.
>>
> Sorry I forgot to add this detail.
>
> I use Win+R emacs-w32 ENTER.

You can avoid the console window by using Cygwin's run.exe.  See the 
shortcut for the X server for an example of this.  (You do get a brief 
console window, but it immediately disappears.)

> I don't know if it is possible to link emacs-w32 with --subsystem=windows.

I don't either, and I'm not interested in experimenting with this 
without knowing what all the consequences would be.

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is it possible to hide emacs-w32 console window?
  2016-05-29 17:25     ` Ken Brown
@ 2016-05-30 10:40       ` Oleksandr Gavenko
  0 siblings, 0 replies; 5+ messages in thread
From: Oleksandr Gavenko @ 2016-05-30 10:40 UTC (permalink / raw)
  To: cygwin

On 2016-05-29, Ken Brown wrote:

> You can avoid the console window by using Cygwin's run.exe.  See the shortcut
> for the X server for an example of this.  (You do get a brief console window,
> but it immediately disappears.)

Thanks, that helped.

I tested with "Win+R run emacs-w32 ENTER" but better to have wrapper to
simplify typing.

run(1) man page explains some details:

  NAME
       run - start programs with hidden console window

  DESCRIPTION

       Windows programs are either GUI programs or console programs. When
       started console programs will either attach to an existing console or
       create a new one. GUI programs can never attach to an exiting console.
       There is no way to attach to an existing console but hide it if started
       as GUI program.

       run will do this for you. It works as intermediate and starts a program
       but makes the console window hidden.

-- 
http://defun.work/


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-30  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-28 23:35 Is it possible to hide emacs-w32 console window? Oleksandr Gavenko
2016-05-29  3:08 ` Ken Brown
2016-05-29 14:05   ` Oleksandr Gavenko
2016-05-29 17:25     ` Ken Brown
2016-05-30 10:40       ` Oleksandr Gavenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).