emacs: test and work around upstream bug#81105 (#528764)

This commit is contained in:
LIN, Jian
2026-06-11 12:19:31 +00:00
committed by GitHub
2 changed files with 16 additions and 0 deletions
@@ -15,6 +15,10 @@ runCommand "test-emacs-withPackages-wrapper"
))
git # needed by magit
];
env = {
# emulate a default NixOS env where INFOPATH is set like this (not ending with a ":")
INFOPATH = "/fake-info-dir1:/fake-info-dir2";
};
}
''
emacs --batch --eval="(require 'magit)"
@@ -23,5 +27,9 @@ runCommand "test-emacs-withPackages-wrapper"
# transitive dependencies should be made available
# https://github.com/NixOS/nixpkgs/issues/388829
emacs --batch --eval="(require 'flx)"
# test that https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81105 is fixed or worked around
emacs --batch --eval='(progn (package-activate-all) (info "(magit)Top"))'
touch $out
''
@@ -72,6 +72,14 @@ least specific (the system profile)"
(nix--profile-paths))
woman-manpath)))
;;; Make info manuals of installed elisp pkgs available (work around Emacs bug#81105)
(when-let* ((path (getenv "INFOPATH")))
;; Normally, Emacs 31 extends `Info-default-directory-list' when activating elisp pkgs.
;; We add a trailing path-separator ":" to INFOPATH when needed
;; to ensure `Info-default-directory-list' is used to initialize `Info-directory-list'.
(unless (string-suffix-p path-separator path)
(setenv "INFOPATH" (concat path path-separator))))
;;; Make tramp work for remote NixOS machines
(defvar tramp-remote-path)
(eval-after-load 'tramp