[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
From: |
Alex Kost |
Subject: |
[bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat. |
Date: |
Tue, 19 Dec 2017 23:57:33 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
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
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Ludovic Courtès, 2017/12/01
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/11
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Ludovic Courtès, 2017/12/12
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/15
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Ludovic Courtès, 2017/12/15
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/19
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.,
Alex Kost <=
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/19
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Alex Kost, 2017/12/20
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/21
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Alex Kost, 2017/12/22
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Alex Kost, 2017/12/15
- [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat., Oleg Pykhalov, 2017/12/19