From: Alex Kost <alezost@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org, Federico Beffa <beffa@ieee.org>
Subject: Re: emacs packages
Date: Wed, 17 Jun 2015 23:00:23 +0300 [thread overview]
Message-ID: <87wpz2rtpk.fsf@gmail.com> (raw)
In-Reply-To: <87ioamdvmd.fsf@netris.org> (Mark H. Weaver's message of "Wed, 17 Jun 2015 14:42:50 -0400")
Mark H Weaver (2015-06-17 21:42 +0300) wrote:
> Federico Beffa <beffa@ieee.org> writes:
>
>> What do you think about the attached implementation?
>
> [...]
>
>> +(define (emacs-byte-compile files)
>> + "Byte compile FILES, a list of file names."
>> + (if (pair? files)
>> + (for-each (lambda (f)
>> + (let ((expr `(let ()
>> + (push ,(dirname f) load-path)
>> + (byte-compile-file ,f))))
>> + (emacs-batch-eval expr)))
>> + files)
>> + (error "emacs-byte-compile failed: not a list of files!" files)))
>> +
>
> I would prefer to let an emacs expert (Alex?) comment on this, but here
(I don't consider myself an expert, I'm definitely much less experienced
with Emacs than you or Ludovic.)
> are some preliminary comments:
>
> * I wouldn't bother checking the type of 'files', since 'for-each' will
> do that. Also, () is a list but not a pair.
>
> * Maybe use 'progn' instead of 'let ()' ?
>
> * Instead of launching a separate emacs process for each file, how about
> passing the list of filenames into emacs and do the loop within emacs
> itself?
I totally agree with these comments. However since the goal is to
compile all elisp files in some directory, perhaps we may just use
'byte-recompile-directory' instead of looping 'byte-compile-file'.
Also I think there is a problem. An emacs package can require other
packages, so for a successful compiling, 'load-path' should be augmented
not only with the directory of the original package, but with the
directories of the required packages as well.
--
Alex
next prev parent reply other threads:[~2015-06-17 20:00 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
2015-06-16 19:31 ` Federico Beffa
2015-06-17 18:42 ` Mark H Weaver
2015-06-17 20:00 ` Alex Kost [this message]
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=87wpz2rtpk.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=beffa@ieee.org \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.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.