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


Message #27 received at 75812 <at> debbugs.gnu.org (full text, mbox):

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Ship Mints <shipmints <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Andrea Corallo <acorallo <at> gnu.org>,
 stefankangas <at> gmail.com, 75812 <at> debbugs.gnu.org, app-emacs-dev <at> janestreet.com
Subject: Re: bug#75812: 29.2.50; Support native-compiling package-install
 from batch Emacs
Date: Wed, 23 Apr 2025 12:26:44 -0400
Conveniently there's already a hook, native-comp-async-all-done-hook,
which gets called when the async native compilation is done.  I just
need to synchronously wait for that hook to be called.

So what about something like this?

(defun native-comp-async-wait-for-all-done ()
  (unless (zerop (comp--async-runnings))
    (let* ((native-comp-finished-pipe (make-pipe-process :name "native-comp-finished"))
           (native-comp-async-all-done-hook (list (lambda () (delete-process native-comp-finished-pipe)))))
      (accept-process-output native-comp-finished-pipe))))

The use of a pipe process is weird, but I don't know of a better way to
wait for a hook to be called.

---------------------

There's another related issue for the packaging use case I mentioned in
my original email: The .eln files are placed in ~/.emacs.d/eln-cache/ by
default when doing this native compilation.  That complicates building
and installing these packages independently.  Is there a way to put the
.eln files for a package in that individual package directory instead?
The same directory as the .el and .elc files.  The packages are
recompiled for each new Emacs version anyway, so I think this should be
safe from a versioning perspective.




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.