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: Thu, 27 Jun 2013 16:01:33 +0200

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

> I was not aware that I was not exiting Emacs, but in a hard Windows
> abort/restart, of course, there is no opportunity to exit Emacs.
> Still, I appreciate that the problem is arguably external to Emacs.

It is difficult to fix from Emacs. Even if we used WM_ENDSESSION to
clean up the server file, that would only work for "clean" exists, not
crashes. And even so, Windows 7 has a hard time limit for shutdown and
it's not guaranteed that you'll have time to do proper cleanup.

> That said, the pop-up error really shouldn't need dismissal by the
> user when there is either ALTERNATE_EDITOR or --alternate-editor.  In
> that configuration, it's not clear that the error should even be
> reported -- except perhaps as a warning (to inform the user why the
> alternate editor was launched).

The error says that emacsclientw found a server file for a process it
could not connect. That is useful. For example, emacs could still be
running, just not attending to server connections for some reason.
It's better to give the user the information *and* let him decide (by
clicking on OK, or doing something else) how to fix things.

As for a workaround, I can think of two: set some .CMD script in the
StartUp folder to clean any stale server file. Or, if running Emacs is
part of most or all of your Windows sessions, start Emacs itself
(perhaps with --iconic) from StartUp, so it takes care of the stale
file and the first emacsclientw.exe will already find it running and
ready to serve.

    Juanma



reply via email to

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