Subject: Re: bug#79066: 30.1; emacsclient.desktop may start a new instance of the daemon

From: Eli Zaretskii <[email-masked]>
Date: Mon, 21 Jul 2025 15:00:20 +0300

> 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.

<rant>
I can only reiterate my deep unhappiness that we agreed to add these
files to the Emacs distribution, and thus agreed to maintain it.  I
think this should be the job of the downstream distributions: they
know much better how the Emacs server is started, and thus can do a
much better job with the file.

One of these days I will simply remove these desktop files from the
tree.
</rant>