all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: mhw@netris.org
Cc: guix-devel@gnu.org
Subject: Re: [PATCHES] Add (guix build emacs-utils) and some Emacs packages
Date: Wed, 13 Aug 2014 17:52:42 +0200	[thread overview]
Message-ID: <877g2c8jzp.fsf@gnu.org> (raw)
In-Reply-To: <87y4utm4ju.fsf@netris.org> (mhw@netris.org's message of "Tue, 12 Aug 2014 23:50:13 -0400")

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.

> +(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’.

  reply	other threads:[~2014-08-13 15:52 UTC|newest]

Thread overview: 10+ 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 [this message]
2014-08-13 18:36   ` Mark H Weaver
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
2014-10-14 21:50       ` Mark H Weaver
2014-11-02 22:12       ` Ludovic Courtès
2014-10-14 21:14     ` Ludovic Courtès

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=877g2c8jzp.fsf@gnu.org \
    --to=ludo@gnu.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.