From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: emacs packages Date: Tue, 16 Jun 2015 18:00:44 +0200 Message-ID: <878ubjskwj.fsf@gnu.org> References: 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]:46142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4tIC-0006Eg-6o for guix-devel@gnu.org; Tue, 16 Jun 2015 12:00:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4tI8-0006Dd-0z for guix-devel@gnu.org; Tue, 16 Jun 2015 12:00:51 -0400 In-Reply-To: (Federico Beffa's message of "Mon, 15 Jun 2015 12:20:56 +0200") 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: Federico Beffa Cc: Guix-devel Federico Beffa skribis: > To be concrete about what I'm proposing, attached you find: > > - An ELPA package importer > - An 'emacs-build-system' Sounds very useful to me! > There are a lot of Emacs packages. For this reason I would like to > propose to prefix them with 'emacs-' as we do with Python, ... Sounds good. I think I prefer =E2=80=98emacs-=E2=80=99 to =E2=80=98el-=E2= =80=99 because that=E2=80=99s probably what people expect. > To make those packages automatically available in Emacs without the > need for any code in the user '.emacs' file, I would suggest to > include in our Emacs package site initialization file some custom code > (to activate our ELPA emacs packages) such as the one in the attached > 'guix-elpa.el' file. guix.el already takes care of that (info "(guix) Emacs Initial Setup"), so that should be enough. Some random comments: > ;; Path relative to 'out' where we install ELPA packages. We avoid the > ;; ".../elpa" path as Emacs expects to find the ELPA repository > ;; 'archive-contents' file and the archive signature. > (define guix-elpa-packages-path "/share/emacs/site-lisp/guix.d") Rather %install-suffix (=E2=80=9Cpath=E2=80=9D is used exclusively to refer= to search paths in GNU.) > (define* (build #:key outputs inputs #:allow-other-keys) > "Compile .el files." > (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")) > (out (assoc-ref outputs "out")) > (name-ver (store-dir->elpa-name-version out)) > (el-dir (string-append out guix-elpa-packages-path "/" name-ver)= )) Please align the lets. :-) > (fold (lambda (f s) > (and s (zero? (system* emacs "--batch" "-Q" "-L" el-dir > "-f" "batch-byte-compile" f)))) > #t (find-files "." "\\.el$"))))) Should probably use =E2=80=98emacs-batch-eval=E2=80=99 from (guix build ema= cs-utils), and perhaps define =E2=80=98emacs-byte-compile=E2=80=99 there. > (define* (copy #:key outputs #:allow-other-keys) > "Copy the package content to the installation directory." s/copy/install/ ? > ;; from (guix utils). Should we put it in (guix build utils)? > (define (package-name->name+version name) > "Given NAME, a package name like \"foo-0.9.1b\", return two values: Yes, should probably be moved to (guix build utils) eventually. Thanks for the great initiative! Ludo=E2=80=99.