GNU bug report logs - #38367
26.3; Cannot start Emacs with -nw option, starting with Emacs 26.1

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 25 Nov 2019 21:33:38 UTC

Severity: normal

Tags: notabug

Merged with 10204

Found in version 26.3

Done: Drew Adams <drew.adams <at> oracle.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38367 in the body.
You can then email your comments to 38367 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Mon, 25 Nov 2019 21:33:38 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 25 Nov 2019 21:33:38 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.3; Cannot start Emacs with -nw option, starting with Emacs 26.1
Date: Sun, 24 Nov 2019 18:21:20 -0800 (PST)
This is the case starting with Emacs 26.1.  It is still the case with
Emacs 26.3.

I create a shortcut in Windows 10 with the executable as Target:

 Y:\Emacs-26\bin\runemacs -Q -nw

I double-click that shortcut.  Nothing seems to happen.

In the Task Manager I see a background process that corresponds, named
"GNU Emacs: The extensible self-documenting text editor", but there is
no Emacs window.

This works in all previous releases I have, from Emacs 20.7 through
Emacs 25.3.1.


In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.17763
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Mon, 25 Nov 2019 22:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 38367 <at> debbugs.gnu.org
Subject: Re: bug#38367: 26.3; Cannot start Emacs with -nw option, starting
 with Emacs 26.1
Date: Mon, 25 Nov 2019 23:48:42 +0100
[Message part 1 (text/plain, inline)]
On Mon, Nov 25, 2019 at 10:36 PM Drew Adams <drew.adams <at> oracle.com> wrote:

> This works in all previous releases I have, from Emacs 20.7 through
> Emacs 25.3.1.

Did it? I don't have a release of 25.3 at hand, but I have one of 24.5 and
the effect is the same.

Which isn't surprising, as runemacs' only use is to start an Emacs hidding
the console window.

Why don't you do the shortcut with just emacs.exe, instead of runemacs.exe?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Tue, 26 Nov 2019 00:57:01 GMT) Full text and rfc822 format available.

Message #11 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 38367 <at> debbugs.gnu.org
Subject: RE: bug#38367: 26.3; Cannot start Emacs with -nw option, starting
 with Emacs 26.1
Date: Mon, 25 Nov 2019 16:55:58 -0800 (PST)
>> This works in all previous releases I have,
>> from Emacs 20.7 through Emacs 25.3.1.
>
> Did it? I don't have a release of 25.3 at
> hand, but I have one of 24.5 and the effect
> is the same.

24.5 works fine for me with -nw.

> Which isn't surprising, as runemacs' only use
> is to start an Emacs hidding the console window.

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.)

> Why don't you do the shortcut with just
> emacs.exe, instead of runemacs.exe?

I already tried that too.  Should 've
mentioned it in the bug report.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Tue, 26 Nov 2019 02:46:02 GMT) Full text and rfc822 format available.

Message #14 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 38367 <at> debbugs.gnu.org
Subject: Re: bug#38367: 26.3; Cannot start Emacs with -nw option, starting
 with Emacs 26.1
Date: Tue, 26 Nov 2019 03:45:05 +0100
[Message part 1 (text/plain, inline)]
On Tue, Nov 26, 2019 at 1:56 AM Drew Adams <drew.adams <at> oracle.com> 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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Tue, 26 Nov 2019 06:16:01 GMT) Full text and rfc822 format available.

Message #17 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 38367 <at> debbugs.gnu.org
Subject: RE: bug#38367: 26.3; Cannot start Emacs with -nw option, starting
 with Emacs 26.1
Date: Mon, 25 Nov 2019 22:15:20 -0800 (PST)
>> 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?

That's what I meant.  But I had it backward
(`emacs' vs `runemacs').  Sorry for the noise -
I'll close the bug.

The Target on the Shortcut tab is this:

y:\Emacs-24.5\bin\emacs.exe -nw
                  ^^^^^

That works fine for me in all Emacs versions,
including 24.5 and 26.x.

I don't actually use -nw, except rarely, for
testing something.  For 26.x I tried to do 
what I've done before for -nw, but I got it
backward.

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

I always use shortcuts, not CMD.

What I meant and wrote was backward from what I
actually do (which works, including in Emacs 26).

I use `runemacs', not `emacs', for GUI, and
I use `emacs', not `runemacs', for -nw.

What I said was mistakenly the opposite of that.

Thanks.




bug closed, send any further explanations to 38367 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Drew Adams <drew.adams <at> oracle.com> to control <at> debbugs.gnu.org. (Tue, 26 Nov 2019 06:16:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Tue, 26 Nov 2019 09:34:02 GMT) Full text and rfc822 format available.

Message #22 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Juanma Barranquero <lekktu <at> gmail.com>, Drew Adams <drew.adams <at> oracle.com>
Cc: 38367 <at> debbugs.gnu.org
Subject: Re: bug#38367: 26.3; Cannot start Emacs with -nw option, starting
 with Emacs 26.1
Date: Tue, 26 Nov 2019 10:33:02 +0100
> 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.

This is a nice summary.  Couldn't we add it somewhere to nt/README?

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Tue, 26 Nov 2019 13:14:02 GMT) Full text and rfc822 format available.

