git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #114364 from midchildan/fix/emacswithpackages

emacsWithPackages: prevent the UI showing prematurely during startup

commit4543448b747a662936b774379714cfe2553f38dd authoradisbladis <adisbladis@gmail.com> dateThu 25 Feb 2021, 18:10 (6 years ago) parente8f69f47208e57
1 file changed+7−1
pkgs/build-support/emacs/wrapper.nix+7−1
pkgs/build-support/emacs/wrapper.nix+7−1
@@ -147,9 +147,15 @@ runCommand
147147 # Begin the new site-start.el by loading the original, which sets some
148148 # NixOS-specific paths. Paths are searched in the reverse of the order
149149 # they are specified in, so user and system profile paths are searched last.
150+ #
151+ # NOTE: Avoid displaying messages early at startup by binding
152+ # inhibit-message to t. This would prevent the Emacs GUI from showing up
153+ # prematurely. The messages would still be logged to the *Messages*
154+ # buffer.
150155 rm -f $siteStart $siteStartByteCompiled $subdirs $subdirsByteCompiled
151156 cat >"$siteStart" <<EOF
152− (load-file "$emacs/share/emacs/site-lisp/site-start.el")
157+ (let ((inhibit-message t))
158+ (load-file "$emacs/share/emacs/site-lisp/site-start.el"))
153159 (add-to-list 'load-path "$out/share/emacs/site-lisp")
154160 (add-to-list 'exec-path "$out/bin")
155161 ${optionalString nativeComp ''