Closed Anton-Latukha closed 4 years ago
@worldofpeace you recently changed these emacs options.
Currently I am rebuilding into the previous commit, which is before marked above emacs
options change. The prior master
state is 5669b062356b5d5b8019ecc706a70d75ec30da0f.
...
pycairo
failed the build. Better lack next time.
On d484f2b7fc0834a068e8ace851faa449a03963f5 I couldn't reproduce the systemd service not working or existing. And this was under a GTK environment.
https://github.com/NixOS/nixpkgs/commit/cc125810cb4f305c5bcee937648ff3704f13c472#diff-754738b9bf80ce26b4b69e5e7216cb28 should have been a no-op because that exact environment variable was set in a different module, just now globally https://github.com/NixOS/nixpkgs/blob/58f090cc7b92edfee8c390b5a131a1417273c590/nixos/modules/programs/environment.nix#L24.
What environment are you using emacs under?
SDDM & KDE Plasma 5, as I mentioned in Reproducing.
I also right away thought that it must be GTK in Plasma thing.
But how variable can cause service to not appear.
Thanks, I should have read better :smile: . I will try this in plasma 5.
Also in commit what was deleted in emacs
, was
GTK_DATA_PREFIX = "${config.system.path}";
} // (if cfg.defaultEditor then {
EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor";
} else {}
I did not have that cfg.defaultEditor
systemwide or in user (EDITOR == nano
(facepalm shame)).
So that if
results in {}
.
Seems I found the effect. Look at the full code replaced:
environment.variables = {
# This is required so that GTK applications launched from Emacs
# get properly themed:
GTK_DATA_PREFIX = "${config.system.path}";
} // (if cfg.defaultEditor then {
EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor";
} else {});
That means that to:
{
# This is required so that GTK applications launched from Emacs
# get properly themed:
GTK_DATA_PREFIX = "${config.system.path}";
}
if
default editor is emacs
=>
EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor"
Else - add to the set {}
, aka add Nothing
.
What got inserted:
environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "${editorScript}/bin/emacseditor");
If cfg.defaultEditor
- EDITOR = mkOverride 900 "${editorScript}/bin/emacseditor"
Else - force EDITOR = [ ]
, aka force EDITOR = Empty list
.
So before in else
case - EDITOR
war was not touched. And after this commit in else
EDITOR
becomes empty.
Since: https://github.com/NixOS/nixpkgs/blob/c277a508fceb086eb4e71682957d731447d08b74/lib/modules.nix#L408 Pam-pam pam.
So, seems like new code always modifies the EDITOR variable, it is or Emacs or nothing. Which I am keen for that BTW :slightly_smiling_face:. Or do I not know the Nix enough, and there some very strange case that the EDITOR = [ ]
does not declare an empty value of a variable.
Probably the proper thing is I just need to fix this moment and not talk about. And thank you for all your work.
I troubleshooted this.
This was a mis-bugreport, changed the header.
Description
(the cause of this report, was remains of soft link in
~/.config/systemd/user/
and leftovers of overrides in~/.config/systemd/user/emacs.service.d/
)services.emacs.install
used to provide me a systemd user service. Which was as such available bysystemctl --user {cat, enable, start, edit} emacs.service
.After recent update (~a week ago), service dissapeared. I am on
nixos-unstable
, so the change causing this, is probably https://github.com/NixOS/nixpkgs/commit/cc125810cb4f305c5bcee937648ff3704f13c472#diff-754738b9bf80ce26b4b69e5e7216cb28services.emacs.enable
also does not work, does not provide me a user service.Checked that there is also not any service for
root
.Reproducing
nixos-unstable
.emacs
Expected behavior
Keys
services.emacs.{enable, install}
to provide services as before, for which they was created & according to documentation.Additional context Add any other context about the problem here.
Metadata
"x86_64-linux"
Linux 4.19.74, NixOS, 20.03pre193781.d484f2b7fc0 (Markhor)
yes
yes
nix-env (Nix) 2.3
"nixos, unstable-20.03pre193781.d484f2b7fc0"
""
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information: