From: Mark H Weaver <mhw@netris.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCHES] Add (guix build emacs-utils) and some Emacs packages
Date: Wed, 13 Aug 2014 14:36:49 -0400 [thread overview]
Message-ID: <87d2c4tewu.fsf@yeeloong.lan> (raw)
In-Reply-To: <877g2c8jzp.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 13 Aug 2014 17:52:42 +0200")
ludo@gnu.org (Ludovic Courtès) writes:
> mhw@netris.org skribis:
>
>> I've attached patches to add new packages for 'magit', 'paredit',
>> 'emacs-w3m', and 'emacs-wget'. While working on these packages, I found
>> that I needed a way to substitute multi-line s-expressions in the elisp
>> code, in order to replace initializers for variables.
>
> This looks very cool. I had started looking at EMMS and
> substitute-sexps and substitute-vars will be very helpful in such cases.
>
>> The approach I took was to create a new module (guix build emacs-utils)
>> containing utilities that use Emacs itself to perform the substitutions.
>>
>> What do you think?
>
> I think it’s great!
>
> Comments below:
>
>> +(define %emacs
>> + ;; The `emacs' command.
>> + (make-parameter "emacs"))
>
> It should be exported.
Indeed!
>> +(define-syntax emacs-substitute-vars
>
> Perhaps ‘emacs-substitute-variables’? (I try to avoid abbreviations in
> public names.)
Okay, sounds good.
>> + (let* ((emacs (string-append (assoc-ref %build-inputs "emacs")
>> + "/bin/emacs"))
>> + (source (assoc-ref %build-inputs "source"))
>> + (lisp-dir (string-append %output
>> + "/share/emacs/site-lisp"))
>> + (target (string-append lisp-dir "/paredit.el")))
>
> I find it nicer when the RHSs of ‘let’ are aligned.
Agreed.
>> + (unless (zero? (system*
>> + emacs "--quick" "--batch"
>> + (format #f "--eval=~S"
>> + '(byte-compile-file "paredit.el"))))
>> + (error "failed to compile paredit.el!")))))))
>
> Perhaps this calls for an ‘emacs-batch-eval’ procedure?
Good idea.
>> + (source (origin
>> + (method url-fetch)
>> + (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_"
>> + version ".orig.tar.gz"))
>
> What about using http://emacs-w3m.namazu.org/emacs-w3m-1.4.4.tar.gz ?
Alas, it is nearly 10 years old, and does not work with Emacs 24.
Attempts to compile it result in several occurrences of the following
error message:
Emacs-w3m of this version does not support Emacs 24; try the
development version
>> + (synopsis "A simple web browser for emacs, based on w3m.")
>
> Just “Simple Web browser for Emacs based on w3m”, with no period.
>
>> + (synopsis "A simple file downloader for emacs, based on wget.")
>
> Likewise.
Thanks, I'll post an updated patch soon.
Mark
next prev parent reply other threads:[~2014-08-13 18:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 3:50 [PATCHES] Add (guix build emacs-utils) and some Emacs packages mhw
2014-08-13 15:52 ` Ludovic Courtès
2014-08-13 18:36 ` Mark H Weaver [this message]
2014-08-13 19:06 ` Guix unable to download from github due to TLS fatal alert Mark H Weaver
2014-08-13 21:56 ` Ludovic Courtès
2014-10-14 21:14 ` bug#18524: " Ludovic Courtès
2014-10-14 21:50 ` Mark H Weaver
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2c4tewu.fsf@yeeloong.lan \
--to=mhw@netris.org \
--cc=guix-devel@gnu.org \
--cc=ludo@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).