GNU bug report logs - #28832
[PATCH 0/3] gnu: Add emacs-json-mode.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Sat, 14 Oct 2017 09:53:01 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alex Kost <alezost <at> gmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 19 Dec 2017 23:57:33 +0300
Oleg Pykhalov (2017-12-19 13:46 +0300) wrote:

[...]
> +  (for-each (match-lambda
> +              ((name . input)
> +               (setenv "EMACSLOADPATH"
> +                       (string-append
> +                        (or (getenv "EMACSLOADPATH") "")
> +                        ":" input %install-suffix "/"
> +                        ((compose (lambda (name version)
> +                                    (string-append
> +                                     (string-drop name
> +                                                  (string-length "emacs-"))

I would move this code into its own 'string-drop-emacs' function (as you
did in the previous patch) and I would make it more robust: there is a
problem with this code: (string-drop "geiser" 6) does not return what
you mean, and (string-drop "dash" 6) errors!  I think we shouldn't rely
on the assumption that all emacs inputs have "emacs-" prefix, so I think
this procedure should check whether the input name begins with "emacs-"
before trying to remove this substring.

> +                                     "-" version))
> +                                  name+version)
> +                         input)))))
> +            (fold alist-delete (emacs-inputs inputs) '("emacs" "source")))

Since you already take only emacs inputs, is it really needed to remove
"emacs" and "source"?  I mean emacs inputs do not contain "emacs" and
"source" anyway, right?

-- 
Alex




This bug report was last modified 7 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.