* bug#549: emacsclient or emacsclientw not waiting in Windows
@ 2008-07-15 6:40 Vesa Suontama
2008-07-15 7:37 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 8+ messages in thread
From: Vesa Suontama @ 2008-07-15 6:40 UTC (permalink / raw)
To: lennart.borgman, 549; +Cc: bug-gnu-emacs
Hi,
thanks for clarification. It seems now that I was not testing
emacsclient at all, since now when I test it it works. I am very sorry
for misleading bug report.
I was not aware that emacsclientw does not wait, and thought that the
only difference there is that emacsclientw is compiled as windows
binary, which does not create (or use) a console.
This is quite sorry state of affairs, that windows needs to have
two emacsclient versions. (At least when the difference is not that
well or at all explained IMHO).
It would be interesting to know why you just cannot have one
emacsclient for windows? Would it be too complex to go around the
issue of having two emacsclient versions the same way as MS does (Yes,
I know this is insane, but look many MS utilities e.g. devenv).
It works like this: have emacsclient.com and emacsclient.exe, where
new emacsclient.exe is the old emacsclientw.exe, and emacsclient.com
is just a wrapper that calls the emacsclient and waits for it to
finish (e.g. by using a named event, which emacsclient.com waits).
Console programs use .com version by default (when only "emacsclient"
is called), and win32 uses .exe. We cannot directly rename
emacsclient.exe to emacsclient.com because there is a restriction that
com files can only be less than 64 kb.
The other way around could be to use "AttachConsole" etc. from
emacsclientw (and rename it to emacsclient), but all this is just guessing
as I do not know the real reason for emacsclientw.
I would like to hear from you, but understand if you are too busy.
Thanks for your help anyway.
BR,
Vesa
> -----Original Message-----
> From: Lennart Borgman (gmail) [mailto:lennart.borgman@gmail.com]
> Sent: 14. heinäkuuta 2008 18:39
> To: Vesa Suontama; 549@emacsbugs.donarmstrong.com
> Cc: bug-gnu-emacs@gnu.org
> Subject: Re: bug#549: emacsclient or emacsclientw not waiting in
> Windows
>
> Vesa Suontama wrote:
> > Hi,
> >
> > I have a Windows Vista SP1, and when using emacsclient or
> emacsclientw,
> > they always return immediately with return value 1, and do not wait
> > making it useless as EDITOR for command line utilities which should
> wait.
> >
> > I use the emacsclient from cmd.exe and not from cygwin. I also
> started
> > emacs with –q, and started server manually after that, so no startup
> > file should be causing this.
> >
> > Is this a known issue?
> >
> > Otherwise I love emacs :)
> >
> > Vesa
> >
> > In GNU Emacs 22.2.1 (i386-mingw-nt6.0.6001)
> >
> > of 2008-03-26 on RELEASE
> >
> > Windowing system distributor `Microsoft Corp.', version 6.0.6001
>
>
> I do not have Emacs 22 here. However I just tested with CVS Emacs 23,
> both unpatched and the patched version that comes with Emacs+EmacsW32.
> I
> saw no problem, both emacsclient and emacsclientw waited as expected.
>
> Some notes:
>
> - Please use -Q (uppercase), not -q (lowercase). -q will still run
> site-start.el
>
> - If you test from a console window (running cmd.exe) then please note
> that emacsclientw can not make cmd.exe wait for it. I can't remember
> the
> technical terms for it but w here stands for "window, GUI". Program
> linked as GUI applications do not use a console window (by default).
> They can not write to a console and if started from a console the
> console will not wait for them.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#549: emacsclient or emacsclientw not waiting in Windows
2008-07-15 6:40 bug#549: emacsclient or emacsclientw not waiting in Windows Vesa Suontama
@ 2008-07-15 7:37 ` Lennart Borgman (gmail)
2008-07-15 8:15 ` Jason Rumney
0 siblings, 1 reply; 8+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-15 7:37 UTC (permalink / raw)
To: Vesa Suontama; +Cc: bug-gnu-emacs, 549
Vesa Suontama wrote:
> Hi,
>
> thanks for clarification. It seems now that I was not testing
> emacsclient at all, since now when I test it it works. I am very sorry
> for misleading bug report.
>
> I was not aware that emacsclientw does not wait, and thought that the
> only difference there is that emacsclientw is compiled as windows
> binary, which does not create (or use) a console.
Just to not confuse any readers:
emacsclientw.exe does wait. You can see it in Window Task Manager.
However the console window does not wait for emacsclientw.exe since it
is not a console app.
> This is quite sorry state of affairs, that windows needs to have
> two emacsclient versions. (At least when the difference is not that
> well or at all explained IMHO).
You can always use emacsclient.exe if you want to. The drawback is that
you will see an extra console window for each invocation of it.
> It would be interesting to know why you just cannot have one
> emacsclient for windows? Would it be too complex to go around the
> issue of having two emacsclient versions the same way as MS does (Yes,
> I know this is insane, but look many MS utilities e.g. devenv).
>
> It works like this: have emacsclient.com and emacsclient.exe, where
> new emacsclient.exe is the old emacsclientw.exe, and emacsclient.com
> is just a wrapper that calls the emacsclient and waits for it to
> finish (e.g. by using a named event, which emacsclient.com waits).
Please try to write some code for this so we can test it.
> Console programs use .com version by default (when only "emacsclient"
> is called), and win32 uses .exe. We cannot directly rename
> emacsclient.exe to emacsclient.com because there is a restriction that
> com files can only be less than 64 kb.
>
> The other way around could be to use "AttachConsole" etc. from
> emacsclientw (and rename it to emacsclient), but all this is just guessing
> as I do not know the real reason for emacsclientw.
If you know how to do this then please try writing some code for that so
we can test that. This may be a better solution than the one above.
> I would like to hear from you, but understand if you are too busy.
>
> Thanks for your help anyway.
>
> BR,
>
> Vesa
>
>> -----Original Message-----
>> From: Lennart Borgman (gmail) [mailto:lennart.borgman@gmail.com]
>> Sent: 14. heinäkuuta 2008 18:39
>> To: Vesa Suontama; 549@emacsbugs.donarmstrong.com
>> Cc: bug-gnu-emacs@gnu.org
>> Subject: Re: bug#549: emacsclient or emacsclientw not waiting in
>> Windows
>>
>> Vesa Suontama wrote:
>>> Hi,
>>>
>>> I have a Windows Vista SP1, and when using emacsclient or
>> emacsclientw,
>>> they always return immediately with return value 1, and do not wait
>>> making it useless as EDITOR for command line utilities which should
>> wait.
>>> I use the emacsclient from cmd.exe and not from cygwin. I also
>> started
>>> emacs with –q, and started server manually after that, so no startup
>>> file should be causing this.
>>>
>>> Is this a known issue?
>>>
>>> Otherwise I love emacs :)
>>>
>>> Vesa
>>>
>>> In GNU Emacs 22.2.1 (i386-mingw-nt6.0.6001)
>>>
>>> of 2008-03-26 on RELEASE
>>>
>>> Windowing system distributor `Microsoft Corp.', version 6.0.6001
>>
>> I do not have Emacs 22 here. However I just tested with CVS Emacs 23,
>> both unpatched and the patched version that comes with Emacs+EmacsW32.
>> I
>> saw no problem, both emacsclient and emacsclientw waited as expected.
>>
>> Some notes:
>>
>> - Please use -Q (uppercase), not -q (lowercase). -q will still run
>> site-start.el
>>
>> - If you test from a console window (running cmd.exe) then please note
>> that emacsclientw can not make cmd.exe wait for it. I can't remember
>> the
>> technical terms for it but w here stands for "window, GUI". Program
>> linked as GUI applications do not use a console window (by default).
>> They can not write to a console and if started from a console the
>> console will not wait for them.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#549: emacsclient or emacsclientw not waiting in Windows
2008-07-15 7:37 ` Lennart Borgman (gmail)
@ 2008-07-15 8:15 ` Jason Rumney
2008-07-15 9:49 ` Vesa Suontama
0 siblings, 1 reply; 8+ messages in thread
From: Jason Rumney @ 2008-07-15 8:15 UTC (permalink / raw)
To: 549; +Cc: Vesa Suontama
>> It works like this: have emacsclient.com and emacsclient.exe, where
>> new emacsclient.exe is the old emacsclientw.exe, and emacsclient.com
>> is just a wrapper that calls the emacsclient and waits for it to
>> finish (e.g. by using a named event, which emacsclient.com waits).
>>
>> The other way around could be to use "AttachConsole" etc. from
>> emacsclientw (and rename it to emacsclient), but all this is just
>> guessing
>> as I do not know the real reason for emacsclientw.
These might be good ideas if Emacs was a Windows program. But since
Emacs is a cross platform program, it is better to keep emacsclient the
same as other platforms, and have emacsclientw, which is built from
identical source code with different compiler switches, to work around
the deficiency in Windows where it insists on making a console visible
when you start a console program from the GUI.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#549: emacsclient or emacsclientw not waiting in Windows
2008-07-15 8:15 ` Jason Rumney
@ 2008-07-15 9:49 ` Vesa Suontama
0 siblings, 0 replies; 8+ messages in thread
From: Vesa Suontama @ 2008-07-15 9:49 UTC (permalink / raw)
To: Jason Rumney; +Cc: 549
Hi,
I checked the source code for emacsclient, and it is already full of
ifdefs for windows, one more will not do any harm :)
There could be a quite easy way to make emacsclientw to behave like
emacsclient.exe if it was started from command line, just by attaching
into the console of the calling process. If the process was not
started by console, then do not create console at all, right?
The problem is that I do not have the compilation environment set up.
If I run into too big problems with that, I may not have time.
Vesa
On Tue, Jul 15, 2008 at 11:15 AM, Jason Rumney <jasonr@gnu.org> wrote:
>
>>> It works like this: have emacsclient.com and emacsclient.exe, where
>>> new emacsclient.exe is the old emacsclientw.exe, and emacsclient.com
>>> is just a wrapper that calls the emacsclient and waits for it to
>>> finish (e.g. by using a named event, which emacsclient.com waits).
>>>
>>> The other way around could be to use "AttachConsole" etc. from
>>> emacsclientw (and rename it to emacsclient), but all this is just
>>> guessing
>>> as I do not know the real reason for emacsclientw.
>
> These might be good ideas if Emacs was a Windows program. But since
> Emacs is a cross platform program, it is better to keep emacsclient the
> same as other platforms, and have emacsclientw, which is built from
> identical source code with different compiler switches, to work around
> the deficiency in Windows where it insists on making a console visible
> when you start a console program from the GUI.
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <000001c8e349$30b8e300$922aa900$@suontama@supponor.tv>]
* bug#549: emacsclient or emacsclientw not waiting in Windows
[not found] <000001c8e349$30b8e300$922aa900$@suontama@supponor.tv>
@ 2008-07-12 4:56 ` Stefan Monnier
2008-07-12 7:46 ` Lennart Borgman (gmail)
2008-07-14 15:38 ` Lennart Borgman (gmail)
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2008-07-12 4:56 UTC (permalink / raw)
To: 549
reassign 549 emacs,w32
thanks
> I have a Windows Vista SP1, and when using emacsclient or emacsclientw, they
IIRC `emacsclientw' is not part of Emacs, but only of some derived
packages (EmacsW32, maybe?). So maybe the problem is in those packages.
AFAIK `emacsclient' does wait for the editing to be done before
returning, so please try and reproduce your problem with a vanilla Emacs
(e.g. the one you can download from
http://ftp.gnu.org/pub/gnu/emacs/windows/).
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#549: emacsclient or emacsclientw not waiting in Windows
2008-07-12 4:56 ` Stefan Monnier
@ 2008-07-12 7:46 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 8+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-12 7:46 UTC (permalink / raw)
To: Stefan Monnier, 549
Stefan Monnier wrote:
> reassign 549 emacs,w32
> thanks
>
>> I have a Windows Vista SP1, and when using emacsclient or emacsclientw, they
>
> IIRC `emacsclientw' is not part of Emacs, but only of some derived
> packages (EmacsW32, maybe?). So maybe the problem is in those packages.
emacsclientw is now also part of Emacs on w32. (Though the one that
comes with Emacs+EmacsW32 is a bit different.)
> AFAIK `emacsclient' does wait for the editing to be done before
> returning, so please try and reproduce your problem with a vanilla Emacs
> (e.g. the one you can download from
> http://ftp.gnu.org/pub/gnu/emacs/windows/).
Yes, that is the right thing to do whenever reporting a problem.
(However the versions of emacsclient/w that comes with Emacs+EmacsW32
also waits, so the problem is probably somewhere else.)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#549: emacsclient or emacsclientw not waiting in Windows
[not found] <000001c8e349$30b8e300$922aa900$@suontama@supponor.tv>
2008-07-12 4:56 ` Stefan Monnier
@ 2008-07-14 15:38 ` Lennart Borgman (gmail)
1 sibling, 0 replies; 8+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-14 15:38 UTC (permalink / raw)
To: Vesa Suontama, 549; +Cc: bug-gnu-emacs
Vesa Suontama wrote:
> Hi,
>
> I have a Windows Vista SP1, and when using emacsclient or emacsclientw,
> they always return immediately with return value 1, and do not wait
> making it useless as EDITOR for command line utilities which should wait.
>
> I use the emacsclient from cmd.exe and not from cygwin. I also started
> emacs with –q, and started server manually after that, so no startup
> file should be causing this.
>
> Is this a known issue?
>
> Otherwise I love emacs :)
>
> Vesa
>
> In GNU Emacs 22.2.1 (i386-mingw-nt6.0.6001)
>
> of 2008-03-26 on RELEASE
>
> Windowing system distributor `Microsoft Corp.', version 6.0.6001
I do not have Emacs 22 here. However I just tested with CVS Emacs 23,
both unpatched and the patched version that comes with Emacs+EmacsW32. I
saw no problem, both emacsclient and emacsclientw waited as expected.
Some notes:
- Please use -Q (uppercase), not -q (lowercase). -q will still run
site-start.el
- If you test from a console window (running cmd.exe) then please note
that emacsclientw can not make cmd.exe wait for it. I can't remember the
technical terms for it but w here stands for "window, GUI". Program
linked as GUI applications do not use a console window (by default).
They can not write to a console and if started from a console the
console will not wait for them.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#549: emacsclient or emacsclientw not waiting in Windows
@ 2008-07-11 11:28 Vesa Suontama
0 siblings, 0 replies; 8+ messages in thread
From: Vesa Suontama @ 2008-07-11 11:28 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]
Hi,
I have a Windows Vista SP1, and when using emacsclient or emacsclientw, they
always return immediately with return value 1, and do not wait making it
useless as EDITOR for command line utilities which should wait.
I use the emacsclient from cmd.exe and not from cygwin. I also started emacs
with -q, and started server manually after that, so no startup file should
be causing this.
Is this a known issue?
Otherwise I love emacs :)
Vesa
In GNU Emacs 22.2.1 (i386-mingw-nt6.0.6001)
of 2008-03-26 on RELEASE
Windowing system distributor `Microsoft Corp.', version 6.0.6001
configured using `configure --with-gcc (3.4)'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: FIN
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
encoded-kbd-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
* C-x k <return> ( - <backspace> s e r v e r . - s
<backspace> =8b4 =8b4 <backspace> <backspace> <backspace>
<backspace> - s t a r t ( <backspace> ) C-x C-e <help-echo>
e m a c s <backspace> <backspace> <backspace> <backspace>
<backspace> <escape> x e m a <tab> - b <tab> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> b u g <tab> <return> <backspace> <backspace>
<backspace> r e p o <tab> <tab> r <tab> <return>
Recent messages:
Loading cl-macs...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading server...done
nil
(New file)
When done with a buffer, type C-x #
Making completion list...
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
[-- Attachment #2: Type: text/html, Size: 10087 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-07-15 9:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 6:40 bug#549: emacsclient or emacsclientw not waiting in Windows Vesa Suontama
2008-07-15 7:37 ` Lennart Borgman (gmail)
2008-07-15 8:15 ` Jason Rumney
2008-07-15 9:49 ` Vesa Suontama
[not found] <000001c8e349$30b8e300$922aa900$@suontama@supponor.tv>
2008-07-12 4:56 ` Stefan Monnier
2008-07-12 7:46 ` Lennart Borgman (gmail)
2008-07-14 15:38 ` Lennart Borgman (gmail)
-- strict thread matches above, loose matches on Subject: below --
2008-07-11 11:28 Vesa Suontama
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).