GNU bug report logs -
#28832
[PATCH 0/3] gnu: Add emacs-json-mode.
Previous Next
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
Message #47 received at 28832 <at> debbugs.gnu.org (full text, mbox):
Hello, I have only one addition to the Ludovic's comments.
Oleg Pykhalov (2017-12-15 12:36 +0300) wrote:
[...]
> +(define* (setup-environment #:key inputs #:allow-other-keys)
> + "Export the variable EMACSLOADPATH, which are based on INPUTS respectively."
> + (let* ((filtered-inputs (emacs-inputs inputs))
> + (emacs-input-dir (cdr (assoc "emacs" filtered-inputs)))
> + (inputs-dirs (cdr filtered-inputs)))
> + ;; EMACSLOADPATH is where Emacs looks for the source code of the build's
> + ;; dependencies.
> + (setenv "EMACSLOADPATH"
> + (string-append emacs-input-dir "/share/emacs/"
> + (store-directory->package-version emacs-input-dir)
> + "/lisp"))
> + (for-each
> + (lambda (input)
> + (let ((store-item (cdr input)))
> + (setenv "EMACSLOADPATH"
> + (string-append
> + (or (getenv "EMACSLOADPATH") "")
> + ":" store-item %install-suffix "/"
> + ((compose string-drop-emacs store-directory->package-name)
> + store-item)))))
> + ((compose (lambda (inputs) (alist-delete "emacs" inputs))
> + (lambda (inputs) (alist-delete "source" inputs)))
"emacs" and "source" may not be the only inputs that should be deleted.
For example, 'emacs-exwm-x' package also has "xhost" and "dbus" inputs.
And your 'string-drop-emacs' will fail on these names, right?
Since there is 'emacs-package?' function in this module, perhaps it
would be better to use it instead (to add only emacs packages to
EMACSLOADPATH), WDYT?
P.S. Actually, I didn't test your patch, so maybe I just didn't
understand the code properly :-)
--
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.