Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

10
  • I think I need a bit more detail. Consider the desktop save-file lock I mention in the comment to the bounty above. How would one go about changing the Warning: desktop file appears to be in use by PID xxx. Using it may cause conflicts. Use it anyway? (y or n) prompt into an error, without specifically referring to "desktop" in some way (because that way, being nongeneral, lies whack-a-mole)? Commented Apr 2, 2019 at 17:05
  • Stefan, also there's an issue that doesn't bother me because I don't run the Emacs daemon this way, but to make a generally useful answer might need addressing: erroring out fatally will cause Emacs started up via systemd or other watchdogs to restart in a loop. But ignoring errors and just logging to *Messages* is probably insufficient heads-up on first client connect that something may be seriously awry and need immediate attention before the user attempts any stateful operations. Commented Apr 2, 2019 at 17:08
  • (To clarify for those who don't use the daemon—if you start it manually, either via emacs --daemon or by starting emacsclient with the ALTERNATE_EDITOR environment variable set to the empty string, you will see the output that ordinarily goes to *Messages* echoed in the terminal until the daemon completes initialization and Emacs is ready. But many have Emacs start the daemon at system startup or login time, and the output is either logged or thrown away. Commented Apr 2, 2019 at 17:11
  • 1
    @Trey: the error signaling shouldn't be in desktop but in the y-or-n-p function (or lower yet). We have some mechanism to delay displaying errors that happened during startup, so we could use that to display them when the first emacsclient connects to the daemon. Commented Apr 2, 2019 at 17:15
  • In either case, though, most users don't peruse *Messages*—and while the little-used *Warnings* system does pop up a window to the buffer if an active frame exists when the warning is generated, in this case, no frame exists, and it doesn't appear easy to defer the pop-up until the first emacsclient following the warning's issue. If that could be done, your suggestion of making a pre-client yes-or-no-p warn instead would be quite ideal. (I doubt users comb *Messages* on startup!) Commented Apr 2, 2019 at 17:16