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

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

Re: Dialog from emacsclientw.exe must be dismissed (was RE: Best practic


From: Juanma Barranquero
Subject: Re: Dialog from emacsclientw.exe must be dismissed (was RE: Best practices for launching Emacs on Windows 7/8)
Date: Fri, 28 Jun 2013 00:14:40 +0200

On Thu, Jun 27, 2013 at 11:27 PM, Ludwig, Mark <ludwig.mark@siemens.com> wrote:

> How do you configure Emacs on Windows?  Do you use emacsclientw to do
> anything like what I'm trying to do (make double-clicking on an
> associated file "just work" no matter whether Emacs is already
> running)?

I don't use file associations for Emacs. I'm a console guy through and
through, and launch almost everything from CMD (or, truth be told,
from TCC, the command line part of TakeCommand, a commercial product).

But as for the alternate editor: If you always use the -n/--no-wait
command line arg there's not much difference, but if you want
emacsclient.exe to stay connected to Emacs and wait for the user to
finish editing the file, "emacsclient MYFILE" is quite different of
running "alternate-editor MYFILE", because currently there's no way to
start the alternate Emacs editor and make it "connect back" to
emacsclient. Lennart Borgman's EmacsW32 was patched to allow it, and
seems to be a well liked feature, but his changes to emacsclient.c
have never been integrated back into Emacs proper.

What I do is run emacs from a script (a .CMD batch file) which makes
sure that emacs.exe is running and ready to answer client requests. If
not, it starts emacs and waits until it is. Only then does my script
call emacsclient.exe. It's a bit convoluted, but it works.

> Especially on W7/8, it's become impossible to configure non-trivial
> associations in the GUI, because there is no ability to specify the
> command name or any options.

You could write a trivial C program to run whatever you want via
system() (or execvp() and friends) and use that in the association.

    Juanma



reply via email to

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