Skip to content

Commit

Permalink
fix(emacs): EDITOR and TEXEDIT
Browse files Browse the repository at this point in the history
  • Loading branch information
rennsax committed Sep 10, 2024
1 parent 596e5c5 commit a9a4bac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let
# Use a editor wrapper script, instead of simple "emacs -Q -nw", so some
# programs like crontab(1) can find the file.
editorWrapper = pkgs.writeShellScript "editor-wrapper" ''
emacs -Q -nw "$@"
emacs -nw "$@"
'';
in
with lib;
Expand All @@ -24,9 +24,10 @@ with lib;
};

config = mkIf cfg.enable {
home.sessionVariables = {
# TODO: enable Emacs to startup at "simple" mode.
home.sessionVariables = rec {
EDITOR = "\${EDITOR:-${editorWrapper}}";
# See "(web2c) Editor invocation".
TEXEDIT = "${EDITOR} +%d %s";
};
};

Expand Down

0 comments on commit a9a4bac

Please sign in to comment.