GNU bug report logs - #13850
Emacs for Windows: Launch better from a command prompt

Previous Next

Package: emacs;

Reported by: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>

Date: Fri, 1 Mar 2013 20:55:01 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 13850 in the body.
You can then email your comments to 13850 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#13850; Package emacs. (Fri, 01 Mar 2013 20:55:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Pennebaker <andrew.pennebaker <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 01 Mar 2013 20:55:01 GMT) Full text and rfc822 format available.

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

From: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>, help-emacs-windows <at> gnu.org
Subject: Emacs for Windows: Launch better from a command prompt
Date: Fri, 1 Mar 2013 15:49:57 -0500
[Message part 1 (text/plain, inline)]
Currently, Emacs ties up the Command Prompt until the user quits Emacs. In
Git Bash, you can hack around this with an ampersand (&), but the default
behavior should really be to fork a thread for Emacs and immediately return
terminal control to the user.

Can we default the next version to this behavior?

-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs,w32. (Fri, 01 Mar 2013 22:59:01 GMT) Full text and rfc822 format available.

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

From: "K. Frank" <kfrank29.c <at> gmail.com>
To: help-emacs-windows <at> gnu.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Re: [h-e-w] Emacs for Windows: Launch better from a command prompt
Date: Fri, 1 Mar 2013 17:54:13 -0500
Hello Andrew!

On Fri, Mar 1, 2013 at 3:49 PM, Andrew Pennebaker
<andrew.pennebaker <at> gmail.com> wrote:
> Currently, Emacs ties up the Command Prompt until the user quits Emacs. In
> Git Bash, you can hack around this with an ampersand (&), but the default
> behavior should really be to fork a thread for Emacs and immediately return
> terminal control to the user.

With my old version, 23.1.1, "start", the windows analog of "&", as in:

   start emacs

works (although emacs then opens up a new, vaguely annoying console
window of its own).

I believe the "official" approach (at least with my old version) is to use
the companion helper program, runemacs, as in:

   runemacs

This, I believe, will do what you are asking (although it does seem to
flicker a console window briefly).

> Can we default the next version to this behavior?

I'll let the experts answer this one.

But do let me note that emacs (at least my old version) still supports
the old, text-only, console mode, as in:

   emacs -nw

("nw" being, I believe, an abbreviation of "no window")

I have no idea whether having emacs default to "detaching" itself
from the console would make continuing to support "-nw" more
difficult.

> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us


Good luck.


