bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8783: 24.0.50; emacsclientw.exe behaviour in win32 not the same as i


From: Eli Zaretskii
Subject: bug#8783: 24.0.50; emacsclientw.exe behaviour in win32 not the same as in linux
Date: Thu, 02 Jun 2011 05:26:32 -0400

> Date: Thu, 02 Jun 2011 14:35:47 +1000
> From: Jason Lewis <address@hidden>
> 
> When I try to launch emacs in win32 using emacsclientw.exe it does not
> seem to work as expected.
> 
> on my linux box if I start emacs with either:
> 
> emacsclient -c -a ""
> emacsclient -c -a "" somefile.txt
> 
> it will start emacs in daemon mode or start a client as necessary

First, there's no equivalent of emacsclientw.exe on GNU/Linux.  You
will be better off comparing with emacsclient on Windows.

Second, the Windows build does not (yet) support the daemon mode.  I
think this explains some of the differences in behavior that you
report.  See below.

> however on windows with the slightly different version:
> 
> C:\Users\jason\AppData\Roaming>"c:\Program Files
> (x86)\Emacs\emacs\bin\emacsclientw.exe" -c
> --alternate-editor="c:\Program Files
> (x86)\Emacs\emacs\bin\runemacs.exe" test.txt
> 
> it will open a new emacs instance editing text.txt

Which is as expected, right?  (Please tell explicitly which behavior
you think is problematic, because otherwise we need to guess.)

> but then if you run:
> 
> C:\Users\jason\AppData\Roaming>"c:\Program Files
> (x86)\Emacs\emacs\bin\emacsclientw.exe" -c
> --alternate-editor="c:\Program Files
> (x86)\Emacs\emacs\bin\runemacs.exe" someotherfile.txt
> 
> it fails to open someotherfile.txt in the existing frame (and does not
> create a new frame either)

AFACT, the -c option is not really supported in the Windows build,
because it generally needs the --display argument which Windows
doesn't support.

> further more, while emacs is already running
> if you run:
> 
> C:\Users\jason\AppData\Roaming>"c:\Program Files
> (x86)\Emacs\emacs\bin\emacsclientw.exe" --alternate-editor="c:\Program
> Files (x86)\Emacs\emacs\bin\runemacs.exe" test.txt    (no -c option)
> emacs will correctly open the desired file

As expected, right?

> however:
> C:\Users\jason\AppData\Roaming>"c:\Program Files
> (x86)\Emacs\emacs\bin\emacsclientw.exe" --alternate-editor="c:\Program
> Files (x86)\Emacs\emacs\bin\runemacs.exe"     (no -c option and no
> file name to open)
> 
> emacs gives the error: file name or argument required, in a window and
> then aborts and does not either open emacs, nor go to the emacs frame
> if it is already running.

Expected or not?  If not, why not?

> This does not seem to be the desired behaviour overall. it makes it
> difficult to make 1 command to either launch emacs or open an existing
> instance of emacs with a new file.

??? If you don't use the -c switch, it should behave as you want:
start a new editor if there's no existing one, and otherwise connect
to the existing one.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]