From: Alex Kost <alezost@gmail.com>
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH 1/5] import: Add 'elpa' importer
Date: Sun, 21 Jun 2015 23:39:42 +0300 [thread overview]
Message-ID: <87wpyw6bjl.fsf@gmail.com> (raw)
In-Reply-To: <CAKrPhPN48XUm0wXC5OakY1Wrt2Wup6WU645pBdORGpvQZFp34g@mail.gmail.com> (Federico Beffa's message of "Sun, 21 Jun 2015 10:28:27 +0200")
Hi, I've tried this elpa importer and it is great!!
I don't have real comments on code, just some nitpicks.
Federico Beffa (2015-06-21 11:28 +0300) wrote:
> From 8796b32a1ff8d565c3eb9874cde6a4a14d0b4f3b Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Tue, 16 Jun 2015 10:50:06 +0200
> Subject: [PATCH 1/5] import: Add 'elpa' importer.
>
> * guix/import/elpa.scm: New file.
> * guix/scripts/import.scm: Add "elpa" to 'importers'.
> * guix/scripts/import/elpa.scm: New file.
> * Makefile.am (MODULES): Add 'guix/import/elpa.scm' and
> 'guix/scripts/import/elpa.scm'. (SCM_TESTS): Add 'tests/elpa.scm'.
AFAIK the convention is to put "(...): ..." on a separate line:
* Makefile.am (MODULES): Add 'guix/import/elpa.scm' and
'guix/scripts/import/elpa.scm'.
(SCM_TESTS): Add 'tests/elpa.scm'.
[...]
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 46dccb8..3ca105a 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -3770,6 +3770,33 @@ package name by a hyphen and a version number as in the following example:
> @example
> guix import hackage mtl-2.1.3.1
> @end example
> +
> +@item elpa
> +@cindex elpa
> +Import meta-data from an Emacs ELPA package repository.
> +
> +Specific command-line options are:
> +
> +@table @code
> +@item --archive=@var{repo}
> +@itemx -a @var{repo}
> +@var{repo} identifies the archive repository to from which to retrive
Redundant "to" (before "from")? And a typo in "retrieve".
[...]
> +(define* (elpa-package->sexp pkg)
There are some trailing spaces in this procedure:
> + "Return the `package' S-expression for the Emacs package PKG, a record of
> +type '<elpa-package>'."
> +
here^
> + (define name (elpa-package-name pkg))
> +
here^
> + (define version (elpa-package-version pkg))
> +
here^
> + (define source-url (elpa-package-source-url pkg))
> +
here^
> + (define dependencies
> + (let* ((deps (elpa-package-inputs pkg))
> + (names (filter-dependencies (elpa-dependencies->names deps))))
> + (map (lambda (n)
> + (let ((new-n (elpa-name->package-name n)))
> + (list new-n (list 'unquote (string->symbol new-n)))))
> + names)))
> +
here^
> + (define (maybe-inputs input-type inputs)
> + (match inputs
> + (()
> + '())
> + ((inputs ...)
> + (list (list input-type
> + (list 'quasiquote inputs))))))
> +
here^
[...]
> +;;; Command-line options.
> +;;;
> +
> +(define %default-options
> + '((repo . "gnu")))
> +
> +(define (show-help)
> + (display (_ "Usage: guix import elpa PACKAGE-NAME
> +Import the latest package named PACKAGE-NAME from an ELPA repository.\n"))
> + (display (_ "
> + -a ARCHIVE, --archive=ARCHIVE specify the archive repository"))
I think we don't duplicate an option argument (see "guix package --help"
for example):
-a, --archive=ARCHIVE specify the archive repository
--
Alex
next prev parent reply other threads:[~2015-06-21 20:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-21 8:28 [PATCH 1/5] import: Add 'elpa' importer Federico Beffa
2015-06-21 20:39 ` Alex Kost [this message]
2015-06-24 16:15 ` Federico Beffa
2015-06-24 21:06 ` Ludovic Courtès
2015-06-25 18:33 ` Federico Beffa
2015-06-27 8:13 ` Federico Beffa
2015-06-27 10:08 ` 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
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=87wpyw6bjl.fsf@gmail.com \
--to=alezost@gmail.com \
--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 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).