[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCHES] Add (guix build emacs-utils) and some Emacs packages
From: |
Ludovic Courtès |
Subject: |
Re: [PATCHES] Add (guix build emacs-utils) and some Emacs packages |
Date: |
Wed, 13 Aug 2014 17:52:42 +0200 |
User-agent: |
Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux) |
address@hidden 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.
> +(define-syntax emacs-substitute-vars
Perhaps ‘emacs-substitute-variables’? (I try to avoid abbreviations in
public names.)
> + (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.
> + (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?
> + (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 ?
> + (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.
Feel free to push with these changes.
Thanks for all of this!
Ludo’.