1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 07:31:03 +01:00

services/emacs: Update systemd definitions, drop Emacs 26 support

Emacs 27 added Type=notify support and updated the service definition to
remove the use of `emacsclient' to kill the service. Emacs 28 changes
the `StartupWMClass' in emacsclient.desktop to `Emacsd'. Update our
emacs.service and emacsclient.desktop definitions to match upstream
changes.

When killing emacs.service, the socket is removed, and subsequently
starting the service manually results in a service without a socket.
Prevent this by adding `RefuseManualStart=true' to the service's Unit
definition.

Drop Emacs 26 support as it is no longer shipped in nixpkgs. Update the
tests to verify the following configuration scenarios:

- Emacs version: 27, 28
- Socket activation: disabled, enabled
This commit is contained in:
Tad Fisher 2021-05-23 13:24:30 -07:00 committed by Robert Helgesson
parent e9ed9c2e11
commit ac82c036d8
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
13 changed files with 97 additions and 67 deletions

View file

@ -1,9 +0,0 @@
[Service]
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon='%t/emacs/server'"
ExecStop=@emacs@/bin/emacsclient --eval '(kill-emacs 0)'
Restart=on-failure
[Unit]
Description=Emacs: the extensible, self-documenting text editor
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
X-RestartIfChanged=false