Message #25 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 38367 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#38367: 26.3; Cannot start Emacs with -nw option, starting
 with Emacs 26.1
Date: Tue, 26 Nov 2019 14:12:53 +0100
[Message part 1 (text/plain, inline)]
On Tue, Nov 26, 2019 at 10:33 AM martin rudalics <rudalics <at> gmx.at> wrote:

> This is a nice summary.  Couldn't we add it somewhere to nt/README?

I think it would add confusion. If anything, perhaps nt/README should be a
bit more specific about what to do if the user wants to run a console emacs.
Currently it just says:

  + emacs.exe - The main Emacs executable.  As this is designed to run
    as both a text-mode application (emacs -nw) and as a GUI application,
    it will pop up a command prompt window if run directly from Explorer.

  + runemacs.exe - A wrapper for running Emacs as a GUI application
    without popping up a command prompt window.  If you create a
    desktop shortcut for invoking Emacs, make it point to this
    executable, not to emacs.exe.
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Juanma Barranquero <lekktu <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 26 Nov 2019 14:12:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Sun, 08 Dec 2019 02:43:01 GMT) Full text and rfc822 format available.

Message #30 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Nordin <tomasn <at> posteo.net>
To: Juanma Barranquero <lekktu <at> gmail.com>, martin rudalics <rudalics <at> gmx.at>
Cc: 38367 <at> debbugs.gnu.org
Subject: Re: bug#38367: 26.3; Cannot start Emacs with -nw option, starting
 with Emacs 26.1
Date: Sat, 07 Dec 2019 19:22:38 +0100
Juanma Barranquero <lekktu <at> gmail.com> writes:

> On Tue, Nov 26, 2019 at 10:33 AM martin rudalics <rudalics <at> gmx.at> wrote:
>
>> This is a nice summary.  Couldn't we add it somewhere to nt/README?
>
> I think it would add confusion. If anything, perhaps nt/README should be a
> bit more specific about what to do if the user wants to run a console emacs.
> Currently it just says:
>
>   + emacs.exe - The main Emacs executable.  As this is designed to run
>     as both a text-mode application (emacs -nw) and as a GUI application,
>     it will pop up a command prompt window if run directly from Explorer.
>
>   + runemacs.exe - A wrapper for running Emacs as a GUI application
>     without popping up a command prompt window.  If you create a
>     desktop shortcut for invoking Emacs, make it point to this
>     executable, not to emacs.exe.

Which is to the point and just fine, isn't it? Possibly consider
changing "text-mode" to "command prompt" since that wording is used
later in the sentence (in the first bullet).

diff --git a/nt/README b/nt/README
index de68162131..aa5be96f56 100644
--- a/nt/README
+++ b/nt/README
@@ -26,8 +26,9 @@
   files in the bin directory.
 
   + emacs.exe - The main Emacs executable.  As this is designed to run
-    as both a text-mode application (emacs -nw) and as a GUI application,
-    it will pop up a command prompt window if run directly from Explorer.
+    as both a command prompt application (emacs -nw) and as a GUI
+    application, it will pop up a command prompt window as well, if run
+    directly from Explorer.
 
   + runemacs.exe - A wrapper for running Emacs as a GUI application
     without popping up a command prompt window.  If you create a


Best regards
--
Tomas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38367; Package emacs. (Sun, 08 Dec 2019 03:36:02 GMT) Full text and rfc822 format available.

Message #33 received at 38367 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tomas Nordin <tomasn <at> posteo.net>
Cc: lekktu <at> gmail.com, 38367 <at> debbugs.gnu.org, rudalics <at> gmx.at
Subject: Re: bug#38367: 26.3;
 Cannot start Emacs with -nw option, starting with Emacs 26.1
Date: Sun, 08 Dec 2019 05:35:15 +0200
> From: Tomas Nordin <tomasn <at> posteo.net>
> Date: Sat, 07 Dec 2019 19:22:38 +0100
> Cc: 38367 <at> debbugs.gnu.org
> 
> >   + emacs.exe - The main Emacs executable.  As this is designed to run
> >     as both a text-mode application (emacs -nw) and as a GUI application,
> >     it will pop up a command prompt window if run directly from Explorer.
> >
> >   + runemacs.exe - A wrapper for running Emacs as a GUI application
> >     without popping up a command prompt window.  If you create a
> >     desktop shortcut for invoking Emacs, make it point to this
> >     executable, not to emacs.exe.
> 
> Which is to the point and just fine, isn't it? Possibly consider
> changing "text-mode" to "command prompt"

That loses information, since the -nw switch does make the session
text-mode, unlike other invocations from the command prompt.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 05 Jan 2020 12:24:06 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 16 Jan 2020 14:44:02 GMT) Full text and rfc822 format available.

Forcibly Merged 10204 38367. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 16 Jan 2020 14:44:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Feb 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.