K. Frank




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs,w32. (Sat, 02 Mar 2013 07:28:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Cc: 13850 <at> debbugs.gnu.org, help-emacs-windows <at> gnu.org
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sat, 02 Mar 2013 09:27:17 +0200
> Date: Fri, 1 Mar 2013 15:49:57 -0500
> From: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
> 
> Currently, Emacs ties up the Command Prompt until the user quits Emacs. In
> Git Bash, you can hack around this with an ampersand (&), but the default
> behavior should really be to fork a thread for Emacs and immediately return
> terminal control to the user.
> 
> Can we default the next version to this behavior?

We already do: just invoke runemacs.exe rather than emacs.exe.

As for forking a thread: it is a bit more complex than that.  (We
already start at least 2 threads at startup.)  The 2 most important
problems are (1) the same executable should be able to run in a text
terminal session under -nw, and (2) we don't want the GUI session to
have a console.  runemacs.exe solves both.

Any reasons not to close this bug?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs,w32. (Sat, 02 Mar 2013 15:00:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Cc: 13850 <at> debbugs.gnu.org
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sat, 02 Mar 2013 16:59:24 +0200
> Date: Sat, 2 Mar 2013 09:43:14 -0500
> From: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
> 
> Would it make sense to give runemacs a -nw option, and rename it emacs.exe?

No, because runemacs.exe works by invoking emacs.exe in a special
way.  If you rename it, it will reinvoke itself.

Why is the current arrangement a problem?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs,w32. (Sat, 02 Mar 2013 15:36:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Cc: 13850 <at> debbugs.gnu.org
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sat, 02 Mar 2013 17:33:40 +0200
> Date: Sat, 2 Mar 2013 10:13:42 -0500
> From: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
> 
> Hmm. I ask, because I use several operating systems, and it would be nice
> to call a single command dor all of them: emacs.

Don't you start Emacs when the machine starts and keep it running all
the time until the machine is shut down?  If you do, you don't need
to type the command name too much.

Or you could just click the icon on the desktop, in which case you
don't need to worry which executable file is being run by it.

Or you could make a shell script called 'runemacs' on Unix, and have a
single command to use on all platforms.

> You say runemacs calls emacs with some settings. Could we achieve the same
> behavior by making those the default in emacs.exe?

Not trivially; at least I don't know how to do that.  Take a look at
runemacs.c in the sources: you will see that it runs emacs.exe with
special non-default options (to hide its console window).  Again, the
same executable should be able to be run as a TTY session, so it must
be a console program, as far as Windows is concerned.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs,w32. (Sat, 02 Mar 2013 16:23:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Cc: 13850 <at> debbugs.gnu.org
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sat, 02 Mar 2013 18:22:01 +0200
> Date: Sat, 2 Mar 2013 10:44:33 -0500
> From: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
> 
> No, I run vi with "vi", python with "python", and on every other operating
> system, emacs with "emacs".

Sorry.

Anyway, unless someone can suggest how to pull that trick on Windows,
I don't see how this feature can be made to happen.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs,w32. (Sat, 02 Mar 2013 16:27:01 GMT) Full text and rfc822 format available.

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

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13850 <at> debbugs.gnu.org, Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sat, 2 Mar 2013 17:25:59 +0100
[Message part 1 (text/plain, inline)]
What is the problem? Just start Emacs through emacsclient. (I posted code
for it long ago.)


On Sat, Mar 2, 2013 at 5:22 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Date: Sat, 2 Mar 2013 10:44:33 -0500
> > From: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
> >
> > No, I run vi with "vi", python with "python", and on every other
> operating
> > system, emacs with "emacs".
>
> Sorry.
>
> Anyway, unless someone can suggest how to pull that trick on Windows,
> I don't see how this feature can be made to happen.
>
>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs. (Sun, 01 May 2022 09:13:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13850 <at> debbugs.gnu.org, help-emacs-windows <at> gnu.org,
 Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sun, 01 May 2022 11:12:36 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> We already do: just invoke runemacs.exe rather than emacs.exe.
>
> As for forking a thread: it is a bit more complex than that.  (We
> already start at least 2 threads at startup.)  The 2 most important
> problems are (1) the same executable should be able to run in a text
> terminal session under -nw, and (2) we don't want the GUI session to
> have a console.  runemacs.exe solves both.
>
> Any reasons not to close this bug?

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

"Use runemacs" seems like it's the correct answer here, so I'm closing
this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 13850 <at> debbugs.gnu.org and Andrew Pennebaker <andrew.pennebaker <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 01 May 2022 09:13:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs. (Sun, 01 May 2022 10:00:02 GMT) Full text and rfc822 format available.

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

From: Joel Reicher <joel.reicher <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 13850 <at> debbugs.gnu.org, help-emacs-windows <at> gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>, Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sun, 01 May 2022 19:57:51 +1000
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> We already do: just invoke runemacs.exe rather than emacs.exe.
>>
>> As for forking a thread: it is a bit more complex than that.  (We
>> already start at least 2 threads at startup.)  The 2 most important
>> problems are (1) the same executable should be able to run in a text
>> terminal session under -nw, and (2) we don't want the GUI session to
>> have a console.  runemacs.exe solves both.
>>
>> Any reasons not to close this bug?
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> "Use runemacs" seems like it's the correct answer here, so I'm closing
> this bug report.

It is the right answer, but I can't help thinking that there is an issue of ignorance amongst Window users.

Does anyone know why the OP had this `wrong'?

I think we need to keep an eye on Windows users usage patterns/habits; there may be an opportunity here, especially when it comes to the installer.

Regards,

        - Joel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs. (Sun, 01 May 2022 10:10:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Joel Reicher <joel.reicher <at> gmail.com>
Cc: 13850 <at> debbugs.gnu.org, help-emacs-windows <at> gnu.org, larsi <at> gnus.org,
 andrew.pennebaker <at> gmail.com
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sun, 01 May 2022 13:09:31 +0300
> From: Joel Reicher <joel.reicher <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  13850 <at> debbugs.gnu.org,
>   help-emacs-windows <at> gnu.org,  Andrew Pennebaker
>  <andrew.pennebaker <at> gmail.com>
> Date: Sun, 01 May 2022 19:57:51 +1000
> 
> > "Use runemacs" seems like it's the correct answer here, so I'm closing
> > this bug report.
> 
> It is the right answer, but I can't help thinking that there is an issue of ignorance amongst Window users.
> 
> Does anyone know why the OP had this `wrong'?

Most probably because (a) he comes from Unix, and (b) he didn't read
the README.W32 file that comes with Emacs for Windows.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13850; Package emacs. (Sun, 01 May 2022 20:55:02 GMT) Full text and rfc822 format available.

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

From: Joel Reicher <joel.reicher <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13850 <at> debbugs.gnu.org, help-emacs-windows <at> gnu.org, larsi <at> gnus.org,
 andrew.pennebaker <at> gmail.com
Subject: Re: bug#13850: Emacs for Windows: Launch better from a command prompt
Date: Sun, 01 May 2022 20:35:59 +1000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Joel Reicher <joel.reicher <at> gmail.com>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  13850 <at> debbugs.gnu.org,
>>   help-emacs-windows <at> gnu.org,  Andrew Pennebaker
>>  <andrew.pennebaker <at> gmail.com>
>> Date: Sun, 01 May 2022 19:57:51 +1000
>> 
>> > "Use runemacs" seems like it's the correct answer here, so I'm closing
>> > this bug report.
>> 
>> It is the right answer, but I can't help thinking that there is an issue of ignorance amongst Window users.
>> 
>> Does anyone know why the OP had this `wrong'?
>
> Most probably because (a) he comes from Unix, and (b) he didn't read
> the README.W32 file that comes with Emacs for Windows.

If that's correct, the best measure may be to launch that README after the installer.

I know I'm repeating myself a little, but I really want to give Windows users a flying start, and that requires understanding where they're coming from.

Cheers,

        - Joel




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 30 May 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 325 days ago.

Previous Next


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