GNU bug report logs - #75812
29.2.50; Support native-compiling package-install from batch Emacs

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Fri, 24 Jan 2025 17:55:02 UTC

Severity: wishlist

Tags: confirmed

Found in version 29.2.50

Full log


View this message in rfc822 format

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: 75812 <at> debbugs.gnu.org
Cc: app-emacs-dev <at> janestreet.com, Stefan Kangas <stefankangas <at> gmail.com>
Subject: bug#75812: 29.2.50; Support native-compiling package-install from batch Emacs
Date: Fri, 24 Jan 2025 12:54:08 -0500
Currently, setting package-native-compile to t will make package-install
asynchronously native-compile the package.  This works great for
interactive usage.

However, this is unsuitable for a batch Emacs running package-install.
"emacs -batch --eval (package-install something)" will exit once the
package is installed, but before the asynchronous native compilation
completes; the native compilation will just be abandoned.  So,
currently, there's no straightforward way to native compile a package
from a batch Emacs.

Running package-install from a batch Emacs is useful as a way to update
or pre-install packages in scripts, without requiring user interaction.
This is widely used by package managers like Nix or dpkg to install
Emacs packages as OS packages.  In my specific case, it's used to
install and byte-compile common packages into site-lisp.  In all these
cases, it would be nice to be able to native-compile the package at
installation time and include the .eln files in the package directory.

A straightforward solution would be for package-install-file to support
synchronously native-compiling the installed package, such that after
package-install finishes running, the native compilation is complete.
Perhaps with a new value of package-native-compile?




This bug report was last modified 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.