Subject: 30.1; emacsclient.desktop may start a new instance of the daemon

From: Ulrich Müller <[email-masked]>
Date: Mon, 21 Jul 2025 08:44:18 +0200

The desktop file calls emacsclient with the --alternate-editor= option
(with empty option argument). I find this problematic for two reasons:

1. The user may run the Emacs daemon unter the control of the service
manager (like OpenRC or systemd). So in the regular case the option is
not needed because a daemon would always be running.

However, if for some reason the daemon failed to start or if the Emacs
process crashed, then it is very surprising behaviour for emacsclient to
start a "rogue" daemon that isn't under the service manager's control.

2. The user can get the present behaviour (or any other behaviour that
they prefer) by defining the ALTERNATE_EDITOR environment variable in
their startup files. The desktop file is the wrong place to override
the user's configuration with the --alternate-editor= option, therefore
taking away control from the user.