From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: Howto run guix.el correctly? Date: Mon, 1 Dec 2014 18:15:07 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvUZ8-0003ZC-2u for guix-devel@gnu.org; Mon, 01 Dec 2014 12:15:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvUZ2-000823-JB for guix-devel@gnu.org; Mon, 01 Dec 2014 12:15:14 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: ludo@gnu.org, Guix-devel , Alex Kost ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Alex Kost skribis: > >> Ludovic Court=C3=A8s (2014-11-27 01:41 +0300) wrote: > > [...] > >>>> The problem is that I don't understand what these %standard-emacs-phas= es >>>> should be, >>> >>> (define %standard-emacs-phases >>> (alist-cons-after >>> 'install 'post-install >>> (lambda* (#:key outputs #:allow-other-keys) >>> (install-autoloads (assoc-ref outputs "out"))) >>> %standard-phases)) >> >> Sorry, I didn't get how it would work. I realized that I don't >> understand how there could be a generalized =E2=80=98install-autoloads= =E2=80=99 >> procedure as it should do different things for different packages. > AFAIU the initialization of each package is already defined inside each package by the author. The way emacs's packaging infrastructure works goes along the lines (see (elisp) Packaging Basics): * At installation: - Search every Lisp file in the content directory for autoload magic comments (*note Autoload::). These autoload definitions are saved to a file named `NAME-autoloads.el' in the package's content directory. - Byte-compiles every Lisp file in the package. - Add the package's content directory to `load-path', and evaluates the autoload definitions in `NAME-autoloads.el'. * At startup: - Emacs scans for a predefined directory for NAME-autoloads.el files and evaluates them ('package-initialize' function). We could maybe exploit 'after-init-hook' or something something similar. Regards, Fede