Subject: bug#38367: 26.3; Cannot start Emacs with -nw option, starting with Emacs 26.1

From: Juanma Barranquero <[email-masked]>
Date: Tue, 26 Nov 2019 03:45:05 +0100

On Tue, Nov 26, 2019 at 1:56 AM Drew Adams <[email-masked]> wrote:

> 24.5 works fine for me with -nw.

Do you mean that if you create a desktop shortcut to 24.5's runemacs.exe
that runs it with -Q -nw, and click on it, you get Emacs running in a
console?

Because I get an Emacs running with a hidden console (no visible frame).

> That's what I've used for -nw in the past.
> But I just tried plain `emacs' for -nw, and
> that works too.  (I use plain `emacs' for GUI.)

I'm confused now.

What do you mean with "That's what I've used for -nw in the past"? From a
shortcut, or from CMD?

> Does Emacs 26 on Windows 10 work for you
> with -nw?

26.3 works as expected:

1) "emacs.exe -Q -nw" from CMD: starts a console Emacs inside CMD
2) "emacs.exe -Q" from CMD: starts a windows Emacs, but it's attached to
the original CMD.
3) "runemacs.exe -Q -nw" from CMD: starts a detached console Emacs (i.e., I
see nothing because there's no window)
4) "runemacs.exe -Q" from CMD: starts a detached windows Emacs (CMD is
available to use).

5) "emacs.exe -Q -nw" from a shortcut: stars a console Emacs.
6) "emacs.exe -Q" from a shortcut: Stars a windows Emacs, but there's a
visible console.
7) "runemacs.exe -Q -nw" from a shortcut: starts a console Emacs, but the
console is hidden, so nothing is visible.
8) "runemacs.exe -Q" from a shortcut: starts a windows Emacs.

Basically, runemacs.exe exists *specifically* to help with 2) and 6),
because windows Emacs *always* creates a console, but when you're running a
windows Emacs, you don't want to see it (it's just a nuisance).

But if you're trying to run a console Emacs, "emacs.exe -Q -nw" is what you
want, either in a shortcut or from the command line.

So, what you see is not a bug, and I think it's always been so. I just
tried with 20.7.3 and I get the very same behavior.