[PATCH] Improvements for our Emacs build system and fixes.

  • Done
  • quality assurance status badge
Details
2 participants
  • Arun Isaac
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 1 Apr 2018 17:57
(name . guix-patches)(address . guix-patches@gnu.org)
87y3i6538o.fsf@gmail.com
Hello Guix!

This patch set strengthens our Emacs build system by enforcing strict
byte compilation of every Guix package using the `emacs-build-system'.

Before, errors during byte compilation would not signal a failure of the
build.

It also adds a custom check phase to make it easy to run any kind of
program or script that might be used as a test runner (commonly
ert-runner, sometimes make, etc.).

I've validated that our Emacs packages (at least those whose name start by
'emacs-') can be successfully built with those changes (240 were built
locally). Most of the patches below were necessary fixes to our Emacs
packages so that they could be successfully byte compiled.

Happy April Fools' Day ;)

Maxim
From 103834761802992380d45e31c5e8c833772aed90 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 29 Mar 2018 20:52:41 -0400
Subject: [PATCH 01/27] emacs-build-system: Consider all inputs for Elisp
dependencies.

* guix/build/emacs-build-system.scm (emacs-inputs): Remove.
(emacs-inputs-directories): Rename to...
(inputs->directories): this, and adapt for any input.
(emacs-input->el-directory): Rename to...
(inputs->el-directories): this, and adapt for any input.
(set-emacs-load-path): Now use inputs->el-directories and
inputs->el-directories.
---
guix/build/emacs-build-system.scm | 44 +++++++++++++--------------------------
1 file changed, 15 insertions(+), 29 deletions(-)

Toggle diff (70 lines)
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index b77984742..ba9ec88e4 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -76,8 +76,8 @@ archive, a directory, or an Emacs Lisp file."
(define* (set-emacs-load-path #:key inputs #:allow-other-keys)
"Set the EMACSLOADPATH environment variable so that dependencies are found."
- (let* ((input-elisp-dirs (emacs-inputs-el-directories
- (emacs-inputs-directories inputs)))
+ (let* ((input-elisp-dirs (inputs->el-directories
+ (inputs->directories inputs)))
(emacs-load-path-value (string-join
input-elisp-dirs ":" 'suffix)))
(setenv "EMACSLOADPATH" emacs-load-path-value)
@@ -210,39 +210,25 @@ store in '.el' files."
"Check if NAME correspond to the name of an Emacs package."
(string-prefix? "emacs-" name))
-(define (emacs-inputs inputs)
- "Retrieve the list of Emacs packages from INPUTS."
- (filter (match-lambda
- ((label . directory)
- (emacs-package? ((compose package-name->name+version
- strip-store-file-name)
- directory)))
- (_ #f))
- inputs))
+(define (inputs->directories inputs)
+ "Extract the directory part from INPUTS."
+ (match inputs
+ (((names . directories) ...) directories)))
-(define (emacs-inputs-directories inputs)
- "Extract the list of Emacs package directories from INPUTS."
- (let ((inputs (emacs-inputs inputs)))
- (match inputs
- (((names . directories) ...) directories))))
-
-(define (emacs-input->el-directory emacs-input)
- "Return the correct Elisp directory location of EMACS-INPUT or #f if none."
- (let ((legacy-elisp-dir (string-append emacs-input %legacy-install-suffix))
+(define (input->el-directory input-dir)
+ "Return the correct Elisp directory location of INPUT-DIR-DIR or #f."
+ (let ((legacy-elisp-dir (string-append input-dir %legacy-install-suffix))
(guix-elisp-dir (string-append
- emacs-input %install-suffix "/"
- (store-directory->elpa-name-version emacs-input))))
+ input-dir %install-suffix "/"
+ (store-directory->elpa-name-version input-dir))))
(cond
((file-exists? guix-elisp-dir) guix-elisp-dir)
((file-exists? legacy-elisp-dir) legacy-elisp-dir)
- (else (format #t "warning: could not locate elisp directory under `~a'\n"
- emacs-input)
- #f))))
+ (else #f))))
-(define (emacs-inputs-el-directories dirs)
- "Build the list of Emacs Lisp directories from the Emacs package directory
-DIRS."
- (filter-map emacs-input->el-directory dirs))
+(define (inputs->el-directories input-dirs)
+ "Build the list of Emacs Lisp directories from the INPUT-DIRS."
+ (filter-map input->el-directory input-dirs))
(define (package-name-version->elpa-name-version name-ver)
"Convert the Guix package NAME-VER to the corresponding ELPA name-version
--
2.16.1
From 407a80cef16ec9f8afadc78b3f59a0c5e930a0e6 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 12 Feb 2018 22:11:38 -0500
Subject: [PATCH 03/27] gnu: Adjust ert-runner wrapper to honor EMACSLOADPATH.

* gnu/packages/emacs.scm (ert-runner): Use 'prefix instead of '= for setting
the EMACSLOADPATH environment variable.
---
gnu/packages/emacs.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index ce9b1a66a..e9f79ae68 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6123,7 +6123,7 @@ Emacs.")
,name "-" ,version)))
(install-file "bin/ert-runner" (string-append out "/bin"))
(wrap-program (string-append out "/bin/ert-runner")
- (list "EMACSLOADPATH" ":" '=
+ (list "EMACSLOADPATH" ":" 'prefix
(append
,(match dependencies
(((labels packages) ...)
--
2.16.1
From ebef14d5e028b19cf1d0827207491542b5616975 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 14:08:15 -0400
Subject: [PATCH 05/27] gnu: emacs-pdf-tools: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-pdf-tools)[phases]: Add set-emacs-load-path.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 05ef61f08..aa4d35a5b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1469,7 +1469,9 @@ filters, new key bindings and faces. It can be enabled by
;; upgrading" that pdf-tools tries to perform.
(emacs-substitute-variables "pdf-tools.el"
("pdf-tools-handle-upgrades" '()))))
- (add-after 'emacs-patch-variables 'emacs-install
+ (add-after 'emacs-patch-variables 'set-emacs-load-path
+ (assoc-ref emacs:%standard-phases 'set-emacs-load-path))
+ (add-after 'add-cwd-to-load-path 'emacs-install
(assoc-ref emacs:%standard-phases 'install))
(add-after 'emacs-install 'emacs-build
(assoc-ref emacs:%standard-phases 'build))
--
2.16.1
From 1b04b1d85ad55dcca4852a02fa1e83802e6d555a Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 14:15:45 -0400
Subject: [PATCH 06/27] gnu: Add emacs-ert-expectations.

* gnu/packages/emacs.scm (emacs-ert-expectations): New variable.
---
gnu/packages/emacs.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index aa4d35a5b..cfbdcc9f3 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2423,6 +2423,23 @@ A minor mode @code{debbugs-browse-mode} let you browse URLs to the GNU Bug
Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.")
(license license:gpl3+)))
+(define-public emacs-ert-expectations
+ (package
+ (name "emacs-ert-expectations")
+ (version "0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://www.emacswiki.org/emacs/download/ert-expectations.el")
+ (sha256
+ (base32
+ "0cwy3ilsid90abzzjb7ha2blq9kmv3gfp3icwwfcz6qczgirq6g7"))))
+ (build-system emacs-build-system)
+ (home-page "https://www.emacswiki.org/emacs/download/ert-expectations.el")
+ (synopsis "Simple unit test framework for Emacs")
+ (description "A very simple unit test framework to use with @code{ERT}.")
+ (license license:gpl3+)))
+
(define-public emacs-deferred
(package
(name "emacs-deferred")
--
2.16.1
From 9177d71b30c33903ed194a8281f6a1090f3e82c6 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:01:05 -0400
Subject: [PATCH 07/27] gnu: emacs-deferred: Enable tests.

* gnu/packages/emacs.scm (emacs-deferred)[phases]: Add fix-makefile.
[tests?]: Set to #t
[test-command]: Add.
[native-inputs]: Add ert-runner, emacs-ert-expectations and emacs-undercover.
---
gnu/packages/emacs.scm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index cfbdcc9f3..648dbfb24 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2455,7 +2455,24 @@ Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.")
"0xy9zb6wwkgwhcxdnslqk52bq3z24chgk6prqi4ks0qcf2bwyh5h"))
(file-name (string-append name "-" version))))
(build-system emacs-build-system)
- ;; FIXME: Would need 'el-expectations' to actually run tests.
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-makefile
+ (lambda _
+ (substitute* "Makefile"
+ (("\\$\\(CASK\\) exec ") ""))
+ #t)))
+ #:tests? #t
+ ;; FIXME: Normally we'd run the "test" target but for some reason the
+ ;; test-deferred target fails when run in the Guix build environment
+ ;; with the error: (file-error "Searching for program" "No such file or
+ ;; directory" "/bin/sh").
+ #:test-command '("make" "test-concurrent" "test-concurrent-compiled")))
+ (native-inputs
+ `(("ert-runner" ,ert-runner)
+ ("emacs-ert-expectations" ,emacs-ert-expectations)
+ ("emacs-undercover" ,emacs-undercover)))
(synopsis "Simple asynchronous functions for Emacs Lisp")
(description
"The @code{deferred.el} library provides support for asynchronous tasks.
--
2.16.1
From 6c66fcb691b8e247db791dd16ee079543fa244b0 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:03:35 -0400
Subject: [PATCH 08/27] gnu: emacs-org-trello: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-org-trello)[native-inputs]: Add emacs-f and
emacs-helm.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 648dbfb24..e52b00393 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2973,7 +2973,9 @@ started with 20 minutes. All values are customizable.")
`(("emacs-deferred" ,emacs-deferred)
("emacs-request" ,emacs-request)
("emacs-dash" ,emacs-dash)
- ("emacs-s" ,emacs-s)))
+ ("emacs-s" ,emacs-s)
+ ("emacs-f" ,emacs-f)
+ ("emacs-helm" ,emacs-helm)))
(home-page "https://org-trello.github.io")
(synopsis "Emacs minor mode for interacting with Trello")
(description "This package provides an Emacs minor mode to extend
--
2.16.1
From 4f56723c3a94a67bbf3d70b50372d54f4aedce8f Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:05:28 -0400
Subject: [PATCH 09/27] gnu: emacs-smartparens: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-smartparens)[propagated-inputs]: Add
emacs-markdown-mode.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index e52b00393..5fd95a636 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3102,7 +3102,9 @@ single theme but a set of guidelines with numerous implementations.")
(base32
"0q5as813xs8y29i3v2rm97phd6m7xsmmw6hwbvx57gwmi8i1c409"))))
(build-system emacs-build-system)
- (propagated-inputs `(("emacs-dash" ,emacs-dash)))
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-markdown-mode" ,emacs-markdown-mode)))
(home-page "https://github.com/Fuco1/smartparens")
(synopsis "Paredit-like insertion, wrapping and navigation with user
defined pairs")
--
2.16.1
From 22ac5d931c1e1d377c614e86b78aa512e25f9982 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:09:38 -0400
Subject: [PATCH 10/27] gnu: emacs-realgud: Adapt phase for the reworked
emacs-build-system.

* gnu/packages/emacs.scm (emacs-realgud)[phases]: Move the fix-autogen-script
after the set-emacs-load-path phase.
---
gnu/packages/emacs.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 5fd95a636..4c7bba5b2 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3283,7 +3283,7 @@ after buffer changes.")
`(#:tests? #t
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'fix-autogen-script
+ (add-after 'set-emacs-load-path 'fix-autogen-script
(lambda _
(substitute* "autogen.sh"
(("./configure") "sh configure"))))
--
2.16.1
From 2e683c9706f283703de7c7b437a48b093e836616 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:11:53 -0400
Subject: [PATCH 11/27] gnu: emacs-request: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-request)[propagated-inputs]: Add emacs-deferred.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 4c7bba5b2..377a04153 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3337,6 +3337,8 @@ parallel.")
(base32
"0wyxqbb35yqf6ci47531lk32d6fppamx9d8826kdz983vm87him7"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-deferred" ,emacs-deferred)))
(home-page "https://github.com/tkf/emacs-request")
(synopsis "Package for speaking HTTP in Emacs Lisp")
(description "This package provides a HTTP request library with multiple
--
2.16.1
From ca084b686b198a8ba13176a66ffb8e6e0c6bd365 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 19 Mar 2018 21:13:33 -0400
Subject: [PATCH 12/27] gnu: emacs-idris-mode: Fix hash.

* gnu/packages/emacs.scm (emacs-idris-mode): Fix hash.
---
gnu/packages/emacs.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 377a04153..5c97a0f0c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6602,7 +6602,7 @@ key. Optionally, a mouse pop-up can be added by binding
version ".tar"))
(sha256
(base32
- "0ld4kfwnyyhlsnj5f6cbn4is4mpxdqalk2aifkw02r00mbr9n294"))))
+ "0qm4gngl6lqvra7kmivz99y3ymrg36nvqh5y9gy6gq0aa0v8az46"))))
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-prop-menu" ,emacs-prop-menu)))
--
2.16.1
From b55edc3c6d17ad45062a551fdc9d26e927b0cf75 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 19 Mar 2018 21:28:42 -0400
Subject: [PATCH 13/27] gnu: emacs-sx: Fix build issue.

The package would fail building when attempting to create a cache
directory. This has been fixed upstream but not in a tagged release.

