From: Mark H Weaver <mhw@netris.org>
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: emacs packages
Date: Tue, 16 Jun 2015 12:24:00 -0400 [thread overview]
Message-ID: <87a8vzfwpr.fsf@netris.org> (raw)
In-Reply-To: <CAKrPhPP0HYMRuPNVttSxcz1G1WZm8rDnGZfyvbT6pGcwy0h7jQ@mail.gmail.com> (Federico Beffa's message of "Mon, 15 Jun 2015 12:20:56 +0200")
Federico Beffa <beffa@ieee.org> writes:
> (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)))
> (setenv "SHELL" "sh")
> (with-directory-excursion el-dir
> (fold (lambda (f s)
> (and s (zero? (system* emacs "--batch" "-Q" "-L" el-dir
> "-f" "batch-byte-compile" f))))
> #t (find-files "." "\\.el$")))))
FYI, this pattern of using 'fold' with 'and' and a boolean seed would be
more transparent if handled by 'every' from (srfi srfi-1):
(every (lambda (f)
(zero? (system* emacs "--batch" "-Q" "-L" el-dir
"-f" "batch-byte-compile" f)))
(find-files "." "\\.el$"))
However, this won't be needed here if you use 'emacs-batch-eval' or add
'emacs-byte-compile' as suggested by Ludovic, which I agree is the right
approach.
Thanks!
Mark
next prev parent reply other threads:[~2015-06-16 16:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 10:20 emacs packages Federico Beffa
2015-06-15 10:45 ` Mathieu Lirzin
2015-06-16 16:00 ` Ludovic Courtès
2015-06-16 16:21 ` Pjotr Prins
2015-06-17 7:42 ` Federico Beffa
2015-06-17 18:21 ` Alex Kost
2015-06-18 18:32 ` Federico Beffa
2015-06-19 9:56 ` Alex Kost
2015-06-19 12:13 ` Ludovic Courtès
2015-06-19 16:06 ` Federico Beffa
2015-06-21 21:12 ` Ludovic Courtès
2015-06-22 7:30 ` Federico Beffa
2015-06-22 19:43 ` Ludovic Courtès
2015-06-23 6:48 ` Federico Beffa
2015-06-23 12:47 ` Ludovic Courtès
2015-06-16 16:24 ` Mark H Weaver [this message]
2015-06-16 19:31 ` Federico Beffa
2015-06-17 18:42 ` Mark H Weaver
2015-06-17 20:00 ` Alex Kost
2015-06-18 18:24 ` Federico Beffa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8vzfwpr.fsf@netris.org \
--to=mhw@netris.org \
--cc=beffa@ieee.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.