unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: 31018@debbugs.gnu.org
Subject: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.
Date: Mon, 16 Apr 2018 22:59:41 -0400	[thread overview]
Message-ID: <87d0yyo7vm.fsf_-_@gmail.com> (raw)
In-Reply-To: <9925e912.AM4AAAS8QCUAAAAAAAAAAAPHPfsAAAACwQwAAAAAAAW9WABa0jGH@mailjet.com> (Arun Isaac's message of "Sat, 14 Apr 2018 22:21:10 +0530")

[-- Attachment #1: Type: text/plain, Size: 16083 bytes --]

Hello Arun,

Arun Isaac <arunisaac@systemreboot.net> writes:

> 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.

[...]

>> -(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.

>> -(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 :).

>> 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:

--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.

> 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.

>
>>      (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 :).

>> +  (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 :/.

>
>>      (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.

[...]

>>  (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.

>
>> 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.

>> 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.

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

Done.

>>         (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).

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

Done.

>> +                          "-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.

>>  (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.

>> +                        "-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.

>
>> +    (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.

>
>>      (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.

>> +     `(#: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.

>> 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.

>> 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.

>> 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.

>> 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).

>> 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.

>> 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-emacs-build-system-Consider-all-inputs-for-Elisp-dep.patch --]
[-- Type: text/x-patch, Size: 5032 bytes --]

From 7f92b0f29b03190f18bcab297364da64638823b0 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/30] 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; add the unpacked directory to EMACSLOADPATH.
(%standard-phases)[set-emacs-load-path]: Move after `unpack'.
---
 guix/build/emacs-build-system.scm | 56 +++++++++++++++------------------------
 1 file changed, 22 insertions(+), 34 deletions(-)

diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index b77984742..3ab3f91f7 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -74,12 +74,14 @@ archive, a directory, or an Emacs Lisp file."
         #t)
       (gnu:unpack #:source source)))
 
-(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 (emacs-inputs-el-directories
-                            (emacs-inputs-directories inputs)))
+  (let* ((source-dir (getcwd))
+         (input-elisp-dirs (input-dirs->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)
     (format #t "environment variable `EMACSLOADPATH' set to ~a\n"
             emacs-load-path-value)))
@@ -210,39 +212,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-dir->el-directory input-dir)
+  "Return the correct Elisp directory location of INPUT-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 (input-dirs->el-directories input-dirs)
+  "Build the list of Emacs Lisp directories from the INPUT-DIRS."
+  (filter-map input-dir->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
@@ -260,11 +248,11 @@ second hyphen.  This corresponds to 'name-version' as used in ELPA packages."
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-    (add-after 'set-paths 'set-emacs-load-path set-emacs-load-path)
     (replace 'unpack unpack)
+    (add-after 'unpack 'set-emacs-load-path set-emacs-load-path)
     (delete 'configure)
-    ;; Move the build phase after install: the .el files are byte compiled
-    ;; directly in the store.
+    ;; Move the build phase after install: the .el files are byte
+    ;; compiled directly in the store.
     (delete 'build)
     (replace 'install install)
     (add-after 'install 'build build)
-- 
2.16.1


[-- Attachment #3: 0002-emacs-utils-Use-invoke-instead-of-system.patch --]
[-- Type: text/x-patch, Size: 3057 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-emacs-utils-Fail-when-byte-compilation-fails.patch --]
[-- Type: text/x-patch, Size: 1119 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-emacs-build-system-Add-improved-check-phase.patch --]
[-- Type: text/x-patch, Size: 3471 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-gnu-Adjust-ert-runner-wrapper-to-honor-EMACSLOADPATH.patch --]
[-- Type: text/x-patch, Size: 5641 bytes --]

From 75aa869272248633edf98281e482ad646ca538f3 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 05/30] gnu: Adjust ert-runner wrapper to honor EMACSLOADPATH.

* gnu/packages/emacs.scm (ert-runner): Use 'prefix instead of '= for setting
the EMACSLOADPATH environment variable.  Reuse the already computed
EMACSLOADPATH for `wrap-program'.  Specify the dependencies directly in the
inputs field.
---
 gnu/packages/emacs.scm | 97 +++++++++++++++++++++-----------------------------
 1 file changed, 41 insertions(+), 56 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index ac69cfa39..99fa665a1 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6091,64 +6091,49 @@ Emacs.")
 ;; Tests for ert-runner have a circular dependency with ecukes, and therefore
 ;; cannot be run
 (define-public ert-runner
-  (let ((dependencies
-         `(("emacs-ansi" ,emacs-ansi)
-           ("emacs-commander" ,emacs-commander)
-           ("emacs-dash" ,emacs-dash)
-           ("emacs-f" ,emacs-f)
-           ("emacs-s" ,emacs-s)
-           ("emacs-shut-up" ,emacs-shut-up))))
-    (package
-      (name "ert-runner")
-      (version "0.7.0")
-      (source
-       (origin
-         (method url-fetch)
-         (uri (string-append "https://github.com/rejeep/ert-runner.el/archive/v"
-                             version ".tar.gz"))
-         (file-name (string-append name "-" version ".tar.gz"))
-         (sha256
-          (base32
-           "1657nck9i96a4xgl8crfqq0s8gflzp21pkkzwg6m3z5npjxklgwp"))))
-      (build-system emacs-build-system)
-      (inputs dependencies)
-      (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-after 'install 'install-executable
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (substitute* "bin/ert-runner"
-                   (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)")
-                    (string-append "ERT_RUNNER=\"" out
-                                   "/share/emacs/site-lisp/guix.d/"
-                                   ,name "-" ,version)))
-                 (install-file "bin/ert-runner" (string-append out "/bin"))
-                 (wrap-program (string-append out "/bin/ert-runner")
-                   (list "EMACSLOADPATH" ":" '=
-                         (append
-                          ,(match dependencies
-                             (((labels packages) ...)
-                              `(map (lambda (label package version)
-                                      (string-append (assoc-ref inputs label)
-                                                     "/share/emacs/site-lisp/guix.d/"
-                                                     (string-drop package 6)
-                                                     "-" version))
-                                    ',labels
-                                    ',(map package-name packages)
-                                    ',(map package-version packages))))
-                          ;; empty element to include the default load path as
-                          ;; determined by emacs' standard initialization
-                          ;; procedure
-                          (list ""))))
-                 #t))))
-         #:include (cons* "^reporters/.*\\.el$" %default-include)))
-      (home-page "https://github.com/rejeep/ert-runner.el")
-      (synopsis "Opinionated Ert testing workflow")
-      (description "@code{ert-runner} is a tool for Emacs projects tested
+  (package
+    (name "ert-runner")
+    (version "0.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/rejeep/ert-runner.el/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1657nck9i96a4xgl8crfqq0s8gflzp21pkkzwg6m3z5npjxklgwp"))))
+    (build-system emacs-build-system)
+    (inputs
+     `(("emacs-ansi" ,emacs-ansi)
+       ("emacs-commander" ,emacs-commander)
+       ("emacs-dash" ,emacs-dash)
+       ("emacs-f" ,emacs-f)
+       ("emacs-s" ,emacs-s)
+       ("emacs-shut-up" ,emacs-shut-up)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-executable
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "bin/ert-runner"
+                 (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)")
+                  (string-append "ERT_RUNNER=\"" out
+                                 "/share/emacs/site-lisp/guix.d/"
+                                 ,name "-" ,version)))
+               (install-file "bin/ert-runner" (string-append out "/bin"))
+               (wrap-program (string-append out "/bin/ert-runner")
+                 (list "EMACSLOADPATH" ":" 'prefix
+                       (string-split (getenv "EMACSLOADPATH") ":")))
+               #t))))
+       #:include (cons* "^reporters/.*\\.el$" %default-include)))
+    (home-page "https://github.com/rejeep/ert-runner.el")
+    (synopsis "Opinionated Ert testing workflow")
+    (description "@code{ert-runner} is a tool for Emacs projects tested
 using ERT.  It assumes a certain test structure setup and can therefore make
 running tests easier.")
-      (license license:gpl3+))))
+    (license license:gpl3+)))
 
 (define-public emacs-disable-mouse
   (package
-- 
2.16.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-gnu-Adapt-Emacs-packages-to-use-the-new-check-phase.patch --]
[-- Type: text/x-patch, Size: 14478 bytes --]

From 22a42bb822d9e75a5b0c92aa3cf8c74b01487a89 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 12 Feb 2018 23:02:11 -0500
Subject: [PATCH 06/30] gnu: Adapt Emacs packages to use the new check phase.

* gnu/packages/emacs.scm (emacs-dash, emacs-s, emacs-string-inflection,
emacs-company, emacs-clojure-mode, emacs-julia-mode, emacs-elfeed,
emacs-memoize, emacs-use-package, emacs-xmlgen, emacs-json-reformat,
emacs-which-key, emacs-ws-butler, emacs-git-messenger, emacs-browse-at-remote,
emacs-evil-quickscope): Adapt to use new check phase.
(emacs-json-reformat)[inputs]: Move to...
[native-inputs]: here. Add ert-runner.
(emacs-company): Refactor fix-bin-dir phase.
(emacs-git-messenger)[native-inputs]: Add ert-runner.
---
 gnu/packages/emacs.scm | 178 ++++++++++++++++---------------------------------
 1 file changed, 56 insertions(+), 122 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 99fa665a1..7f6c1a4a0 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1511,11 +1511,8 @@ and stored in memory.")
                 "1pjlkrzr8n45bnp3xs3dybvy0nz3gwamrfc7vsi1nhpkkw99ihhb"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-                     (lambda _
-                       (zero? (system* "./run-tests.sh")))))))
+     `(#:tests? #t
+       #:test-command '("./run-tests.sh")))
     (home-page "https://github.com/magnars/dash.el")
     (synopsis "Modern list library for Emacs")
     (description "This package provides a modern list API library for Emacs.")
@@ -1708,11 +1705,8 @@ allows easily move between them.")
                 "0xbl75863pcm806zg0x1lw7qznzjq2c8320k8js7apyag8q4srvh"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-                     (lambda _
-                       (zero? (system* "./run-tests.sh")))))))
+     `(#:tests? #t
+       #:test-command '("./run-tests.sh")))
     (home-page "https://github.com/magnars/s.el")
     (synopsis "Emacs string manipulation library")
     (description "This package provides an Emacs library for manipulating
@@ -2197,11 +2191,8 @@ in Lisp modes.")
     (native-inputs
      `(("ert-runner" ,ert-runner)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda _
-             (zero? (system* "ert-runner")))))))
+     `(#:tests? #t
+       #:test-command '("ert-runner")))
     (home-page "https://github.com/akicho8/string-inflection")
     (synopsis "Convert symbol names between different naming conventions")
     (description
@@ -2499,7 +2490,7 @@ build jobs.")
     (arguments
      `(#:phases
        (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
@@ -2507,7 +2498,9 @@ build jobs.")
              ;; /tmp directory.
              (substitute* "test/files-tests.el"
                (("/bin/") "/tmp/"))
-             (zero? (system* "make" "test-batch")))))))
+             #t)))
+       #:tests? #t
+       #:test-command '("make" "test-batch")))
     (home-page "http://company-mode.github.io/")
     (synopsis "Modular text completion framework")
     (description
@@ -3535,11 +3528,8 @@ S-expression.")
        ("emacs-s" ,emacs-s)
        ("ert-runner" ,ert-runner)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'check
-           (lambda _
-             (zero? (system* "ert-runner")))))))
+     `(#:tests? #t
+       #:test-command '("ert-runner")))
     (home-page "https://github.com/clojure-emacs/clojure-mode")
     (synopsis "Major mode for Clojure code")
     (description
@@ -3718,14 +3708,10 @@ E-Prime forbids the use of the \"to be\" form to strengthen your writing.")
            "1is4dcv6blslpzbjcg8l2jpxi8xj96q4cm0nxjxsyswpm8bw8ki0"))))
       (build-system emacs-build-system)
       (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-before 'install 'check
-             (lambda _
-               (zero? (system* "emacs" "-batch"
-                               "-l" "julia-mode.el"
-                               "-l" "julia-mode-tests.el"
-                               "-f" "ert-run-tests-batch-and-exit")))))))
+       `(#:tests? #t
+         #:test-command '("emacs" "--batch"
+                          "-l" "julia-mode-tests.el"
+                          "-f" "ert-run-tests-batch-and-exit")))
       (home-page "https://github.com/JuliaEditorSupport/julia-emacs")
       (synopsis "Major mode for Julia")
       (description "This Emacs package provides a mode for the Julia
@@ -3916,11 +3902,8 @@ If you want to mark a folder manually as a project just create an empty
                 "1fd1mx0q1qb9vgdzls5ppxfriyid48blg8smgjspiazp7kxakzxv"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda _
-             (zero? (system* "make" "test")))))))
+     `(#:tests? #t
+       #:test-command '("make" "test")))
     (home-page "https://github.com/skeeto/elfeed")
     (synopsis "Atom/RSS feed reader for Emacs")
     (description
@@ -5092,13 +5075,11 @@ Yasnippet.")
        "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")))))))
+    `(#: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
@@ -5381,16 +5362,12 @@ abbreviation of the mode line displays (lighters) of minor modes.")
     (propagated-inputs
      `(("emacs-diminish" ,emacs-diminish)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda _
-             (zero? (system* "emacs" "--batch" "-L" "."
-                             "-l" "use-package-tests.el"
-                             "-f" "ert-run-tests-batch-and-exit"))
-             ;; Tests fail in this release, but have been fixed in
-             ;; upstream commit 7956d40eed57d6c06bef36ebc174cf57d934e30d
-             #t)))))
+     ;; Tests fail in this release, but have been fixed in
+     ;; upstream commit 7956d40eed57d6c06bef36ebc174cf57d934e30d
+     `(#:tests? #f
+       #:test-command '("emacs" "--batch"
+                        "-l" "use-package-tests.el"
+                        "-f" "ert-run-tests-batch-and-exit")))
     (home-page "https://github.com/jwiegley/use-package")
     (synopsis "Declaration for simplifying your .emacs")
     (description "The use-package macro allows you to isolate package
@@ -5485,13 +5462,10 @@ fonts is supported.")
          "0zay490vjby3f7455r0vydmjg7q1gwc78hilpfb0rg4gwz224z8r"))))
     (build-system emacs-build-system)
     (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" "xmlgen-test.el"
+                        "-f" "ert-run-tests-batch-and-exit")))
     (home-page "https://github.com/philjackson/xmlgen")
     (synopsis "S-expression to XML domain specific language (DSL) in
 Emacs Lisp")
@@ -6173,32 +6147,15 @@ running a customisable handler command (@code{ignore} by default). ")
          "11fbq4scrgr7m0iwnzcrn2g7xvqwm2gf82sa7zy1l0nil7265p28"))
        (patches (search-patches "emacs-json-reformat-fix-tests.patch"))))
     (build-system emacs-build-system)
-    (propagated-inputs `(("emacs-undercover" ,emacs-undercover)))
-    (inputs
-     `(("emacs-dash" ,emacs-dash)         ; for tests
-       ("emacs-shut-up" ,emacs-shut-up))) ; for tests
+    (propagated-inputs
+     `(("emacs-undercover" ,emacs-undercover)))
+    (native-inputs
+     `(("ert-runner" ,ert-runner)
+       ("emacs-dash" ,emacs-dash)
+       ("emacs-shut-up" ,emacs-shut-up)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda* (#:key inputs #:allow-other-keys)
-             (zero? (system* "emacs" "--batch" "-L" "."
-                             "-L" (string-append
-                                   (assoc-ref inputs "emacs-undercover")
-                                   "/share/emacs/site-lisp/guix.d/undercover-"
-                                   ,(package-version emacs-undercover))
-                             "-L" (string-append
-                                   (assoc-ref inputs "emacs-dash")
-                                   "/share/emacs/site-lisp/guix.d/dash-"
-                                   ,(package-version emacs-dash))
-                             "-L" (string-append
-                                   (assoc-ref inputs "emacs-shut-up")
-                                   "/share/emacs/site-lisp/guix.d/shut-up-"
-                                   ,(package-version emacs-shut-up))
-                             "-l" "test/test-helper.el"
-                             "-l" "test/json-reformat-test.el"
-                             "-f" "ert-run-tests-batch-and-exit"))
-             #t)))))
+     `(#:tests? #t
+       #:test-command '("ert-runner")))
     (home-page "https://github.com/gongo/json-reformat")
     (synopsis "Reformatting tool for JSON")
     (description "@code{json-reformat} provides a reformatting tool for
@@ -6334,13 +6291,10 @@ displays results pretty-printed in XML or JSON with @code{restclient-mode}")
        (file-name (string-append name "-" version ".tar.gz"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda _
-             (zero? (system* "emacs" "--batch" "-L" "."
-                             "-l" "which-key-tests.el"
-                             "-f" "ert-run-tests-batch-and-exit")))))))
+     `(#:tests? #t
+       #:test-command '("emacs" "--batch"
+                        "-l" "which-key-tests.el"
+                        "-f" "ert-run-tests-batch-and-exit")))
     (home-page "https://github.com/justbur/emacs-which-key")
     (synopsis "Display available key bindings in popup")
     (description
@@ -6369,11 +6323,8 @@ settings).")
     (native-inputs
      `(("ert-runner" ,ert-runner)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda _
-             (zero? (system* "ert-runner" "tests")))))))
+     `(#:tests? #t
+       #:test-command '("ert-runner" "tests")))
     (home-page "https://github.com/lewang/ws-butler")
     (synopsis "Trim spaces from end of lines")
     (description
@@ -6470,17 +6421,9 @@ editing RPM spec files.")
     (propagated-inputs
      `(("emacs-popup" ,emacs-popup)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda* (#:key inputs #:allow-other-keys)
-             (zero? (system* "emacs" "--batch" "-L" "."
-                             "-L" (string-append
-                                   (assoc-ref inputs "emacs-popup")
-                                   "/share/emacs/site-lisp/guix.d/popup-"
-                                   ,(package-version emacs-popup))
-                             "-l" "test/test.el"
-                             "-f" "ert-run-tests-batch-and-exit")))))))
+     `(#:tests? #t
+       #:test-command '("emacs" "--batch" "-l" "test/test.el"
+                        "-f" "ert-run-tests-batch-and-exit")))
     (home-page "https://github.com/syohex/emacs-git-messenger")
     (synopsis "Popup commit message at current line")
     (description "@code{emacs-git-messenger} provides
@@ -6640,11 +6583,8 @@ Idris.")
       (native-inputs
        `(("ert-runner" ,ert-runner)))
       (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           (add-before 'install 'check
-             (lambda _
-               (zero? (system* "ert-runner")))))))
+       `(#:tests? #t
+         #:test-command '("ert-runner")))
       (home-page "https://github.com/rmuslimov/browse-at-remote")
       (synopsis "Open github/gitlab/bitbucket/stash page from Emacs")
       (description
@@ -7062,16 +7002,10 @@ emulates Vim features and provides Vim-like key bindings.")
     (propagated-inputs
      `(("emacs-evil" ,emacs-evil)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'check
-           (lambda* (#:key inputs #:allow-other-keys)
-             (invoke "emacs" "--batch" "-L"
-                     (string-append (assoc-ref inputs "emacs-evil")
-                                    "/share/emacs/site-lisp/guix.d/evil-"
-                                    ,(package-version emacs-evil))
-                     "-l" "evil-quickscope-tests.el"
-                     "-f" "ert-run-tests-batch-and-exit"))))))
+     `(#:tests? #t
+       #:test-command '("emacs" "--batch"
+                        "-l" "evil-quickscope-tests.el"
+                        "-f" "ert-run-tests-batch-and-exit")))
     (home-page "https://github.com/blorbx/evil-quickscope")
     (synopsis "Target highlighting for emacs evil-mode f,F,t and T commands")
     (description "@code{emacs-evil-quickscope} highlights targets for Evil
-- 
2.16.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: 0007-gnu-emacs-Fix-emacs-memoize-indentation.patch --]
[-- Type: text/x-patch, Size: 2536 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: 0008-gnu-emacs-pdf-tools-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 1218 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #10: 0009-gnu-Add-emacs-ert-expectations.patch --]
[-- Type: text/x-patch, Size: 1441 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #11: 0010-gnu-emacs-deferred-Enable-tests.patch --]
[-- Type: text/x-patch, Size: 1950 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #12: 0011-gnu-emacs-org-trello-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 1073 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #13: 0012-gnu-emacs-smartparens-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 1117 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #14: 0013-gnu-emacs-realgud-Adapt-phase-for-the-reworked-emacs.patch --]
[-- Type: text/x-patch, Size: 964 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #15: 0014-gnu-emacs-request-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 974 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #16: 0015-gnu-emacs-idris-mode-Fix-hash.patch --]
[-- Type: text/x-patch, Size: 910 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #17: 0016-gnu-emacs-sx-Fix-build-issue.patch --]
[-- Type: text/x-patch, Size: 2631 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #18: 0017-gnu-emacs-polymode-Fix-compilation-error.patch --]
[-- Type: text/x-patch, Size: 1363 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #19: 0018-gnu-Add-emacs-scel.patch --]
[-- Type: text/x-patch, Size: 3153 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #20: 0019-gnu-Add-emacs-kv.patch --]
[-- Type: text/x-patch, Size: 1721 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #21: 0020-gnu-emacs-esxml-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 1987 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #22: 0021-gnu-emacs-mu4e-alert-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 1274 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #23: 0022-gnu-emacs-org-contrib-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 934 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #24: 0023-gnu-emacs-evil-matchit-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 888 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #25: 0024-gnu-Add-emacs-spark.patch --]
[-- Type: text/x-patch, Size: 1718 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #26: 0025-gnu-emacs-es-mode-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 1078 bytes --]

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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #27: 0026-gnu-Add-emacs-eimp.patch --]
[-- Type: text/x-patch, Size: 2506 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #28: 0027-gnu-emacs-dired-hacks-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 853 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #29: 0028-gnu-emacs-cdlatex-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 910 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #30: 0029-gnu-Add-emacs-howm.patch --]
[-- Type: text/x-patch, Size: 1493 bytes --]

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(+)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #31: 0030-gnu-emacs-calfw-Fix-byte-compilation.patch --]
[-- Type: text/x-patch, Size: 943 bytes --]

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(+)

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


  parent reply	other threads:[~2018-04-17  3:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-01 15:57 [bug#31018] [PATCH] Improvements for our Emacs build system and fixes Maxim Cournoyer
2018-04-13 20:41 ` Arun Isaac
     [not found] ` <faec7bc3.AM8AAAStCIYAAAAAAAAAAAPHPfsAAAACwQwAAAAAAAW9WABa0RYW@mailjet.com>
2018-04-14  1:28   ` Maxim Cournoyer
2018-04-14 16:51 ` Arun Isaac
     [not found] ` <9925e912.AM4AAAS8QCUAAAAAAAAAAAPHPfsAAAACwQwAAAAAAAW9WABa0jGH@mailjet.com>
2018-04-17  2:59   ` Maxim Cournoyer [this message]
2018-04-20 17:46     ` [bug#31018] [PATCHv2] " Arun Isaac
2018-05-03 16:32       ` bug#31018: " Arun Isaac
2018-05-03 16:54         ` [bug#31018] " Arun Isaac
     [not found]     ` <5b6467d3.AMMAAAVkQu8AAAAAAAAAAAPHPfsAAAACwQwAAAAAAAW9WABa2idv@mailjet.com>
2018-05-07 12:13       ` Maxim Cournoyer
2018-05-07 14:14         ` Arun Isaac
     [not found] ` <handler.31018.D31018.152536517825664.notifdone@debbugs.gnu.org>
2018-05-07 12:21   ` [bug#31018] closed (Re: [bug#31018] [PATCHv2] Improvements for our Emacs build system and fixes.) Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0yyo7vm.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=31018@debbugs.gnu.org \
    --cc=arunisaac@systemreboot.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).