* gnu/packages/emacs.scm (emacs-sx): Update to latest git version.
---
gnu/packages/emacs.scm | 42 +++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 5c97a0f0c..4f6b0f9cd 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1734,26 +1734,30 @@ strings.")
(license license:gpl2+)))
(define-public emacs-sx
- (package
- (name "emacs-sx")
- (version "0.4")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/vermiculus/sx.el/"
- "archive/v" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1w0xghfljqg31axcnv8gzlrd8pw25nji6idnrhflq0af9qh1dw03"))))
- (build-system emacs-build-system)
- (propagated-inputs
- `(("emacs-markdown-mode" ,emacs-markdown-mode)))
- (home-page "https://github.com/vermiculus/sx.el/")
- (synopsis "Emacs StackExchange client")
- (description
- "Emacs StackExchange client. Ask and answer questions on
+ (let ((version "20180212")
+ (revision "1")
+ (commit "833435fbf90d1c9e927d165b155f3b1ef39271de"))
+ (package
+ (name "emacs-sx")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vermiculus/sx.el")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1369xaxq1vy3d9yh862ddnhddikdpg2d0wv1ly00pnvdp9v4cqgd"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-markdown-mode" ,emacs-markdown-mode)))
+ (home-page "https://github.com/vermiculus/sx.el")
+ (synopsis "Emacs StackExchange client")
+ (description
+ "Emacs StackExchange client. Ask and answer questions on
Stack Overflow, Super User, and other StackExchange sites.")
- (license license:gpl3+)))
+ (license license:gpl3+))))
(define-public emacs-f
(package
--
2.16.1
From fbc0f30c2df7857f3f853c5051ef6848dac32919 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 19 Mar 2018 21:55:27 -0400
Subject: [PATCH 14/27] gnu: emacs-polymode: Fix compilation error.

* gnu/packages/emacs.scm (emacs-polymode)
[add-modes-subdir-to-loadpath]: New phase.
---
gnu/packages/emacs.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 4f6b0f9cd..cdd4904f7 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6932,6 +6932,15 @@ contexts.
(base32
"057cybkq3cy07n5s332k071sjiky3mziy003lza4rh75mgqkwhmh"))))
(build-system emacs-build-system)
+ (arguments
+ `(#:include (cons* "^modes/.*\\.el$" %default-include)
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'set-emacs-load-path 'add-modes-subdir-to-load-path
+ (lambda _
+ (setenv "EMACSLOADPATH"
+ (string-append (getenv "EMACSLOADPATH")
+ ":" (getcwd) "/modes" ":")))))))
(home-page "https://github.com/vspinu/polymode")
(synopsis "Framework for multiple Emacs modes based on indirect buffers")
(description "Polymode is an Emacs package that offers generic support
--
2.16.1
From 172e42ae07cb5585d83403d3afc7c83c10d8c53f Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 18 Mar 2018 16:37:30 -0400
Subject: [PATCH 15/27] gnu: Add emacs-scel.

* gnu/packages/emacs.scm (emacs-scel): New variable.
---
gnu/packages/emacs.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index cdd4904f7..420c0526b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2643,6 +2643,59 @@ implementation in Emacs. To use it just load this file and bind that function
to a key in your preferred mode.")
(license license:public-domain))))
+(define-public emacs-scel
+ (let ((version "20170629")
+ (revision "1")
+ (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
+ (package
+ (name "emacs-scel")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/supercollider/scel.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'move-el-files
+ (lambda _
+ (for-each
+ (lambda (f)
+ (rename-file f (basename f)))
+ (find-files "el" "^.*\\.el(\\.in)?$"))
+ #t))
+ (add-after 'move-el-files 'configure-sclang-vars
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((supercollider (assoc-ref inputs "supercollider")))
+ (substitute* "sclang-vars.el.in"
+ (("@PKG_DATA_DIR@")
+ (string-append supercollider "/share/SuperCollider"))
+ ;; See: https://github.com/widp/el-supercollider/issues/1
+ (("Help") "HelpSource")))
+ (rename-file "sclang-vars.el.in" "sclang-vars.el")
+ #t))
+ (add-after 'configure-sclang-vars 'install-extensions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (ext-dir (string-append
+ out "/share/SuperCollider/Extensions"
+ "/scide_scel")))
+ (delete-file "sc/CMakeLists.txt")
+ (copy-recursively "sc" ext-dir))
+ #t)))))
+ (inputs
+ `(("supercollider" ,supercollider)))
+ (home-page "https://github.com/supercollider/scel")
+ (synopsis "SuperCollider Emacs interface")
+ (description "scel is an Emacs based interface to SuperCollider.")
+ (license license:gpl2+))))
+
(define-public emacs-mit-scheme-doc
(package
(name "emacs-mit-scheme-doc")
--
2.16.1
From 086aa7bcec4cea5c5942f6b86772fa9ac71848c0 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 24 Mar 2018 21:37:41 -0400
Subject: [PATCH 16/27] gnu: Add emacs-kv.

* gnu/packages/emacs.scm (emacs-kv): New variable.
---
gnu/packages/emacs.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 420c0526b..f8696d301 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -7245,6 +7245,31 @@ scratch buffer, and, by virtue of this extension, do so using the Emacs
formatting rules for that language.")
(license license:bsd-2))))
+(define-public emacs-kv
+ (package
+ (name "emacs-kv")
+ (version "0.0.19")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nicferrier/emacs-kv.git")
+ (commit "721148475bce38a70e0b678ba8aa923652e8900e")))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0r0lz2s6gvy04fwnafai668jsf4546h4k6zd6isx5wpk0n33pj5m"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t
+ #:test-command '("ert-runner" "kv-tests.el")))
+ (native-inputs
+ `(("ert-runner" ,ert-runner)))
+ (home-page "https://github.com/nicferrier/emacs-kv")
+ (synopsis "Key/value data structures library")
+ (description "A collection of tools for dealing with key/value data
+structures such as plists, alists and hash-tables.")
+ (license license:gpl3+)))
+
(define-public emacs-esxml
(package
(name "emacs-esxml")
--
2.16.1
From 6f270606bf6505a845437db5a11cd6e2d636010a Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 24 Mar 2018 23:07:18 -0400
Subject: [PATCH 17/27] gnu: emacs-esxml: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-esxml): Add phases to patch sources.
---
gnu/packages/emacs.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f8696d301..999831c6a 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -7284,6 +7284,32 @@ structures such as plists, alists and hash-tables.")
(base32
"00vv8a75wdklygdyr4km9mc2ismxak69c45jmcny41xl44rp9x8m"))))
(build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; See: https://github.com/tali713/esxml/pull/28.
+ (add-after 'unpack 'fix-css-lite.el
+ (lambda _
+ (substitute* "css-lite.el"
+ ((";;; main interface")
+ (string-append ";;; main interface\n"
+ "(require 'cl-lib)"))
+ (("mapcan")
+ "cl-mapcan")
+ (("',\\(cl-mapcan #'process-css-rule rules\\)")
+ "(cl-mapcan #'process-css-rule ',rules)"))
+ #t))
+ (add-after 'fix-css-lite.el 'fix-esxml-form.el
+ (lambda _
+ (substitute* "esxml-form.el"
+ ((",esxml-form-field-defn")
+ "#'esxml-form-field-defn"))))
+ ;; See: https://github.com/tali713/esxml/issues/25
+ (add-after 'fix-esxml-form.el 'rm-broken-test-file.el
+ (lambda _
+ (delete-file "esxpath.el"))))))
+ (propagated-inputs
+ `(("emacs-kv" ,emacs-kv)))
(home-page "https://github.com/tali713/esxml/")
(synopsis "SXML for EmacsLisp")
(description "This is XML/XHTML done with S-Expressions in EmacsLisp.
--
2.16.1
From b0d12ab881d3827862727f8dd3c5501bc93f3038 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 28 Mar 2018 20:56:18 -0400
Subject: [PATCH 18/27] gnu: emacs-mu4e-alert: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-mu4e-alert)[propagated-inputs]: Add mu.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 999831c6a..3eb64e4ae 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -89,6 +89,7 @@
#:use-module (gnu packages xml)
#:use-module (gnu packages glib)
#:use-module (gnu packages acl)
+ #:use-module (gnu packages mail)
#:use-module (gnu packages package-management)
#:use-module (gnu packages perl)
#:use-module (gnu packages pdf)
@@ -5023,7 +5024,8 @@ customizable by the user.")
"07qc834qnxn8xi4bw5nawj8g91bmkzw0r0vahkgysp7r9xrf57gj"))))
(build-system emacs-build-system)
(propagated-inputs
- `(("emacs-alert" ,emacs-alert)
+ `(("mu" ,mu) ;for byte compilation
+ ("emacs-alert" ,emacs-alert)
("emacs-s" ,emacs-s)
("emacs-ht" ,emacs-ht)))
(home-page "https://github.com/iqbalansari/mu4e-alert")
--
2.16.1
From 9a3a449121246a2d26a92ee5c19d905768789a10 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 28 Mar 2018 21:50:15 -0400
Subject: [PATCH 19/27] gnu: emacs-org-contrib: Fix hash and byte compilation.

* gnu/packages/emacs.scm (emacs-org-contrib)[native-inputs]: Add emacs-scel.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 3eb64e4ae..a79d15d33 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4638,6 +4638,8 @@ reproducible research.")
out "/share/emacs/site-lisp/guix.d/org-contrib-" ,version)
(for-each delete-file duplicates))
#t))))))
+ (native-inputs
+ `(("emacs-scel" ,emacs-scel))) ;for byte compilation
(propagated-inputs
`(("emacs-org" ,emacs-org)))
(synopsis "Contributed packages to Org mode")
--
2.16.1
From 9b5c7216ecb00e433a22687d6a54eba2f20ac0eb Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 20:41:48 -0400
Subject: [PATCH 20/27] gnu: emacs-evil-matchit: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-evil-matchit)[propagated-inputs]: Add
emacs-evil.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a79d15d33..afa57e65c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -7080,6 +7080,8 @@ Feautures:
(base32
"1hm0k53m7d8zv2pk4p93k5mmilsv1mz7y2z6dqf7r6f0zmncs31a"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("evil" ,emacs-evil)))
(home-page "https://github.com/redguardtoo/evil-matchit")
(synopsis "Vim matchit ported into Emacs")
(description
--
2.16.1
From f6642cee6419a1e720070673767b7a30e3d132bb Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 21:18:16 -0400
Subject: [PATCH 21/27] gnu: Add emacs-spark.

* gnu/packages/emacs.scm (emacs-spark): New variable.
---
gnu/packages/emacs.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index afa57e65c..b8601f868 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1907,6 +1907,29 @@ Expectations, but it can be used in other contexts.")
definitions for testing with the Ecukes framework.")
(license license:gpl3+)))
+(define-public emacs-spark
+ (let ((version "20160503") ;no proper tag, use date of commit
+ (commit "0bf148c3ede3b31d56fd75f347cdd0b0eae60025")
+ (revision "1"))
+ (package
+ (name "emacs-spark")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alvinfrancis/spark.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ykqr86j17mi95s08d9fp02d7ych1331b04dcqxzxnmpkhwngyj1"))))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/alvinfrancis/spark")
+ (synopsis "Port of cl-spark to Emacs Lisp")
+ (description "This library is a straightforward port of @code{cl-spark}
+to Emacs Lisp.")
+ (license license:expat))))
+
(define-public emacs-es-mode
(package
(name "emacs-es-mode")
--
2.16.1
From 09b506e8ac6a948a7e788f7e621ea3805e497a3e Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 21:18:36 -0400
Subject: [PATCH 22/27] gnu: emacs-es-mode: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-es-mode)[propagated-inputs]: Add emacs-dash
and emacs-spark.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index b8601f868..1362aed31 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1947,7 +1947,9 @@ to Emacs Lisp.")
(propagated-inputs
;; The version of org in Emacs 24.5 is not sufficient, and causes tables
;; to be rendered incorrectly
- `(("emacs-org" ,emacs-org)))
+ `(("emacs-org" ,emacs-org)
+ ("emacs-dash" ,emacs-dash)
+ ("emacs-spark" ,emacs-spark)))
(home-page "https://github.com/dakrone/es-mode")
(synopsis "Major mode for editing Elasticsearch queries")
(description "@code{es-mode} includes highlighting, completion and
--
2.16.1
From af77425293a4fba3cc5c5742c69d531507a8becb Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 21:46:35 -0400
Subject: [PATCH 23/27] gnu: Add emacs-eimp.

* gnu/packages/emacs.scm (emacs-eimp): New variable.
---
gnu/packages/emacs.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 1362aed31..6bffd10ed 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6374,6 +6374,44 @@ from within Emacs. Restclient runs queries from a plan-text query sheet,
displays results pretty-printed in XML or JSON with @code{restclient-mode}")
(license license:public-domain))))
+(define-public emacs-eimp
+ (let ((version "1.4.0")
+ (commit "2e7536fe6d8f7faf1bad7a8ae37faba0162c3b4f")
+ (revision "1"))
+ (package
+ (name "emacs-eimp")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nicferrier/eimp.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "154d57yafxbcf39r89n5j43c86rp2fki3lw3gwy7ww2g6qkclcra"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-mogrify-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((imagemagick (assoc-ref inputs "imagemagick")))
+ ;; eimp.el is read-only in git.
+ (invoke "chmod" "+w" "eimp.el")
+ (emacs-substitute-variables "eimp.el"
+ ("eimp-mogrify-program"
+ (string-append imagemagick "/bin/mogrify"))))
+ #t)))))
+ (inputs
+ `(("imagemagick" ,imagemagick))) ;provides the mogrify binary.
+ (home-page "https://github.com/nicferrier/eimp")
+ (synopsis "Interactive image manipulation from within Emacs")
+ (description "This package allows interactive image manipulation from
+within Emacs. It uses the code@{mogrify} utility from ImageMagick to do the
+actual transformations.")
+ (license license:gpl2+))))
+
(define-public emacs-dired-hacks
(let ((commit "eda68006ce73bbf6b9b995bfd70d08bec8cade36")
(revision "1"))
--
2.16.1
From 95cf21463f6ec9141df70aec5403851afdda0e82 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 22:56:29 -0400
Subject: [PATCH 24/27] gnu: emacs-dired-hacks: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-dired-hacks)[propagated-inputs]: Add emacs-eimp.
---
gnu/packages/emacs.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 6bffd10ed..0332e7e9e 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6431,6 +6431,7 @@ actual transformations.")
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-dash" ,emacs-dash)
+ ("emacs-eimp" ,emacs-eimp)
("emacs-f" ,emacs-f)
("emacs-s" ,emacs-s)))
(home-page "https://github.com/Fuco1/dired-hacks")
--
2.16.1
From 0b3fb16665fe7b2ca4818496857af1426eb766e9 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 23:16:10 -0400
Subject: [PATCH 25/27] gnu: emacs-cdlatex: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-cdlatex)[propagated-inputs]: Add emacs-auctex.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 0332e7e9e..c7e53333a 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5614,6 +5614,8 @@ conversion for Emacs Lisp.")
(base32
"0pivapphmykc6vhvpx7hdyl55ls37vc4jcrxpvs4yk7jzcmwa9xp"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-auctex" ,emacs-auctex)))
(home-page "https://github.com/cdominik/cdlatex")
(synopsis "Fast Emacs input methods for LaTeX environments and
math")
--
2.16.1
From c303e1b7a0b0e96bc49521973c4d2187c25f8af1 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 00:22:24 -0400
Subject: [PATCH 26/27] gnu: Add emacs-howm.

* gnu/packages/emacs.scm (emacs-howm): New variable.
---
gnu/packages/emacs.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index c7e53333a..803994308 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1182,6 +1182,25 @@ or XEmacs.")
a set of simplified face specifications and a user-supplied color palette")
(license license:gpl3+)))
+(define-public emacs-howm
+ (package
+ (name "emacs-howm")
+ (version "1.4.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://howm.sourceforge.jp/a/howm-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ddm91l6z58j7x59fa966j6q1rg4cinyza4r8ibg80hprn5h31qk"))))
+ (build-system emacs-build-system)
+ (home-page "http://howm.osdn.jp/")
+ (synopsis "Note-taking tool for Emacs")
+ (description "Howm is a note-taking tool for Emacs. Like with
+code@{emacs-wiki.el}, it facilitates using hyperlinks and doing full-text
+searches. Unlike code@{emacs-wiki.el}, it can be combined with any format.")
+ (license license:gpl1+)))
+
(define-public emacs-calfw
(package
(name "emacs-calfw")
--
2.16.1
From 915b8088ecd2d1367b0844ed0eacd249e87aec76 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 00:25:23 -0400
Subject: [PATCH 27/27] gnu: emacs-calfw: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-calfw)[propagated-inputs]: Add emacs-howm.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 803994308..ccd997d91 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1216,6 +1216,8 @@ searches. Unlike code@{emacs-wiki.el}, it can be combined with any format.")
(base32
"17ssg8gx66yp63nhygjq2r6kgl4h45cacmrxsxs9f0lrfcx37k0l"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-howm" ,emacs-howm)))
(home-page "https://github.com/kiwanami/emacs-calfw/")
(synopsis "Calendar framework for Emacs")
(description
--
2.16.1
A
A
Arun Isaac wrote on 13 Apr 2018 22:41
cu7604uyh2t.fsf@systemreboot.net
This is a very long patchset, and it's getting a little unwieldy to
review. I'll start by pushing some of the simpler patches to
master. Then, we can come back and discuss the rest.
M
M
Maxim Cournoyer wrote on 14 Apr 2018 03:28
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 31018@debbugs.gnu.org)
87r2nio9u2.fsf@gmail.com
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (4 lines)
> This is a very long patchset, and it's getting a little unwieldy to
> review. I'll start by pushing some of the simpler patches to
> master. Then, we can come back and discuss the rest.

Sounds reasonable, as long as you understand that some packages will
break (well, they are silently broken right now already) if the build
system patches and the package fixes are not merged at the same time.

Thank you for helping with this review :)

Maxim
A
A
Arun Isaac wrote on 14 Apr 2018 18:51
cu7sh7xk9z5.fsf@systemreboot.net
I've pushed the patches concerning ert-expectations, org-trello,
smartparens, request, polymode, mu4e-alert, evil-matchit, spark,
es-mode, eimp, dired-hacks and cdlatex to master with some minor
modifications here and there. I was careful not to break any packages on
master.

For the remaining patches, some comments follow.

Toggle quote (43 lines)
> Subject: [PATCH 01/27] emacs-build-system: Consider all inputs for
> Elisp dependencies.

> (define* (set-emacs-load-path #:key inputs #:allow-other-keys)
> "Set the EMACSLOADPATH environment variable so that dependencies are found."
> - (let* ((input-elisp-dirs (emacs-inputs-el-directories
> - (emacs-inputs-directories inputs)))
> + (let* ((input-elisp-dirs (inputs->el-directories
> + (inputs->directories inputs)))
> (emacs-load-path-value (string-join
> input-elisp-dirs ":" 'suffix)))
> (setenv "EMACSLOADPATH" emacs-load-path-value)

> @@ -210,39 +210,25 @@ store in '.el' files."
> "Check if NAME correspond to the name of an Emacs package."
> (string-prefix? "emacs-" name))
>
> -(define (emacs-inputs inputs)
> - "Retrieve the list of Emacs packages from INPUTS."
> - (filter (match-lambda
> - ((label . directory)
> - (emacs-package? ((compose package-name->name+version
> - strip-store-file-name)
> - directory)))
> - (_ #f))
> - inputs))
> +(define (inputs->directories inputs)
> + "Extract the directory part from INPUTS."
> + (match inputs
> + (((names . directories) ...) directories)))
>
> -(define (emacs-inputs-directories inputs)
> - "Extract the list of Emacs package directories from INPUTS."
> - (let ((inputs (emacs-inputs inputs)))
> - (match inputs
> - (((names . directories) ...) directories))))
> -
> -(define (emacs-input->el-directory emacs-input)
> - "Return the correct Elisp directory location of EMACS-INPUT or #f if none."
> - (let ((legacy-elisp-dir (string-append emacs-input %legacy-install-suffix))
> +(define (input->el-directory input-dir)
> + "Return the correct Elisp directory location of INPUT-DIR-DIR or #f."

We can just call the "input-dir" argument as "input". Also, there is a
typo in the docstring where it is called INPUT-DIR-DIR.

Toggle quote (8 lines)
> -(define (emacs-inputs-el-directories dirs)
> - "Build the list of Emacs Lisp directories from the Emacs package directory
> -DIRS."
> - (filter-map emacs-input->el-directory dirs))
> +(define (inputs->el-directories input-dirs)
> + "Build the list of Emacs Lisp directories from the INPUT-DIRS."
> + (filter-map input->el-directory input-dirs))

emacs-inputs-el-directories is a very short and simple function, and is
called only once. Why not insert its body directly into the caller
function?

Toggle quote (15 lines)
> Subject: [PATCH 02/27] emacs-build-system: Add improved check phase, fixes.

> -(define* (set-emacs-load-path #:key inputs #:allow-other-keys)
> +(define* (set-emacs-load-path #:key source inputs #:allow-other-keys)
> "Set the EMACSLOADPATH environment variable so that dependencies are found."
> - (let* ((input-elisp-dirs (inputs->el-directories
> + (let* ((source-dir (getcwd))
> + (input-elisp-dirs (inputs->el-directories
> (inputs->directories inputs)))
> (emacs-load-path-value (string-join
> - input-elisp-dirs ":" 'suffix)))
> + `(,@input-elisp-dirs
> + ,source-dir) ":" 'suffix)))
> (setenv "EMACSLOADPATH" emacs-load-path-value)

set-path-environment-variable could be used here instead of setenv. It
will make the code shorter. Also, modifications to the
set-emacs-load-path phase should be part of the first commit (Consider all
inputs for elisp dep). They don't belong in this commit along with the
check phase.

Toggle quote (12 lines)
> (format #t "environment variable `EMACSLOADPATH' set to ~a\n"
> emacs-load-path-value)))
> @@ -133,6 +135,24 @@ store in '.el' files."
> (substitute-program-names))))
> #t))
>
> +(define* (check #:key target (tests? (not target))
> + (test-command '("make" "check")) (parallel-tests? #t)
> + #:allow-other-keys)
> + "Like the gnu-build-system check phase, but with a way to pass a custom test
> +program command line, using TEST-COMMAND."

I think this docstring should explicitly say what the check phase does,
instead of making a comparison to the gnu-build-system. WDYT?

Toggle quote (3 lines)
> + (let* ((test-program (car test-command))
> + (test-args (cdr test-command))

Use match-let here instead of car and cdr.

Toggle quote (5 lines)
> (parameterize ((%emacs emacs))
> - (emacs-generate-autoloads elpa-name el-dir))
> - #t))
> + (emacs-generate-autoloads elpa-name el-dir))))

These invoke related changes should be a separate commit.

Toggle quote (15 lines)
> (define-module (guix build emacs-utils)
> + #:use-module (guix build utils)
> #:export (%emacs
> emacs-batch-eval
> emacs-batch-edit-file
> @@ -39,16 +41,14 @@
>
> (define (emacs-batch-eval expr)
> "Run Emacs in batch mode, and execute the elisp code EXPR."
> - (unless (zero? (system* (%emacs) "--quick" "--batch"
> - (format #f "--eval=~S" expr)))
> - (error "emacs-batch-eval failed!" expr)))
> + (invoke (%emacs) "--quick" "--batch"
> + (format #f "--eval=~S" expr)))

Likewise.

Toggle quote (10 lines)
> (define (emacs-batch-edit-file file expr)
> "Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
> - (unless (zero? (system* (%emacs) "--quick" "--batch"
> - (string-append "--visit=" file)
> - (format #f "--eval=~S" expr)))
> - (error "emacs-batch-edit-file failed!" file expr)))
> + (invoke (%emacs) "--quick" "--batch"
> + (string-append "--visit=" file)
> + (format #f "--eval=~S" expr)))

Likewise.

Toggle quote (12 lines)
> (define (emacs-generate-autoloads name directory)
> "Generate autoloads for Emacs package NAME placed in DIRECTORY."
> @@ -60,7 +60,9 @@
>
> (define* (emacs-byte-compile-directory dir)
> "Byte compile all files in DIR and its sub-directories."
> - (let ((expr `(byte-recompile-directory (file-name-as-directory ,dir) 0)))
> + (let ((expr `(progn
> + (setq byte-compile-debug t) ;for proper exit status
> + (byte-recompile-directory (file-name-as-directory ,dir) 0 1))))
> (emacs-batch-eval expr)))

Strict byte compilation should be a separate commit.

Toggle quote (9 lines)
> Subject: [PATCH 03/27] gnu: Adjust ert-runner wrapper to honor EMACSLOADPATH.
>
> (wrap-program (string-append out "/bin/ert-runner")
> - (list "EMACSLOADPATH" ":" '=
> + (list "EMACSLOADPATH" ":" 'prefix
> (append
> ,(match dependencies
> (((labels packages) ...)

Couldn't we just use the EMACSLOADPATH environment variable as already
set by the set-emacs-load-path phase, instead of recomputing it?

Toggle quote (10 lines)
> Subject: [PATCH 04/27] gnu: Adapt Emacs packages to use the new check phase.
>
> - `(#:phases
> - (modify-phases %standard-phases
> - (add-before 'install 'check
> - (lambda _
> - (zero? (system* "./run-tests.sh")))))))
> + `(#:tests? #t
> + #:test-command '("sh" "run-tests.sh")))

Why '("sh" "run-tests.sh") and not just '("./run-tests.sh")?

Toggle quote (3 lines)
> + `(#:tests? #t
> + #:test-command '("sh" "run-tests.sh")))

Likewise.

Toggle quote (13 lines)
> (modify-phases %standard-phases
> - (add-before 'install 'check
> + (add-before 'check 'fix-bin-dir
> (lambda _
> ;; The company-files-candidates-normal-root test looks
> ;; for the /bin directory, but the build environment has
> ;; no /bin directory. Modify the test to look for the
> ;; /tmp directory.
> (substitute* "test/files-tests.el"
> - (("/bin/") "/tmp/"))
> - (zero? (system* "make" "test-batch")))))))
> + (("/bin/") "/tmp/")))))

The fix-bin-dir phase must return a #t.

Toggle quote (3 lines)
> + `(#:tests? #t
> + #:test-command '("emacs" "-batch"

Nitpick: Use "--batch" here instead of "-batch".

Toggle quote (4 lines)
> + "-l" "julia-mode.el"
> + "-l" "julia-mode-tests.el"
> + "-f" "ert-run-tests-batch-and-exit")))

julia-mode.el need not be loaded explicitly. The EMACSLOADPATH
environment variable knows where to find it.

Toggle quote (43 lines)
> (define-public emacs-memoize
> (package
> - (name "emacs-memoize")
> - (version "20130421.b55eab0")
> - (source
> - (origin
> - (method git-fetch)
> - (uri (git-reference
> - (url "https://github.com/skeeto/emacs-memoize")
> - (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75")))
> - (file-name (string-append name "-" version ".tar.gz"))
> - (sha256
> - (base32
> - "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw"))))
> - (build-system emacs-build-system)
> - (arguments
> - `(#:phases
> - (modify-phases %standard-phases
> - (add-before 'install 'check
> - (lambda _
> - (zero? (system* "emacs" "-batch" "-l" "memoize.el"
> - "-l" "memoize-test.el"
> - "-f" "ert-run-tests-batch-and-exit")))))))
> - (home-page "https://github.com/skeeto/emacs-memoize")
> - (synopsis "Emacs lisp memoization library")
> - (description "@code{emacs-memoize} is an Emacs library for
> + (name "emacs-memoize")
> + (version "20130421.b55eab0")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/skeeto/emacs-memoize")
> + (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75")))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw"))))
> + (build-system emacs-build-system)
> + (arguments
> + `(#:tests? #t
> + #:test-command '("emacs" "-batch"

Nitpick: Use "--batch" here instead of "-batch".

Toggle quote (4 lines)
> + "-l" "memoize.el"
> + "-l" "memoize-test.el"
> + "-f" "ert-run-tests-batch-and-exit")))

memoize.el need not be loaded explicitly. The EMACSLOADPATH environment
variable knows where to find it.

Toggle quote (7 lines)
> + (synopsis "Emacs lisp memoization library")
> + (description "@code{emacs-memoize} is an Emacs library for
> memoizing functions.")
> - (license license:unlicense)))
> + (license license:unlicense)))

Re-indent emacs-memoize as a separate commit. Else, it's very hard to
make sense of the diff.

Toggle quote (13 lines)
> (arguments
> - `(#:phases
> - (modify-phases %standard-phases
> - (add-before 'install 'check
> - (lambda _
> - (zero? (system* "emacs" "--batch" "-L" "."
> - "-l" "xmlgen-test.el"
> - "-f" "ert-run-tests-batch-and-exit")))))))
> + `(#:tests? #t
> + #:test-command '("emacs" "--batch" "-L" "."
> + "-l" "xmlgen-test.el"
> + "-f" "ert-run-tests-batch-and-exit")))

"-L" "." is not required. The EMACSLOADPATH environment variable already
includes the current directory.

Toggle quote (15 lines)
> + `(#:tests? #t
> + #:test-command '("emacs" "--batch"
> + "-l" "which-key-tests.el"
> + "-f" "ert-run-tests-batch-and-exit")))

> (home-page "https://github.com/lewang/ws-butler")
> (synopsis "Trim spaces from end of lines")
> (description
> @@ -6480,20 +6431,14 @@ editing RPM spec files.")
> (base32
> "17mqki6g0wx46fn7dcbcc2pjxik7vvrcb1j9jzxim8b9psbsbnp9"))))
> (build-system emacs-build-system)
> + (native-inputs
> + `(("ert-runner" ,ert-runner)))

Why add ert-runner as native-input?

Toggle quote (7 lines)
> Subject: [PATCH 05/27] gnu: emacs-pdf-tools: Fix byte compilation.
>
> - (add-after 'emacs-patch-variables 'emacs-install
> + (add-after 'emacs-patch-variables 'set-emacs-load-path
> + (assoc-ref emacs:%standard-phases 'set-emacs-load-path))
> + (add-after 'add-cwd-to-load-path 'emacs-install

What is the add-cwd-to-load-path phase, and where is it defined?

Toggle quote (7 lines)
> Subject: [PATCH 12/27] gnu: emacs-idris-mode: Fix hash.
>
> (sha256
> (base32
> - "0ld4kfwnyyhlsnj5f6cbn4is4mpxdqalk2aifkw02r00mbr9n294"))))
> + "0qm4gngl6lqvra7kmivz99y3ymrg36nvqh5y9gy6gq0aa0v8az46"))))

The hash seems to have changed again upstream. Please verify.

Toggle quote (5 lines)
> Subject: [PATCH 13/27] gnu: emacs-sx: Fix build issue.
>
> The package would fail building when attempting to create a cache
> directory. This has been fixed upstream but not in a tagged release.

Is it possible to cherry pick relevant commits alone and include them as
patches? If possible, this would be preferable to switching to a git
checkout.

Toggle quote (20 lines)
> Subject: [PATCH 15/27] gnu: Add emacs-scel.
>
> +(define-public emacs-scel
> + (let ((version "20170629")
> + (revision "1")
> + (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
> + (package
> + (name "emacs-scel")
> + (version (git-version version revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/supercollider/scel.git")
> + (commit commit)))
> + (file-name (string-append name "-" version "-checkout"))
> + (sha256
> + (base32
> + "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
> + (build-system emacs-build-system)

This package seems to use a cmake-build-system. Did you try that?

Toggle quote (5 lines)
> From 9a3a449121246a2d26a92ee5c19d905768789a10 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> Date: Wed, 28 Mar 2018 21:50:15 -0400
> Subject: [PATCH 19/27] gnu: emacs-org-contrib: Fix hash and byte compilation.

There is no hash change in the commit. Please fix the commit message.

Toggle quote (15 lines)
> Subject: [PATCH 26/27] gnu: Add emacs-howm.
>
> +(define-public emacs-howm
> + (package
> + (name "emacs-howm")
> + (version "1.4.4")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "http://howm.sourceforge.jp/a/howm-"
> + version ".tar.gz"))
> + (sha256
> + (base32
> + "0ddm91l6z58j7x59fa966j6q1rg4cinyza4r8ibg80hprn5h31qk"))))
> + (build-system emacs-build-system)

This package seems to use the gnu-build-system. Did you try that?
M
M
Maxim Cournoyer wrote on 17 Apr 2018 04:59
Re: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 31018@debbugs.gnu.org)
87d0yyo7vm.fsf_-_@gmail.com
Hello Arun,

Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (11 lines)
> I've pushed the patches concerning ert-expectations, org-trello,
> smartparens, request, polymode, mu4e-alert, evil-matchit, spark,
> es-mode, eimp, dired-hacks and cdlatex to master with some minor
> modifications here and there. I was careful not to break any packages on
> master.
>
> For the remaining patches, some comments follow.
>
>> Subject: [PATCH 01/27] emacs-build-system: Consider all inputs for
>> Elisp dependencies.

[...]

Toggle quote (9 lines)
>> -(define (emacs-input->el-directory emacs-input)
>> - "Return the correct Elisp directory location of EMACS-INPUT or #f if none."
>> - (let ((legacy-elisp-dir (string-append emacs-input %legacy-install-suffix))
>> +(define (input->el-directory input-dir)
>> + "Return the correct Elisp directory location of INPUT-DIR-DIR or #f."
>
> We can just call the "input-dir" argument as "input". Also, there is a
> typo in the docstring where it is called INPUT-DIR-DIR.

I wanted to stress that we pass the input directory rather than a Guix
input (which is tuple of a package's name and its path in the store),
since both are used in this module. I've now made this more consistent.

Toggle quote (12 lines)
>> -(define (emacs-inputs-el-directories dirs)
>> - "Build the list of Emacs Lisp directories from the Emacs package directory
>> -DIRS."
>> - (filter-map emacs-input->el-directory dirs))
>> +(define (inputs->el-directories input-dirs)
>> + "Build the list of Emacs Lisp directories from the INPUT-DIRS."
>> + (filter-map input->el-directory input-dirs))
>
> emacs-inputs-el-directories is a very short and simple function, and is
> called only once. Why not insert its body directly into the caller
> function?

I like it as a function better, if only for the expressiveness of its
name :).

Toggle quote (18 lines)
>> Subject: [PATCH 02/27] emacs-build-system: Add improved check phase, fixes.
>
>> -(define* (set-emacs-load-path #:key inputs #:allow-other-keys)
>> +(define* (set-emacs-load-path #:key source inputs #:allow-other-keys)
>> "Set the EMACSLOADPATH environment variable so that dependencies are found."
>> - (let* ((input-elisp-dirs (inputs->el-directories
>> + (let* ((source-dir (getcwd))
>> + (input-elisp-dirs (inputs->el-directories
>> (inputs->directories inputs)))
>> (emacs-load-path-value (string-join
>> - input-elisp-dirs ":" 'suffix)))
>> + `(,@input-elisp-dirs
>> + ,source-dir) ":" 'suffix)))
>> (setenv "EMACSLOADPATH" emacs-load-path-value)
>
> set-path-environment-variable could be used here instead of setenv. It
> will make the code shorter.

I tried this before; there are two issues with that method:
1. Cluttering EMACSLOADPATH: Since we must support both
"/share/emacs/site-lisp" and "/share/emacs/site-lisp/guix.d", the first
would always be added when the later exists, which we don't want. This
is because we can only pass a PATTERN to `set-path-environment-variable'
that is tested against every file which is of the specified TYPE (we
cannot pass it some extra logic).
2. It is important for EMACSLOADPATH to contain the trailing colon (:),
otherwise Emacs wouldn't find its own Elisp modules. We could hack it at
this level by adding nil to the end of the INPUT-DIRS, but this isn't
general. In the past I played with attempting to define a
search-path-specification for our Emacs package, which would generalize
even more the way our Emacs packages are discovered in Guix. That ended
up looking like the following:

Toggle snippet (8 lines)
+ (native-search-paths
+ (list (search-path-specification
+ (variable "EMACSLOADPATH")
+ (files '("share/emacs/site-lisp"))
+ (file-pattern ".*")
+ (append-separator? #t))))))

Where the new "append-separator?" argument was added by myself (this is
a world rebuilding change and also changes the manifest file). I didn't
pursue that for now given that it still suffers from 1. explained above.

The nice properties of this however was that it was now possible to have
the Emacs dependencies found in `guix environment' as well as in the
build system (anywhere), by using the native mechanism that Guix comes
with. If you have interest in going that way I could revive those two
old patches.

Toggle quote (4 lines)
> Also, modifications to the set-emacs-load-path phase should be part of
> the first commit (Consider all inputs for elisp dep). They don't
> belong in this commit along with the check phase.

Done.

Toggle quote (16 lines)
>
>> (format #t "environment variable `EMACSLOADPATH' set to ~a\n"
>> emacs-load-path-value)))
>> @@ -133,6 +135,24 @@ store in '.el' files."
>> (substitute-program-names))))
>> #t))
>>
>> +(define* (check #:key target (tests? (not target))
>> + (test-command '("make" "check")) (parallel-tests? #t)
>> + #:allow-other-keys)
>> + "Like the gnu-build-system check phase, but with a way to pass a custom test
>> +program command line, using TEST-COMMAND."
>
> I think this docstring should explicitly say what the check phase does,
> instead of making a comparison to the gnu-build-system. WDYT?

Done (although I find it a bit verbose now :).

Toggle quote (5 lines)
>> + (let* ((test-program (car test-command))
>> + (test-args (cdr test-command))
>
> Use match-let here instead of car and cdr.

Done, although match-let appears to be undocumented :/.

Toggle quote (8 lines)
>
>> (parameterize ((%emacs emacs))
>> - (emacs-generate-autoloads elpa-name el-dir))
>> - #t))
>> + (emacs-generate-autoloads elpa-name el-dir))))
>
> These invoke related changes should be a separate commit.

Done.

[...]

Toggle quote (14 lines)
>> (define (emacs-generate-autoloads name directory)
>> "Generate autoloads for Emacs package NAME placed in DIRECTORY."
>> @@ -60,7 +60,9 @@
>>
>> (define* (emacs-byte-compile-directory dir)
>> "Byte compile all files in DIR and its sub-directories."
>> - (let ((expr `(byte-recompile-directory (file-name-as-directory ,dir) 0)))
>> + (let ((expr `(progn
>> + (setq byte-compile-debug t) ;for proper exit status
>> + (byte-recompile-directory (file-name-as-directory ,dir) 0 1))))
>> (emacs-batch-eval expr)))
>
> Strict byte compilation should be a separate commit.

Done.

Toggle quote (13 lines)
>
>> Subject: [PATCH 03/27] gnu: Adjust ert-runner wrapper to honor EMACSLOADPATH.
>>
>> (wrap-program (string-append out "/bin/ert-runner")
>> - (list "EMACSLOADPATH" ":" '=
>> + (list "EMACSLOADPATH" ":" 'prefix
>> (append
>> ,(match dependencies
>> (((labels packages) ...)
>
> Couldn't we just use the EMACSLOADPATH environment variable as already
> set by the set-emacs-load-path phase, instead of recomputing it?

Done.

Toggle quote (12 lines)
>> Subject: [PATCH 04/27] gnu: Adapt Emacs packages to use the new check phase.
>>
>> - `(#:phases
>> - (modify-phases %standard-phases
>> - (add-before 'install 'check
>> - (lambda _
>> - (zero? (system* "./run-tests.sh")))))))
>> + `(#:tests? #t
>> + #:test-command '("sh" "run-tests.sh")))
>
> Why '("sh" "run-tests.sh") and not just '("./run-tests.sh")?

Done.

Toggle quote (5 lines)
>> + `(#:tests? #t
>> + #:test-command '("sh" "run-tests.sh")))
>
> Likewise.

Done.

Toggle quote (15 lines)
>> (modify-phases %standard-phases
>> - (add-before 'install 'check
>> + (add-before 'check 'fix-bin-dir
>> (lambda _
>> ;; The company-files-candidates-normal-root test looks
>> ;; for the /bin directory, but the build environment has
>> ;; no /bin directory. Modify the test to look for the
>> ;; /tmp directory.
>> (substitute* "test/files-tests.el"
>> - (("/bin/") "/tmp/"))
>> - (zero? (system* "make" "test-batch")))))))
>> + (("/bin/") "/tmp/")))))
>
> The fix-bin-dir phase must return a #t.

I believe it already does, looking at the definition of substitute*
(which in turn calls substitute).

Toggle quote (5 lines)
>> + `(#:tests? #t
>> + #:test-command '("emacs" "-batch"
>
> Nitpick: Use "--batch" here instead of "-batch".

Done.

Toggle quote (7 lines)
>> + "-l" "julia-mode.el"
>> + "-l" "julia-mode-tests.el"
>> + "-f" "ert-run-tests-batch-and-exit")))
>
> julia-mode.el need not be loaded explicitly. The EMACSLOADPATH
> environment variable knows where to find it.

Done.

Toggle quote (45 lines)
>> (define-public emacs-memoize
>> (package
>> - (name "emacs-memoize")
>> - (version "20130421.b55eab0")
>> - (source
>> - (origin
>> - (method git-fetch)
>> - (uri (git-reference
>> - (url "https://github.com/skeeto/emacs-memoize")
>> - (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75")))
>> - (file-name (string-append name "-" version ".tar.gz"))
>> - (sha256
>> - (base32
>> - "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw"))))
>> - (build-system emacs-build-system)
>> - (arguments
>> - `(#:phases
>> - (modify-phases %standard-phases
>> - (add-before 'install 'check
>> - (lambda _
>> - (zero? (system* "emacs" "-batch" "-l" "memoize.el"
>> - "-l" "memoize-test.el"
>> - "-f" "ert-run-tests-batch-and-exit")))))))
>> - (home-page "https://github.com/skeeto/emacs-memoize")
>> - (synopsis "Emacs lisp memoization library")
>> - (description "@code{emacs-memoize} is an Emacs library for
>> + (name "emacs-memoize")
>> + (version "20130421.b55eab0")
>> + (source
>> + (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/skeeto/emacs-memoize")
>> + (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75")))
>> + (file-name (string-append name "-" version ".tar.gz"))
>> + (sha256
>> + (base32
>> + "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw"))))
>> + (build-system emacs-build-system)
>> + (arguments
>> + `(#:tests? #t
>> + #:test-command '("emacs" "-batch"
>
> Nitpick: Use "--batch" here instead of "-batch".

Done.

Toggle quote (7 lines)
>> + "-l" "memoize.el"
>> + "-l" "memoize-test.el"
>> + "-f" "ert-run-tests-batch-and-exit")))
>
> memoize.el need not be loaded explicitly. The EMACSLOADPATH environment
> variable knows where to find it.

Good point, but memoize-test.el does not have the necessary (require
'memoize) statement required for it to work.

Toggle quote (11 lines)
>
>> + (home-page "https://github.com/skeeto/emacs-memoize")
>> + (synopsis "Emacs lisp memoization library")
>> + (description "@code{emacs-memoize} is an Emacs library for
>> memoizing functions.")
>> - (license license:unlicense)))
>> + (license license:unlicense)))
>
> Re-indent emacs-memoize as a separate commit. Else, it's very hard to
> make sense of the diff.

Done.

Toggle quote (17 lines)
>
>> (arguments
>> - `(#:phases
>> - (modify-phases %standard-phases
>> - (add-before 'install 'check
>> - (lambda _
>> - (zero? (system* "emacs" "--batch" "-L" "."
>> - "-l" "xmlgen-test.el"
>> - "-f" "ert-run-tests-batch-and-exit")))))))
>> + `(#:tests? #t
>> + #:test-command '("emacs" "--batch" "-L" "."
>> + "-l" "xmlgen-test.el"
>> + "-f" "ert-run-tests-batch-and-exit")))
>
> "-L" "." is not required. The EMACSLOADPATH environment variable already
> includes the current directory.

Good point. Done.

Toggle quote (17 lines)
>> + `(#:tests? #t
>> + #:test-command '("emacs" "--batch"
>> + "-l" "which-key-tests.el"
>> + "-f" "ert-run-tests-batch-and-exit")))
>
>> (home-page "https://github.com/lewang/ws-butler")
>> (synopsis "Trim spaces from end of lines")
>> (description
>> @@ -6480,20 +6431,14 @@ editing RPM spec files.")
>> (base32
>> "17mqki6g0wx46fn7dcbcc2pjxik7vvrcb1j9jzxim8b9psbsbnp9"))))
>> (build-system emacs-build-system)
>> + (native-inputs
>> + `(("ert-runner" ,ert-runner)))
>
> Why add ert-runner as native-input?

Removed.

Toggle quote (9 lines)
>> Subject: [PATCH 05/27] gnu: emacs-pdf-tools: Fix byte compilation.
>>
>> - (add-after 'emacs-patch-variables 'emacs-install
>> + (add-after 'emacs-patch-variables 'set-emacs-load-path
>> + (assoc-ref emacs:%standard-phases 'set-emacs-load-path))
>> + (add-after 'add-cwd-to-load-path 'emacs-install
>
> What is the add-cwd-to-load-path phase, and where is it defined?

I'm not sure :). Corrected to set-emacs-load-path.

Toggle quote (9 lines)
>> Subject: [PATCH 12/27] gnu: emacs-idris-mode: Fix hash.
>>
>> (sha256
>> (base32
>> - "0ld4kfwnyyhlsnj5f6cbn4is4mpxdqalk2aifkw02r00mbr9n294"))))
>> + "0qm4gngl6lqvra7kmivz99y3ymrg36nvqh5y9gy6gq0aa0v8az46"))))
>
> The hash seems to have changed again upstream. Please verify.

Indeed, it is now
02r1qqsxi6qk7q4cj6a6pygbj856dcw9vcmhfh0ib92j41v77q6y. Fixed.

Toggle quote (9 lines)
>> Subject: [PATCH 13/27] gnu: emacs-sx: Fix build issue.
>>
>> The package would fail building when attempting to create a cache
>> directory. This has been fixed upstream but not in a tagged release.
>
> Is it possible to cherry pick relevant commits alone and include them as
> patches? If possible, this would be preferable to switching to a git
> checkout.

I might be possible, but given that the latest v0.4 release dates back
from Jul 18 2015, I think we're better off using a recent git commit
anyway.

Toggle quote (22 lines)
>> Subject: [PATCH 15/27] gnu: Add emacs-scel.
>>
>> +(define-public emacs-scel
>> + (let ((version "20170629")
>> + (revision "1")
>> + (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
>> + (package
>> + (name "emacs-scel")
>> + (version (git-version version revision commit))
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/supercollider/scel.git")
>> + (commit commit)))
>> + (file-name (string-append name "-" version "-checkout"))
>> + (sha256
>> + (base32
>> + "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
>> + (build-system emacs-build-system)
>
> This package seems to use a cmake-build-system. Did you try that?

I didn't, on purpose. I wanted the Elisp files to be processed the same
as most of our other Emacs packages (with the patch-el-files phase
patching binaries, for example) that we would miss otherwise).

Toggle quote (7 lines)
>> From 9a3a449121246a2d26a92ee5c19d905768789a10 Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
>> Date: Wed, 28 Mar 2018 21:50:15 -0400
>> Subject: [PATCH 19/27] gnu: emacs-org-contrib: Fix hash and byte compilation.
>
> There is no hash change in the commit. Please fix the commit message.

Done.

Toggle quote (17 lines)
>> Subject: [PATCH 26/27] gnu: Add emacs-howm.
>>
>> +(define-public emacs-howm
>> + (package
>> + (name "emacs-howm")
>> + (version "1.4.4")
>> + (source (origin
>> + (method url-fetch)
>> + (uri (string-append "http://howm.sourceforge.jp/a/howm-"
>> + version ".tar.gz"))
>> + (sha256
>> + (base32
>> + "0ddm91l6z58j7x59fa966j6q1rg4cinyza4r8ibg80hprn5h31qk"))))
>> + (build-system emacs-build-system)
>
> This package seems to use the gnu-build-system. Did you try that?

No, for the same reasons explained above for the emacs-scel package.

A big thank you for reviewing this lengthy set of patches :)

You'll find the edited patches attached.

Maxim
From 19af88158eeb10d01a230c2f5bc49d4e933d35b7 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 15 Apr 2018 22:46:26 -0400
Subject: [PATCH 02/30] emacs-utils: Use invoke instead of system*.

* guix/build/emacs-utils.scm (guix): Use (guix build utils) for `invoke'.
(emacs-batch-eval): Replace `system*' usage with `invoke'.
(emacs-batch-edit-file): Likewise.
* guix/build/emacs-build-system.scm: (make-autoloads): No need to return #t
explicitly since the function now uses `invoke'.
---
guix/build/emacs-build-system.scm | 3 +--
guix/build/emacs-utils.scm | 14 +++++++-------
2 files changed, 8 insertions(+), 9 deletions(-)

Toggle diff (58 lines)
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 3ab3f91f7..dc404f04f 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -205,8 +205,7 @@ store in '.el' files."
(elpa-name (package-name->name+version elpa-name-ver))
(el-dir (string-append out %install-suffix "/" elpa-name-ver)))
(parameterize ((%emacs emacs))
- (emacs-generate-autoloads elpa-name el-dir))
- #t))
+ (emacs-generate-autoloads elpa-name el-dir))))
(define (emacs-package? name)
"Check if NAME correspond to the name of an Emacs package."
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index 8389ca582..2bd4e3985 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix build emacs-utils)
+ #:use-module (guix build utils)
#:export (%emacs
emacs-batch-eval
emacs-batch-edit-file
@@ -39,16 +41,14 @@
(define (emacs-batch-eval expr)
"Run Emacs in batch mode, and execute the elisp code EXPR."
- (unless (zero? (system* (%emacs) "--quick" "--batch"
- (format #f "--eval=~S" expr)))
- (error "emacs-batch-eval failed!" expr)))
+ (invoke (%emacs) "--quick" "--batch"
+ (format #f "--eval=~S" expr)))
(define (emacs-batch-edit-file file expr)
"Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
- (unless (zero? (system* (%emacs) "--quick" "--batch"
- (string-append "--visit=" file)
- (format #f "--eval=~S" expr)))
- (error "emacs-batch-edit-file failed!" file expr)))
+ (invoke (%emacs) "--quick" "--batch"
+ (string-append "--visit=" file)
+ (format #f "--eval=~S" expr)))
(define (emacs-generate-autoloads name directory)
"Generate autoloads for Emacs package NAME placed in DIRECTORY."
--
2.16.1
From c6fbd8d0c0a2f7663d9ff882497f40cb378ce7bd Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 15 Apr 2018 22:48:53 -0400
Subject: [PATCH 03/30] emacs-utils: Fail when byte compilation fails.

Byte compilation failures were ignored prior to this change.

* guix/build/emacs-utils.scm (emacs-byte-compile-directory): Make it fail when
there are compilation errors.
---
guix/build/emacs-utils.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index 2bd4e3985..eed17667b 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -60,7 +60,9 @@
(define* (emacs-byte-compile-directory dir)
"Byte compile all files in DIR and its sub-directories."
- (let ((expr `(byte-recompile-directory (file-name-as-directory ,dir) 0)))
+ (let ((expr `(progn
+ (setq byte-compile-debug t) ;for proper exit status
+ (byte-recompile-directory (file-name-as-directory ,dir) 0 1))))
(emacs-batch-eval expr)))
(define-syntax emacs-substitute-sexps
--
2.16.1
From 8528dc2f91d5a890694565b0daea290a96747d76 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 11 Feb 2018 00:51:26 -0500
Subject: [PATCH 04/30] emacs-build-system: Add improved check phase.

* guix/build-system/emacs.scm (emacs-build): Remove `test-target' and
'configure-flags' arguments. Add `test-command' argument.
(check): New procedure.
(%standard-phases)[check]: Register after the `build' phase.
---
guix/build-system/emacs.scm | 6 ++----
guix/build/emacs-build-system.scm | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+), 4 deletions(-)

Toggle diff (68 lines)
diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index d9f1a8d28..ef6d1b339 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -84,8 +84,7 @@
#:key source
(tests? #f)
(parallel-tests? #t)
- (test-target "test")
- (configure-flags ''())
+ (test-command ''("make" "check"))
(phases '(@ (guix build emacs-build-system)
%standard-phases))
(outputs '("out"))
@@ -110,9 +109,8 @@
source)
(source
source))
- #:configure-flags ,configure-flags
#:system ,system
- #:test-target ,test-target
+ #:test-command ,test-command
#:tests? ,tests?
#:phases ,phases
#:outputs %outputs
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index dc404f04f..5662b8af4 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -135,6 +135,28 @@ store in '.el' files."
(substitute-program-names))))
#t))
+(define* (check #:key target (tests? (not target))
+ (test-command '("make" "check")) (parallel-tests? #t)
+ #:allow-other-keys)
+ "Run the tests.
+
+By default, it runs \"make check\", but the target can be changed using the
+TARGET argument. When \"make\" is used, the tests are run in parallel unless
+PARALLEL-TESTS?. To run a custom test program or script, TEST-COMMAND can be
+specified, as a list of arguments. PARALLEL-TESTS? and TARGET don't have an
+effect when using a TEST-COMMAND."
+ (match-let (((test-program . args) test-command))
+ (let ((using-make? (string=? test-program "make")))
+ (if tests?
+ (apply invoke test-program
+ `(,@args
+ ,@(if (and using-make? parallel-tests?)
+ `("-j" ,(number->string (parallel-job-count)))
+ '())))
+ (begin
+ (format #t "test suite not run~%")
+ #t)))))
+
(define* (install #:key outputs
(include %default-include)
(exclude %default-exclude)
@@ -253,6 +275,7 @@ second hyphen. This corresponds to 'name-version' as used in ELPA packages."
;; Move the build phase after install: the .el files are byte
;; compiled directly in the store.
(delete 'build)
+ (replace 'check check)
(replace 'install install)
(add-after 'install 'build build)
(add-after 'install 'make-autoloads make-autoloads)
--
2.16.1
From 6c25dcf3335285834c20752e2187b1430d956d19 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 16 Apr 2018 22:20:21 -0400
Subject: [PATCH 07/30] gnu: emacs: Fix emacs-memoize indentation.

* gnu/packages/emacs.scm (emacs-memoize): Reindent.
---
gnu/packages/emacs.scm | 46 +++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7f6c1a4a0..9269826e2 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5061,30 +5061,30 @@ Yasnippet.")
(define-public emacs-memoize
(package
- (name "emacs-memoize")
- (version "20130421.b55eab0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/skeeto/emacs-memoize")
- (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75")))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw"))))
- (build-system emacs-build-system)
- (arguments
- `(#:tests? #t
- #:test-command '("emacs" "-batch"
- "-l" "memoize.el"
- "-l" "memoize-test.el"
- "-f" "ert-run-tests-batch-and-exit")))
- (home-page "https://github.com/skeeto/emacs-memoize")
- (synopsis "Emacs lisp memoization library")
- (description "@code{emacs-memoize} is an Emacs library for
+ (name "emacs-memoize")
+ (version "20130421.b55eab0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/skeeto/emacs-memoize")
+ (commit "b55eab0cb6ab05d941e07b8c01f1655c0cf1dd75")))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0fjwlrdm270qcrqffvarw5yhijk656q4lam79ybhaznzj0dq3xpw"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t
+ #:test-command '("emacs" "-batch"
+ "-l" "memoize.el"
+ "-l" "memoize-test.el"
+ "-f" "ert-run-tests-batch-and-exit")))
+ (home-page "https://github.com/skeeto/emacs-memoize")
+ (synopsis "Emacs lisp memoization library")
+ (description "@code{emacs-memoize} is an Emacs library for
memoizing functions.")
- (license license:unlicense)))
+ (license license:unlicense)))
(define-public emacs-linum-relative
(package
--
2.16.1
From 7a10a87d43a5b1c4b6878ca4a8e910977c94498d Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 14:08:15 -0400
Subject: [PATCH 08/30] gnu: emacs-pdf-tools: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-pdf-tools)[phases]: Add set-emacs-load-path.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9269826e2..7583d35fb 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1471,7 +1471,9 @@ filters, new key bindings and faces. It can be enabled by
;; upgrading" that pdf-tools tries to perform.
(emacs-substitute-variables "pdf-tools.el"
("pdf-tools-handle-upgrades" '()))))
- (add-after 'emacs-patch-variables 'emacs-install
+ (add-after 'emacs-patch-variables 'set-emacs-load-path
+ (assoc-ref emacs:%standard-phases 'set-emacs-load-path))
+ (add-after 'set-emacs-load-path 'emacs-install
(assoc-ref emacs:%standard-phases 'install))
(add-after 'emacs-install 'emacs-build
(assoc-ref emacs:%standard-phases 'build))
--
2.16.1
From b0ace67abb89c97f62a4a53d6de3ca0f93556f42 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 14:15:45 -0400
Subject: [PATCH 09/30] gnu: Add emacs-ert-expectations.

* gnu/packages/emacs.scm (emacs-ert-expectations): New variable.
---
gnu/packages/emacs.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7583d35fb..2c72b885d 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2425,6 +2425,23 @@ A minor mode @code{debbugs-browse-mode} let you browse URLs to the GNU Bug
Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.")
(license license:gpl3+)))
+(define-public emacs-ert-expectations
+ (package
+ (name "emacs-ert-expectations")
+ (version "0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://www.emacswiki.org/emacs/download/ert-expectations.el")
+ (sha256
+ (base32
+ "0cwy3ilsid90abzzjb7ha2blq9kmv3gfp3icwwfcz6qczgirq6g7"))))
+ (build-system emacs-build-system)
+ (home-page "https://www.emacswiki.org/emacs/download/ert-expectations.el")
+ (synopsis "Simple unit test framework for Emacs")
+ (description "A very simple unit test framework to use with @code{ERT}.")
+ (license license:gpl3+)))
+
(define-public emacs-deferred
(package
(name "emacs-deferred")
--
2.16.1
From 1f51733ba45b0a7a5a61896a9f1e54f94b925b2e Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:01:05 -0400
Subject: [PATCH 10/30] gnu: emacs-deferred: Enable tests.

* gnu/packages/emacs.scm (emacs-deferred)[phases]: Add fix-makefile.
[tests?]: Set to #t
[test-command]: Add.
[native-inputs]: Add ert-runner, emacs-ert-expectations and emacs-undercover.
---
gnu/packages/emacs.scm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 2c72b885d..8b5135f38 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2457,7 +2457,24 @@ Tracker as well as bug identifiers prepared for @code{bug-reference-mode}.")
"0xy9zb6wwkgwhcxdnslqk52bq3z24chgk6prqi4ks0qcf2bwyh5h"))
(file-name (string-append name "-" version))))
(build-system emacs-build-system)
- ;; FIXME: Would need 'el-expectations' to actually run tests.
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-makefile
+ (lambda _
+ (substitute* "Makefile"
+ (("\\$\\(CASK\\) exec ") ""))
+ #t)))
+ #:tests? #t
+ ;; FIXME: Normally we'd run the "test" target but for some reason the
+ ;; test-deferred target fails when run in the Guix build environment
+ ;; with the error: (file-error "Searching for program" "No such file or
+ ;; directory" "/bin/sh").
+ #:test-command '("make" "test-concurrent" "test-concurrent-compiled")))
+ (native-inputs
+ `(("ert-runner" ,ert-runner)
+ ("emacs-ert-expectations" ,emacs-ert-expectations)
+ ("emacs-undercover" ,emacs-undercover)))
(synopsis "Simple asynchronous functions for Emacs Lisp")
(description
"The @code{deferred.el} library provides support for asynchronous tasks.
--
2.16.1
From fd32c52f42112a7d50b1835878af44aaf22f8224 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:03:35 -0400
Subject: [PATCH 11/30] gnu: emacs-org-trello: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-org-trello)[native-inputs]: Add emacs-f and
emacs-helm.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 8b5135f38..1ce36c69c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2976,7 +2976,9 @@ started with 20 minutes. All values are customizable.")
`(("emacs-deferred" ,emacs-deferred)
("emacs-request" ,emacs-request)
("emacs-dash" ,emacs-dash)
- ("emacs-s" ,emacs-s)))
+ ("emacs-s" ,emacs-s)
+ ("emacs-f" ,emacs-f)
+ ("emacs-helm" ,emacs-helm)))
(home-page "https://org-trello.github.io")
(synopsis "Emacs minor mode for interacting with Trello")
(description "This package provides an Emacs minor mode to extend
--
2.16.1
From 5e390573d856b83df97301c68eaccf16efaefdf8 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:05:28 -0400
Subject: [PATCH 12/30] gnu: emacs-smartparens: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-smartparens)[propagated-inputs]: Add
emacs-markdown-mode.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 1ce36c69c..f86dc3237 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3105,7 +3105,9 @@ single theme but a set of guidelines with numerous implementations.")
(base32
"0q5as813xs8y29i3v2rm97phd6m7xsmmw6hwbvx57gwmi8i1c409"))))
(build-system emacs-build-system)
- (propagated-inputs `(("emacs-dash" ,emacs-dash)))
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-markdown-mode" ,emacs-markdown-mode)))
(home-page "https://github.com/Fuco1/smartparens")
(synopsis "Paredit-like insertion, wrapping and navigation with user
defined pairs")
--
2.16.1
From faae23c6bf52e930152c02870830335805346911 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:09:38 -0400
Subject: [PATCH 13/30] gnu: emacs-realgud: Adapt phase for the reworked
emacs-build-system.

* gnu/packages/emacs.scm (emacs-realgud)[phases]: Move the fix-autogen-script
after the set-emacs-load-path phase.
---
gnu/packages/emacs.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f86dc3237..c533cb414 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3286,7 +3286,7 @@ after buffer changes.")
`(#:tests? #t
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'fix-autogen-script
+ (add-after 'set-emacs-load-path 'fix-autogen-script
(lambda _
(substitute* "autogen.sh"
(("./configure") "sh configure"))))
--
2.16.1
From 1f8c732e4ee4a919c40e1624c46df664513a9008 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 16:11:53 -0400
Subject: [PATCH 14/30] gnu: emacs-request: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-request)[propagated-inputs]: Add emacs-deferred.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index c533cb414..a7e9e2f3a 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -3340,6 +3340,8 @@ parallel.")
(base32
"0wyxqbb35yqf6ci47531lk32d6fppamx9d8826kdz983vm87him7"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-deferred" ,emacs-deferred)))
(home-page "https://github.com/tkf/emacs-request")
(synopsis "Package for speaking HTTP in Emacs Lisp")
(description "This package provides a HTTP request library with multiple
--
2.16.1
From 72382eebe1fa8b14a22befaea2e3e5fb0fb00da1 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 19 Mar 2018 21:13:33 -0400
Subject: [PATCH 15/30] gnu: emacs-idris-mode: Fix hash.

* gnu/packages/emacs.scm (emacs-idris-mode): Fix hash.
---
gnu/packages/emacs.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a7e9e2f3a..7c35b43a0 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6587,7 +6587,7 @@ key. Optionally, a mouse pop-up can be added by binding
version ".tar"))
(sha256
(base32
- "0ld4kfwnyyhlsnj5f6cbn4is4mpxdqalk2aifkw02r00mbr9n294"))))
+ "02r1qqsxi6qk7q4cj6a6pygbj856dcw9vcmhfh0ib92j41v77q6y"))))
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-prop-menu" ,emacs-prop-menu)))
--
2.16.1
From 9b22ad62152814d3518c17a2193c6b4d3448cc23 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 19 Mar 2018 21:28:42 -0400
Subject: [PATCH 16/30] gnu: emacs-sx: Fix build issue.

The package would fail building when attempting to create a cache
directory. This has been fixed upstream but not in a tagged release.

* gnu/packages/emacs.scm (emacs-sx): Update to latest git version.
---
gnu/packages/emacs.scm | 42 +++++++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 19 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7c35b43a0..a2a43b4f6 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1736,26 +1736,30 @@ strings.")
(license license:gpl2+)))
(define-public emacs-sx
- (package
- (name "emacs-sx")
- (version "0.4")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/vermiculus/sx.el/"
- "archive/v" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1w0xghfljqg31axcnv8gzlrd8pw25nji6idnrhflq0af9qh1dw03"))))
- (build-system emacs-build-system)
- (propagated-inputs
- `(("emacs-markdown-mode" ,emacs-markdown-mode)))
- (home-page "https://github.com/vermiculus/sx.el/")
- (synopsis "Emacs StackExchange client")
- (description
- "Emacs StackExchange client. Ask and answer questions on
+ (let ((version "20180212")
+ (revision "1")
+ (commit "833435fbf90d1c9e927d165b155f3b1ef39271de"))
+ (package
+ (name "emacs-sx")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vermiculus/sx.el")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1369xaxq1vy3d9yh862ddnhddikdpg2d0wv1ly00pnvdp9v4cqgd"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-markdown-mode" ,emacs-markdown-mode)))
+ (home-page "https://github.com/vermiculus/sx.el")
+ (synopsis "Emacs StackExchange client")
+ (description
+ "Emacs StackExchange client. Ask and answer questions on
Stack Overflow, Super User, and other StackExchange sites.")
- (license license:gpl3+)))
+ (license license:gpl3+))))
(define-public emacs-f
(package
--
2.16.1
From 63f66d9ff591c4d41c65c541ac069fe2851f80ea Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 19 Mar 2018 21:55:27 -0400
Subject: [PATCH 17/30] gnu: emacs-polymode: Fix compilation error.

* gnu/packages/emacs.scm (emacs-polymode)
[add-modes-subdir-to-loadpath]: New phase.
---
gnu/packages/emacs.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a2a43b4f6..0bbc63bf6 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6917,6 +6917,15 @@ contexts.
(base32
"057cybkq3cy07n5s332k071sjiky3mziy003lza4rh75mgqkwhmh"))))
(build-system emacs-build-system)
+ (arguments
+ `(#:include (cons* "^modes/.*\\.el$" %default-include)
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'set-emacs-load-path 'add-modes-subdir-to-load-path
+ (lambda _
+ (setenv "EMACSLOADPATH"
+ (string-append (getenv "EMACSLOADPATH")
+ ":" (getcwd) "/modes" ":")))))))
(home-page "https://github.com/vspinu/polymode")
(synopsis "Framework for multiple Emacs modes based on indirect buffers")
(description "Polymode is an Emacs package that offers generic support
--
2.16.1
From 5929cf659034db87f96d8e6ff4395f1c01148dfc Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 18 Mar 2018 16:37:30 -0400
Subject: [PATCH 18/30] gnu: Add emacs-scel.

* gnu/packages/emacs.scm (emacs-scel): New variable.
---
gnu/packages/emacs.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 0bbc63bf6..f91a764b8 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2646,6 +2646,59 @@ implementation in Emacs. To use it just load this file and bind that function
to a key in your preferred mode.")
(license license:public-domain))))
+(define-public emacs-scel
+ (let ((version "20170629")
+ (revision "1")
+ (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
+ (package
+ (name "emacs-scel")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/supercollider/scel.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'move-el-files
+ (lambda _
+ (for-each
+ (lambda (f)
+ (rename-file f (basename f)))
+ (find-files "el" "^.*\\.el(\\.in)?$"))
+ #t))
+ (add-after 'move-el-files 'configure-sclang-vars
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((supercollider (assoc-ref inputs "supercollider")))
+ (substitute* "sclang-vars.el.in"
+ (("@PKG_DATA_DIR@")
+ (string-append supercollider "/share/SuperCollider"))
+ ;; See: https://github.com/widp/el-supercollider/issues/1
+ (("Help") "HelpSource")))
+ (rename-file "sclang-vars.el.in" "sclang-vars.el")
+ #t))
+ (add-after 'configure-sclang-vars 'install-extensions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (ext-dir (string-append
+ out "/share/SuperCollider/Extensions"
+ "/scide_scel")))
+ (delete-file "sc/CMakeLists.txt")
+ (copy-recursively "sc" ext-dir))
+ #t)))))
+ (inputs
+ `(("supercollider" ,supercollider)))
+ (home-page "https://github.com/supercollider/scel")
+ (synopsis "SuperCollider Emacs interface")
+ (description "scel is an Emacs based interface to SuperCollider.")
+ (license license:gpl2+))))
+
(define-public emacs-mit-scheme-doc
(package
(name "emacs-mit-scheme-doc")
--
2.16.1
From d8aff6113460735bf0a3de77382dc43383e27af6 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 24 Mar 2018 21:37:41 -0400
Subject: [PATCH 19/30] gnu: Add emacs-kv.

* gnu/packages/emacs.scm (emacs-kv): New variable.
---
gnu/packages/emacs.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f91a764b8..335142b55 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -7230,6 +7230,31 @@ scratch buffer, and, by virtue of this extension, do so using the Emacs
formatting rules for that language.")
(license license:bsd-2))))
+(define-public emacs-kv
+ (package
+ (name "emacs-kv")
+ (version "0.0.19")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nicferrier/emacs-kv.git")
+ (commit "721148475bce38a70e0b678ba8aa923652e8900e")))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0r0lz2s6gvy04fwnafai668jsf4546h4k6zd6isx5wpk0n33pj5m"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t
+ #:test-command '("ert-runner" "kv-tests.el")))
+ (native-inputs
+ `(("ert-runner" ,ert-runner)))
+ (home-page "https://github.com/nicferrier/emacs-kv")
+ (synopsis "Key/value data structures library")
+ (description "A collection of tools for dealing with key/value data
+structures such as plists, alists and hash-tables.")
+ (license license:gpl3+)))
+
(define-public emacs-esxml
(package
(name "emacs-esxml")
--
2.16.1
From baae04ddbf5edd0512d7144d937aa508de112070 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 24 Mar 2018 23:07:18 -0400
Subject: [PATCH 20/30] gnu: emacs-esxml: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-esxml): Add phases to patch sources.
---
gnu/packages/emacs.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 335142b55..4773c34b1 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -7269,6 +7269,32 @@ structures such as plists, alists and hash-tables.")
(base32
"00vv8a75wdklygdyr4km9mc2ismxak69c45jmcny41xl44rp9x8m"))))
(build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; See: https://github.com/tali713/esxml/pull/28.
+ (add-after 'unpack 'fix-css-lite.el
+ (lambda _
+ (substitute* "css-lite.el"
+ ((";;; main interface")
+ (string-append ";;; main interface\n"
+ "(require 'cl-lib)"))
+ (("mapcan")
+ "cl-mapcan")
+ (("',\\(cl-mapcan #'process-css-rule rules\\)")
+ "(cl-mapcan #'process-css-rule ',rules)"))
+ #t))
+ (add-after 'fix-css-lite.el 'fix-esxml-form.el
+ (lambda _
+ (substitute* "esxml-form.el"
+ ((",esxml-form-field-defn")
+ "#'esxml-form-field-defn"))))
+ ;; See: https://github.com/tali713/esxml/issues/25
+ (add-after 'fix-esxml-form.el 'rm-broken-test-file.el
+ (lambda _
+ (delete-file "esxpath.el"))))))
+ (propagated-inputs
+ `(("emacs-kv" ,emacs-kv)))
(home-page "https://github.com/tali713/esxml/")
(synopsis "SXML for EmacsLisp")
(description "This is XML/XHTML done with S-Expressions in EmacsLisp.
--
2.16.1
From c6b89b0f02e3f7a2e0c622c4a21283548047ce24 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 28 Mar 2018 20:56:18 -0400
Subject: [PATCH 21/30] gnu: emacs-mu4e-alert: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-mu4e-alert)[propagated-inputs]: Add mu.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 4773c34b1..7936e6bec 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -90,6 +90,7 @@
#:use-module (gnu packages xml)
#:use-module (gnu packages glib)
#:use-module (gnu packages acl)
+ #:use-module (gnu packages mail)
#:use-module (gnu packages package-management)
#:use-module (gnu packages perl)
#:use-module (gnu packages pdf)
@@ -5025,7 +5026,8 @@ customizable by the user.")
"07qc834qnxn8xi4bw5nawj8g91bmkzw0r0vahkgysp7r9xrf57gj"))))
(build-system emacs-build-system)
(propagated-inputs
- `(("emacs-alert" ,emacs-alert)
+ `(("mu" ,mu) ;for byte compilation
+ ("emacs-alert" ,emacs-alert)
("emacs-s" ,emacs-s)
("emacs-ht" ,emacs-ht)))
(home-page "https://github.com/iqbalansari/mu4e-alert")
--
2.16.1
From e931e99c2e34ed225af73ed4b7c39d3bb834fac9 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 28 Mar 2018 21:50:15 -0400
Subject: [PATCH 22/30] gnu: emacs-org-contrib: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-org-contrib)[native-inputs]: Add emacs-scel.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7936e6bec..fc0ae5ffb 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4640,6 +4640,8 @@ reproducible research.")
out "/share/emacs/site-lisp/guix.d/org-contrib-" ,version)
(for-each delete-file duplicates))
#t))))))
+ (native-inputs
+ `(("emacs-scel" ,emacs-scel))) ;for byte compilation
(propagated-inputs
`(("emacs-org" ,emacs-org)))
(synopsis "Contributed packages to Org mode")
--
2.16.1
From 48c861c552d26277636bd54aa3bde86fb46895ef Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 20:41:48 -0400
Subject: [PATCH 23/30] gnu: emacs-evil-matchit: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-evil-matchit)[propagated-inputs]: Add
emacs-evil.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index fc0ae5ffb..2b175a83f 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -7065,6 +7065,8 @@ Feautures:
(base32
"1hm0k53m7d8zv2pk4p93k5mmilsv1mz7y2z6dqf7r6f0zmncs31a"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("evil" ,emacs-evil)))
(home-page "https://github.com/redguardtoo/evil-matchit")
(synopsis "Vim matchit ported into Emacs")
(description
--
2.16.1
From 868f4e4e871e255ba29a3d1b5924a147526e9054 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 21:18:16 -0400
Subject: [PATCH 24/30] gnu: Add emacs-spark.

* gnu/packages/emacs.scm (emacs-spark): New variable.
---
gnu/packages/emacs.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 2b175a83f..f00b9864c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1909,6 +1909,29 @@ Expectations, but it can be used in other contexts.")
definitions for testing with the Ecukes framework.")
(license license:gpl3+)))
+(define-public emacs-spark
+ (let ((version "20160503") ;no proper tag, use date of commit
+ (commit "0bf148c3ede3b31d56fd75f347cdd0b0eae60025")
+ (revision "1"))
+ (package
+ (name "emacs-spark")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alvinfrancis/spark.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ykqr86j17mi95s08d9fp02d7ych1331b04dcqxzxnmpkhwngyj1"))))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/alvinfrancis/spark")
+ (synopsis "Port of cl-spark to Emacs Lisp")
+ (description "This library is a straightforward port of @code{cl-spark}
+to Emacs Lisp.")
+ (license license:expat))))
+
(define-public emacs-es-mode
(package
(name "emacs-es-mode")
--
2.16.1
From 8f16738318a7229898c87d7467fb193cd55b3554 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 21:18:36 -0400
Subject: [PATCH 25/30] gnu: emacs-es-mode: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-es-mode)[propagated-inputs]: Add emacs-dash
and emacs-spark.
---
gnu/packages/emacs.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f00b9864c..4b0fa7acd 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1949,7 +1949,9 @@ to Emacs Lisp.")
(propagated-inputs
;; The version of org in Emacs 24.5 is not sufficient, and causes tables
;; to be rendered incorrectly
- `(("emacs-org" ,emacs-org)))
+ `(("emacs-org" ,emacs-org)
+ ("emacs-dash" ,emacs-dash)
+ ("emacs-spark" ,emacs-spark)))
(home-page "https://github.com/dakrone/es-mode")
(synopsis "Major mode for editing Elasticsearch queries")
(description "@code{es-mode} includes highlighting, completion and
--
2.16.1
From de2adbd9538d50efd52d13c18403bc3c13712ae4 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 21:46:35 -0400
Subject: [PATCH 26/30] gnu: Add emacs-eimp.

* gnu/packages/emacs.scm (emacs-eimp): New variable.
---
gnu/packages/emacs.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 4b0fa7acd..3c3d9e8db 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6361,6 +6361,44 @@ from within Emacs. Restclient runs queries from a plan-text query sheet,
displays results pretty-printed in XML or JSON with @code{restclient-mode}")
(license license:public-domain))))
+(define-public emacs-eimp
+ (let ((version "1.4.0")
+ (commit "2e7536fe6d8f7faf1bad7a8ae37faba0162c3b4f")
+ (revision "1"))
+ (package
+ (name "emacs-eimp")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nicferrier/eimp.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "154d57yafxbcf39r89n5j43c86rp2fki3lw3gwy7ww2g6qkclcra"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-mogrify-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((imagemagick (assoc-ref inputs "imagemagick")))
+ ;; eimp.el is read-only in git.
+ (invoke "chmod" "+w" "eimp.el")
+ (emacs-substitute-variables "eimp.el"
+ ("eimp-mogrify-program"
+ (string-append imagemagick "/bin/mogrify"))))
+ #t)))))
+ (inputs
+ `(("imagemagick" ,imagemagick))) ;provides the mogrify binary.
+ (home-page "https://github.com/nicferrier/eimp")
+ (synopsis "Interactive image manipulation from within Emacs")
+ (description "This package allows interactive image manipulation from
+within Emacs. It uses the code@{mogrify} utility from ImageMagick to do the
+actual transformations.")
+ (license license:gpl2+))))
+
(define-public emacs-dired-hacks
(let ((commit "eda68006ce73bbf6b9b995bfd70d08bec8cade36")
(revision "1"))
--
2.16.1
From f0ce29d5fe5e096631f35e2c2459371c121ad3cb Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 22:56:29 -0400
Subject: [PATCH 27/30] gnu: emacs-dired-hacks: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-dired-hacks)[propagated-inputs]: Add emacs-eimp.
---
gnu/packages/emacs.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 3c3d9e8db..c860a647d 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6418,6 +6418,7 @@ actual transformations.")
(build-system emacs-build-system)
(propagated-inputs
`(("emacs-dash" ,emacs-dash)
+ ("emacs-eimp" ,emacs-eimp)
("emacs-f" ,emacs-f)
("emacs-s" ,emacs-s)))
(home-page "https://github.com/Fuco1/dired-hacks")
--
2.16.1
From 1f50be860953ba79fd6bd2675b9fab9a1255a674 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Fri, 30 Mar 2018 23:16:10 -0400
Subject: [PATCH 28/30] gnu: emacs-cdlatex: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-cdlatex)[propagated-inputs]: Add emacs-auctex.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index c860a647d..ed0fd6f91 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5616,6 +5616,8 @@ conversion for Emacs Lisp.")
(base32
"0pivapphmykc6vhvpx7hdyl55ls37vc4jcrxpvs4yk7jzcmwa9xp"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-auctex" ,emacs-auctex)))
(home-page "https://github.com/cdominik/cdlatex")
(synopsis "Fast Emacs input methods for LaTeX environments and
math")
--
2.16.1
From ef406206b7bc1ebbdb940010e51a1e96dd01bb61 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 00:22:24 -0400
Subject: [PATCH 29/30] gnu: Add emacs-howm.

* gnu/packages/emacs.scm (emacs-howm): New variable.
---
gnu/packages/emacs.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index ed0fd6f91..5ca0c7a6c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1184,6 +1184,25 @@ or XEmacs.")
a set of simplified face specifications and a user-supplied color palette")
(license license:gpl3+)))
+(define-public emacs-howm
+ (package
+ (name "emacs-howm")
+ (version "1.4.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://howm.sourceforge.jp/a/howm-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ddm91l6z58j7x59fa966j6q1rg4cinyza4r8ibg80hprn5h31qk"))))
+ (build-system emacs-build-system)
+ (home-page "http://howm.osdn.jp/")
+ (synopsis "Note-taking tool for Emacs")
+ (description "Howm is a note-taking tool for Emacs. Like with
+code@{emacs-wiki.el}, it facilitates using hyperlinks and doing full-text
+searches. Unlike code@{emacs-wiki.el}, it can be combined with any format.")
+ (license license:gpl1+)))
+
(define-public emacs-calfw
(package
(name "emacs-calfw")
--
2.16.1
From 1fb7cb90b8e4334a88d861cc9e7d417d87bbeee6 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 00:25:23 -0400
Subject: [PATCH 30/30] gnu: emacs-calfw: Fix byte compilation.

* gnu/packages/emacs.scm (emacs-calfw)[propagated-inputs]: Add emacs-howm.
---
gnu/packages/emacs.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 5ca0c7a6c..eccba23d1 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1218,6 +1218,8 @@ searches. Unlike code@{emacs-wiki.el}, it can be combined with any format.")
(base32
"17ssg8gx66yp63nhygjq2r6kgl4h45cacmrxsxs9f0lrfcx37k0l"))))
(build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-howm" ,emacs-howm)))
(home-page "https://github.com/kiwanami/emacs-calfw/")
(synopsis "Calendar framework for Emacs")
(description
--
2.16.1
A
A
Arun Isaac wrote on 20 Apr 2018 19:46
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 31018@debbugs.gnu.org)
cu7k1t1zs7s.fsf@systemreboot.net
I've pushed all patches except those concerning strict byte compilation,
emacs-scel, emacs-org-contrib, emacs-howm and emacs-calfw.

Some comments follow.

Toggle quote (2 lines)
> Done, although match-let appears to be undocumented :/.

Yes, match-let is currently undocumented. But, I have a pending patch to
guile regarding this. So, hopefully, this will be fixed soon.


Toggle quote (24 lines)
> In the past I played with attempting to define a
> search-path-specification for our Emacs package, which would
> generalize even more the way our Emacs packages are discovered in
> Guix. That ended up looking like the following:
>
> --8<---------------cut here---------------start------------->8---
> + (native-search-paths
> + (list (search-path-specification
> + (variable "EMACSLOADPATH")
> + (files '("share/emacs/site-lisp"))
> + (file-pattern ".*")
> + (append-separator? #t))))))
> --8<---------------cut here---------------end--------------->8---
>
> Where the new "append-separator?" argument was added by myself (this is
> a world rebuilding change and also changes the manifest file). I didn't
> pursue that for now given that it still suffers from 1. explained above.
>
> The nice properties of this however was that it was now possible to have
> the Emacs dependencies found in `guix environment' as well as in the
> build system (anywhere), by using the native mechanism that Guix comes
> with. If you have interest in going that way I could revive those two
> old patches.

For now, I've pushed with the set-emacs-load-path function you
provided. But, you could pursue this world rebuilding search-paths
approach as a separate bug report.

Toggle quote (26 lines)
>>> Subject: [PATCH 15/27] gnu: Add emacs-scel.
>>>
>>> +(define-public emacs-scel
>>> + (let ((version "20170629")
>>> + (revision "1")
>>> + (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
>>> + (package
>>> + (name "emacs-scel")
>>> + (version (git-version version revision commit))
>>> + (source (origin
>>> + (method git-fetch)
>>> + (uri (git-reference
>>> + (url "https://github.com/supercollider/scel.git")
>>> + (commit commit)))
>>> + (file-name (string-append name "-" version "-checkout"))
>>> + (sha256
>>> + (base32
>>> + "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
>>> + (build-system emacs-build-system)
>>
>> This package seems to use a cmake-build-system. Did you try that?
>
> I didn't, on purpose. I wanted the Elisp files to be processed the same
> as most of our other Emacs packages (with the patch-el-files phase
> patching binaries, for example) that we would miss otherwise).

I get your point. But, I think we can use phases from both the
emacs-build-system and the cmake-build-system, like I have done in the
attached patch. This keeps us more in line with the upstream repo,
rather than us reinventing too much. WDYT?
From dd4d51654c04a44ed77692b0207763255c733c00 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 18 Mar 2018 16:37:30 -0400
Subject: [PATCH 2/2] gnu: Add emacs-scel.

* gnu/packages/emacs.scm (emacs-scel): New variable.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
---
gnu/packages/emacs.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (72 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9f6965848..38ffcc472 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -65,6 +65,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages audio)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages code)
#:use-module (gnu packages databases)
#:use-module (gnu packages guile)
@@ -2713,6 +2714,57 @@ implementation in Emacs. To use it just load this file and bind that function
to a key in your preferred mode.")
(license license:public-domain))))
+(define-public emacs-scel
+ (let ((version "20170629")
+ (revision "1")
+ (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
+ (package
+ (name "emacs-scel")
+ (version (git-version version revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/supercollider/scel.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:modules ((guix build emacs-build-system)
+ ((guix build cmake-build-system) #:prefix cmake:)
+ (guix build utils))
+ #:imported-modules (,@%emacs-build-system-modules
+ (guix build cmake-build-system))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "el/CMakeLists.txt"
+ (("share/emacs/site-lisp/SuperCollider")
+ (string-append
+ "share/emacs/site-lisp/guix.d/scel-" ,version)))
+ ((assoc-ref cmake:%standard-phases 'configure)
+ #:outputs outputs
+ #:configure-flags '("-DSC_EL_BYTECOMPILE=OFF"))))
+ (add-after 'set-emacs-load-path 'add-el-dir-to-emacs-load-path
+ (lambda _
+ (setenv "EMACSLOADPATH"
+ (string-append (getcwd) "/el:" (getenv "EMACSLOADPATH")))
+ #t))
+ (replace 'install (assoc-ref cmake:%standard-phases 'install)))))
+ (inputs
+ `(("supercollider" ,supercollider)))
+ (native-inputs
+ `(("cmake" ,cmake)))
+ (home-page "https://github.com/supercollider/scel")
+ (synopsis "SuperCollider Emacs interface")
+ (description "@code{emacs-scel} is an Emacs interface to SuperCollider.
+SuperCollider is a platform for audio synthesis and algorithmic composition.")
+ (license license:gpl2+))))
+
(define-public emacs-mit-scheme-doc
(package
(name "emacs-mit-scheme-doc")
--
2.15.1
Toggle quote (6 lines)
>>> Subject: [PATCH 26/27] gnu: Add emacs-howm.
>>>
>> This package seems to use the gnu-build-system. Did you try that?
>
> No, for the same reasons explained above for the emacs-scel package.

Likewise. In this case, if we don't use the gnu-build-system, we'd miss
installing some of the files. Please look at my attached patch and see
if that is acceptable.

Also, all of howm's source files declare gpl1+ to be the license. But,
their COPYING file is of gpl2. Could you bring this contradiction to the
attention of upstream?
From afc86b1916a27e3c82863bf69f89aad3a89ab3d7 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sat, 31 Mar 2018 00:22:24 -0400
Subject: [PATCH 1/2] gnu: Add emacs-howm.

* gnu/packages/emacs.scm (emacs-howm): New variable.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
---
gnu/packages/emacs.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index b2fd069d3..9f6965848 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1185,6 +1185,42 @@ or XEmacs.")
a set of simplified face specifications and a user-supplied color palette")
(license license:gpl3+)))
+(define-public emacs-howm
+ (package
+ (name "emacs-howm")
+ (version "1.4.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://howm.sourceforge.jp/a/howm-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0ddm91l6z58j7x59fa966j6q1rg4cinyza4r8ibg80hprn5h31qk"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("emacs" ,emacs-minimal)))
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--with-howmdir=" %output
+ "/share/emacs/site-lisp/guix.d/howm-" ,version))
+ #:modules ((guix build gnu-build-system)
+ ((guix build emacs-build-system) #:prefix emacs:)
+ (guix build utils))
+ #:imported-modules (,@%gnu-build-system-modules
+ (guix build emacs-build-system)
+ (guix build emacs-utils))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'rename-lispdir 'make-autoloads
+ (assoc-ref emacs:%standard-phases 'make-autoloads)))))
+ (home-page "http://howm.osdn.jp/")
+ (synopsis "Note-taking tool for Emacs")
+ (description "Howm is a note-taking tool for Emacs. Like
+code@{emacs-wiki.el}, it facilitates using hyperlinks and doing full-text
+searches. Unlike code@{emacs-wiki.el}, it can be combined with any format.")
+ (license license:gpl1+)))
+
(define-public emacs-calfw
(package
(name "emacs-calfw")
--
2.15.1
Toggle quote (18 lines)
> Subject: [PATCH 22/30] gnu: emacs-org-contrib: Fix byte compilation.
>
> * gnu/packages/emacs.scm (emacs-org-contrib)[native-inputs]: Add emacs-scel.
> ---
> gnu/packages/emacs.scm | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index 7936e6bec..fc0ae5ffb 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -4640,6 +4640,8 @@ reproducible research.")
> out "/share/emacs/site-lisp/guix.d/org-contrib-" ,version)
> (for-each delete-file duplicates))
> #t))))))
> + (native-inputs
> + `(("emacs-scel" ,emacs-scel))) ;for byte compilation

Should emacs-scel only be a native input, or should it be a propagated input?

Toggle quote (2 lines)
> A big thank you for reviewing this lengthy set of patches :)

Thank you for your patience! :-)
A
A
Arun Isaac wrote on 3 May 2018 18:32
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 31018-done@debbugs.gnu.org)
cu7zi1gwvgx.fsf@systemreboot.net
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (2 lines)
> Should emacs-scel only be a native input, or should it be a propagated input?

I made emacs-scel a propagated input, and pushed all commits as
discussed.

Thanks!
Closed
A
A
Arun Isaac wrote on 3 May 2018 18:54
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 31018-done@debbugs.gnu.org)
cu7wowkwuh7.fsf@systemreboot.net
I also fixed the tests for emacs-deferred. It was a simple matter of
setting the SHELL environment variable.
Closed
M
M
Maxim Cournoyer wrote on 7 May 2018 14:13
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 31018@debbugs.gnu.org)
878t8vacjn.fsf@gmail.com
Hi Arun,

Better late than never... eh. Thanks for merging the changes. I'll
address some of your points post-mortem, in case you'd still like to
know my ideas on them :)

Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (40 lines)
> I've pushed all patches except those concerning strict byte compilation,
> emacs-scel, emacs-org-contrib, emacs-howm and emacs-calfw.
>
> Some comments follow.
>
>> Done, although match-let appears to be undocumented :/.
>
> Yes, match-let is currently undocumented. But, I have a pending patch to
> guile regarding this. So, hopefully, this will be fixed soon.
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30144
>
>> In the past I played with attempting to define a
>> search-path-specification for our Emacs package, which would
>> generalize even more the way our Emacs packages are discovered in
>> Guix. That ended up looking like the following:
>>
>> --8<---------------cut here---------------start------------->8---
>> + (native-search-paths
>> + (list (search-path-specification
>> + (variable "EMACSLOADPATH")
>> + (files '("share/emacs/site-lisp"))
>> + (file-pattern ".*")
>> + (append-separator? #t))))))
>> --8<---------------cut here---------------end--------------->8---
>>
>> Where the new "append-separator?" argument was added by myself (this is
>> a world rebuilding change and also changes the manifest file). I didn't
>> pursue that for now given that it still suffers from 1. explained above.
>>
>> The nice properties of this however was that it was now possible to have
>> the Emacs dependencies found in `guix environment' as well as in the
>> build system (anywhere), by using the native mechanism that Guix comes
>> with. If you have interest in going that way I could revive those two
>> old patches.
>
> For now, I've pushed with the set-emacs-load-path function you
> provided. But, you could pursue this world rebuilding search-paths
> approach as a separate bug report.

I will, as free time allows :)

Toggle quote (32 lines)
>
>>>> Subject: [PATCH 15/27] gnu: Add emacs-scel.
>>>>
>>>> +(define-public emacs-scel
>>>> + (let ((version "20170629")
>>>> + (revision "1")
>>>> + (commit "aeea3ad4be9306d14c3a734a4ff54fee10ac135b"))
>>>> + (package
>>>> + (name "emacs-scel")
>>>> + (version (git-version version revision commit))
>>>> + (source (origin
>>>> + (method git-fetch)
>>>> + (uri (git-reference
>>>> + (url "https://github.com/supercollider/scel.git")
>>>> + (commit commit)))
>>>> + (file-name (string-append name "-" version "-checkout"))
>>>> + (sha256
>>>> + (base32
>>>> + "0jvmzs1lsjyndqshhii2y4mnr3wghai26i3p75453zrpxpg0zvvw"))))
>>>> + (build-system emacs-build-system)
>>>
>>> This package seems to use a cmake-build-system. Did you try that?
>>
>> I didn't, on purpose. I wanted the Elisp files to be processed the same
>> as most of our other Emacs packages (with the patch-el-files phase
>> patching binaries, for example) that we would miss otherwise).
>
> I get your point. But, I think we can use phases from both the
> emacs-build-system and the cmake-build-system, like I have done in the
> attached patch. This keeps us more in line with the upstream repo,
> rather than us reinventing too much. WDYT?

Seems reasonable.

[...]

Toggle quote (10 lines)
>>>> Subject: [PATCH 26/27] gnu: Add emacs-howm.
>>>>
>>> This package seems to use the gnu-build-system. Did you try that?
>>
>> No, for the same reasons explained above for the emacs-scel package.
>
> Likewise. In this case, if we don't use the gnu-build-system, we'd miss
> installing some of the files. Please look at my attached patch and see
> if that is acceptable.

I've taken a look, it looks more complete (you've got the tests enabled
now). Great work.

Toggle quote (4 lines)
> Also, all of howm's source files declare gpl1+ to be the license. But,
> their COPYING file is of gpl2. Could you bring this contradiction to the
> attention of upstream?

This is surprising indeed. I've let a note about it to the author here:

Thank you,

Maxim
M
M
Maxim Cournoyer wrote on 7 May 2018 14:21
Re: bug#31018: closed (Re: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.)
(name . GNU bug Tracking System)(address . help-debbugs@gnu.org)(address . 31018@debbugs.gnu.org)
87zi1b8xmg.fsf@gmail.com
Hi Arun,

Toggle quote (13 lines)
> From: Arun Isaac <arunisaac@systemreboot.net>
> Subject: Re: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.
> To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> Cc: 31018-done@debbugs.gnu.org
> Date: Thu, 03 May 2018 22:02:46 +0530 (3 days, 19 hours, 41 minutes ago)

> Arun Isaac <arunisaac@systemreboot.net> writes:

> > Should emacs-scel only be a native input, or should it be a propagated input?

> I made emacs-scel a propagated input, and pushed all commits as
> discussed.

No objections; thanks again :)

Maxim
A
A
Arun Isaac wrote on 7 May 2018 16:14
Re: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 31018@debbugs.gnu.org)
cu7in7zblik.fsf@systemreboot.net
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (2 lines)
> Thanks for merging the changes.

Thank you for contributing to Guix! :-)
?