gnu: Add emacs-rainbow-delimiters.
[jackhill/guix/guix.git] / gnu / packages / emacs.scm
index 4020898..54885f4 100644 (file)
@@ -1,10 +1,16 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
-;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net>
+;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
+;;; Copyright © 2016 humanitiesNerd <catonano@gmail.com>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +32,9 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix gexp)
+  #:use-module (guix monads)
+  #:use-module (guix store)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages acl)
+  #:use-module (gnu packages package-management)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pdf)
+  #:use-module (gnu packages scheme)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages mp3)
   #:use-module (guix utils)
              (sha256
               (base32
                "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
-             (patches (list (search-patch "emacs-exec-path.patch")))))
+             (patches (search-patches "emacs-exec-path.patch"
+                                      "emacs-fix-scheme-indent-function.patch"
+                                      "emacs-source-date-epoch.patch"))
+             (modules '((guix build utils)))
+             (snippet
+              ;; Delete the bundled byte-compiled elisp files and
+              ;; generated autoloads.
+              '(with-directory-excursion "lisp"
+                 (for-each delete-file
+                           (append (find-files "." "\\.elc$")
+                                   (find-files "." "loaddefs\\.el$")
+                                   ;; This is the only "autoloads" file that
+                                   ;; does not have "*loaddefs.el" name.
+                                   '("eshell/esh-groups.el")))))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     '(#:phases (alist-cons-before
-                 'configure 'fix-/bin/pwd
-                 (lambda _
-                   ;; Use `pwd', not `/bin/pwd'.
-                   (substitute* (find-files "." "^Makefile\\.in$")
-                     (("/bin/pwd")
-                      "pwd")))
-                 %standard-phases)))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'fix-/bin/pwd
+           (lambda _
+             ;; Use `pwd', not `/bin/pwd'.
+             (substitute* (find-files "." "^Makefile\\.in$")
+               (("/bin/pwd")
+                "pwd"))))
+         (add-after 'install 'remove-info.info
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Remove 'info.info', which is provided by Texinfo <= 6.0.
+             ;; TODO: Remove this phase when we switch to Texinfo 6.1.
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file
+                (string-append out "/share/info/info.info.gz"))
+               #t)))
+         (add-after 'install 'install-site-start
+           ;; Copy guix-emacs.el from Guix and add it to site-start.el.  This
+           ;; way, Emacs packages provided by Guix and installed in
+           ;; ~/.guix-profile/share/emacs/site-lisp/guix.d/PACKAGE-VERSION are
+           ;; automatically found.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((guix-src (assoc-ref inputs "guix-src"))
+                    (out      (assoc-ref outputs "out"))
+                    (lisp-dir (string-append out "/share/emacs/"
+                                             ,(version-major+minor version)
+                                             "/site-lisp"))
+                    (unpack   (assoc-ref %standard-phases 'unpack)))
+               (mkdir "guix")
+               (with-directory-excursion "guix"
+                 (apply unpack (list #:source guix-src))
+                 (install-file "emacs/guix-emacs.el" lisp-dir))
+               (with-output-to-file (string-append lisp-dir "/site-start.el")
+                 (lambda ()
+                   (display "(require 'guix-emacs nil t)")))
+               #t))))))
     (inputs
      `(("gnutls" ,gnutls)
        ("ncurses" ,ncurses)
        ("libice" ,libice)
        ("libsm" ,libsm)
        ("alsa-lib" ,alsa-lib)
-       ("dbus" ,dbus)))
+       ("dbus" ,dbus)
+       ("guix-src" ,(package-source guix))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("texinfo" ,texinfo)))
@@ -128,9 +181,24 @@ large Lisp programs.  It has full Unicode support for nearly all human
 languages.")
     (license license:gpl3+)))
 
-(define-public emacs-no-x
+(define-public emacs-minimal
   ;; This is the version that you should use as an input to packages that just
   ;; need to byte-compile .el files.
+  (package (inherit emacs)
+    (name "emacs-minimal")
+    (synopsis "The extensible text editor (used only for byte-compilation)")
+    (build-system gnu-build-system)
+    (arguments
+     (substitute-keyword-arguments (package-arguments emacs)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (delete 'install-site-start)))))
+    (inputs
+     `(("ncurses" ,ncurses)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))))
+
+(define-public emacs-no-x
   (package (inherit emacs)
     (name "emacs-no-x")
     (synopsis "The extensible, customizable, self-documenting text
@@ -210,8 +278,8 @@ editor (without an X toolkit)" )
                                            "/share/emacs/site-lisp/"
                                            "geiser-autoloads.el")))
                  %standard-phases)))
-    (inputs `(("guile" ,guile-2.0)
-              ("emacs" ,emacs-no-x)))
+    (inputs `(("guile" ,guile-2.0)))
+    (native-inputs `(("emacs" ,emacs-minimal)))
     (home-page "http://nongnu.org/geiser/")
     (synopsis "Collection of Emacs modes for Guile and Racket hacking")
     (description
@@ -223,18 +291,49 @@ implementation, Emacs and, ultimately, the schemer, giving them access to live
 metadata.")
     (license license:bsd-3)))
 
+(define-public geiser-next
+  ;; Geiser's upcoming version supports guile-next, and 0.8.1 does not.
+  ;; When the next Geiser release comes out, we can remove this.
+  (let ((commit "2e335695fc1a4a0b520b50deb761b958194cbec4"))
+    (package
+      (inherit geiser)
+      (name "geiser-next")
+      (version (string-append "0.8.1-1"
+                              (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "git://git.sv.gnu.org/geiser.git")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "00rmpn8zncq1fiah5m12l26z0s28bh7ql63kxdvksqdgfrisnmgf"))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("texinfo" ,texinfo)
+         ,@(package-native-inputs geiser)))
+      (arguments
+       (substitute-keyword-arguments (package-arguments geiser)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'autogen
+               (lambda _
+                 (zero? (system* "sh" "autogen.sh")))))))))))
+
 (define-public paredit
   (package
     (name "paredit")
-    (version "23")
+    (version "24")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "http://mumble.net/~campbell/emacs/paredit-"
-                                 version ".el"))
-             (sha256
-              (base32 "1np882jzvxckljx3cjz4absyzmc5hw65cs21sjmbic82163m9lf8"))))
+              (method url-fetch)
+              (uri (string-append "http://mumble.net/~campbell/emacs/paredit-"
+                                  version ".el"))
+              (sha256
+               (base32
+                "0pp3n8q6kc70blqsaw0zlzp6bc327dpgdrjr0cnh7hqg1lras7ka"))))
     (build-system trivial-build-system)
-    (inputs `(("emacs" ,emacs-no-x)))
+    (native-inputs `(("emacs" ,emacs-minimal)))
     (arguments
      `(#:modules ((guix build utils)
                   (guix build emacs-utils))
@@ -271,7 +370,7 @@ when typing parentheses directly or commenting out code line by line.")
 (define-public git-modes
   (package
     (name "git-modes")
-    (version "1.2.0")
+    (version "1.2.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -280,7 +379,7 @@ when typing parentheses directly or commenting out code line by line.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "09dv7ikbj2bi4y3lmvjfzqpdmx2f9bd4w7jkp10bkap62d05iqhk"))))
+                "0gb9c18jib8rpm14vig9774104lwmd8353ps0259m861syf6664d"))))
     (build-system gnu-build-system)
     (arguments
      `(#:modules ((guix build gnu-build-system)
@@ -305,7 +404,7 @@ when typing parentheses directly or commenting out code line by line.")
                                       (lisp (string-append
                                              out "/share/emacs/site-lisp/")))
                                  (emacs-generate-autoloads ,name lisp)))))))
-    (native-inputs `(("emacs" ,emacs-no-x)))
+    (native-inputs `(("emacs" ,emacs-minimal)))
     (home-page "https://github.com/magit/git-modes")
     (synopsis "Emacs major modes for Git configuration files")
     (description
@@ -313,10 +412,35 @@ when typing parentheses directly or commenting out code line by line.")
 configuration files, such as .gitattributes, .gitignore, and .git/config.")
     (license license:gpl3+)))
 
+(define-public emacs-with-editor
+  (package
+    (name "emacs-with-editor")
+    (version "2.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/magit/with-editor/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1lqm0msc9lzb05ys96bsx8bf2y1qrw27dh5h6qz8lf5i4cbhflw2"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-dash" ,emacs-dash)))
+    (home-page "https://github.com/magit/with-editor")
+    (synopsis "Emacs library for using Emacsclient as EDITOR")
+    (description
+     "This package provides an Emacs library to use the Emacsclient as
+@code{$EDITOR} of child processes, making sure they know how to call home.
+For remote processes a substitute is provided, which communicates with Emacs
+on stdout instead of using a socket as the Emacsclient does.")
+    (license license:gpl3+)))
+
 (define-public magit
   (package
     (name "magit")
-    (version "2.3.1")
+    (version "2.7.0")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -324,12 +448,14 @@ configuration files, such as .gitattributes, .gitignore, and .git/config.")
                    version "/" name "-" version ".tar.gz"))
              (sha256
               (base32
-               "1wnx034adkwhbsydd10il2099hpzz351kp39sri8s1yd43f795gf"))))
+               "1kzd8k2n0lcr04jvn5b6d29zf765mxgshfhzflkzndwmvyxmlqpl"))))
     (build-system gnu-build-system)
     (native-inputs `(("texinfo" ,texinfo)
-                     ("emacs" ,emacs-no-x)))
+                     ("emacs" ,emacs-minimal)))
     (inputs `(("git" ,git)))
-    (propagated-inputs `(("dash" ,emacs-dash)))
+    (propagated-inputs
+     `(("dash" ,emacs-dash)
+       ("with-editor" ,emacs-with-editor)))
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
@@ -347,7 +473,11 @@ configuration files, such as .gitattributes, .gitignore, and .git/config.")
              (string-append "DASH_DIR="
                             (assoc-ref %build-inputs "dash")
                             "/share/emacs/site-lisp/guix.d/dash-"
-                            ,(package-version emacs-dash)))
+                            ,(package-version emacs-dash))
+             (string-append "WITH_EDITOR_DIR="
+                            (assoc-ref %build-inputs "with-editor")
+                            "/share/emacs/site-lisp/guix.d/with-editor-"
+                            ,(package-version emacs-with-editor)))
 
        #:phases
        (modify-phases %standard-phases
@@ -383,7 +513,7 @@ operations.")
                (base32
                 "04y88j7q9h8xjbx5dbick6n5nr1522sn9i1znp0qwk3vjb4b5mzz"))))
     (build-system trivial-build-system)
-    (native-inputs `(("emacs" ,emacs-no-x)
+    (native-inputs `(("emacs" ,emacs-minimal)
                      ("tar" ,tar)
                      ("gzip" ,gzip)))
     (propagated-inputs `(("dash" ,emacs-dash)
@@ -441,9 +571,9 @@ support for Git-SVN.")
                     version ".tar.gz"))
               (sha256
                (base32 "1kxc2yj8vb122dv91r68h7c5ladcryx963fr16plfhg71fv7f9av"))))
-    (inputs `(("emacs" ,emacs-no-x)))
     (native-inputs
-     `(("texinfo" ,texinfo)))
+     `(("emacs" ,emacs-minimal)
+       ("texinfo" ,texinfo)))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list (string-append "EMACS="
@@ -523,7 +653,7 @@ programs.")
                      (setenv "PATH" (string-append emacs "/bin"))
                      (emacs-byte-compile-directory lispdir)
                      #t))))
-    (native-inputs `(("emacs" ,emacs-no-x)))
+    (native-inputs `(("emacs" ,emacs-minimal)))
     (home-page "http://elpa.gnu.org/packages/let-alist.html")
     (synopsis "Easily let-bind values of an assoc-list by their names")
     (description
@@ -573,18 +703,19 @@ provides an optional IDE-like error list.")
 (define-public emacs-w3m
   (package
     (name "emacs-w3m")
-    (version "1.4.483+0.20120614")
+    (version "1.4.538+0.20141022")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://debian/pool/main/w/w3m-el/w3m-el_"
                                  version ".orig.tar.gz"))
              (sha256
-              (base32 "0ms181gjavnfk79hhv5xl9llik4c6kj0w3c04kgyif8lcy2sxljx"))))
+              (base32
+               "0zfxmq86pwk64yv0426gnjrvhjrgrjqn08sdcdhmmjmfpmqvm79y"))))
     (build-system gnu-build-system)
-    (native-inputs `(("autoconf" ,autoconf)))
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("emacs" ,emacs-minimal)))
     (inputs `(("w3m" ,w3m)
-              ("imagemagick" ,imagemagick)
-              ("emacs" ,emacs-no-x)))
+              ("imagemagick" ,imagemagick)))
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
@@ -596,43 +727,46 @@ provides an optional IDE-like error list.")
          (list (string-append "--with-lispdir="
                               out "/share/emacs/site-lisp")
                (string-append "--with-icondir="
-                              out "/share/images/emacs-w3m")))
+                              out "/share/images/emacs-w3m")
+               ;; Leave .el files uncompressed, otherwise GC can't
+               ;; identify run-time dependencies.  See
+               ;; <http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00208.html>
+               "--without-compress-install"))
        #:tests? #f  ; no check target
        #:phases
-       (alist-cons-after
-        'unpack 'autoconf
-        (lambda _
-          (zero? (system* "autoconf")))
-        (alist-cons-before
-         'build 'patch-exec-paths
-         (lambda* (#:key inputs outputs #:allow-other-keys)
-          (let ((out (assoc-ref outputs "out"))
-                (w3m (assoc-ref inputs "w3m"))
-                (imagemagick (assoc-ref inputs "imagemagick"))
-                (coreutils (assoc-ref inputs "coreutils")))
-            (emacs-substitute-variables "w3m.el"
-              ("w3m-command" (string-append w3m "/bin/w3m"))
-              ("w3m-touch-command" (string-append coreutils "/bin/touch"))
-              ("w3m-image-viewer" (string-append imagemagick "/bin/display"))
-              ("w3m-icon-directory" (string-append out
-                                                   "/share/images/emacs-w3m")))
-            (emacs-substitute-variables "w3m-image.el"
-              ("w3m-imagick-convert-program" (string-append imagemagick
-                                                            "/bin/convert"))
-              ("w3m-imagick-identify-program" (string-append imagemagick
-                                                             "/bin/identify")))
-            #t))
-         (alist-replace
-          'install
-          (lambda* (#:key outputs #:allow-other-keys)
-            (and (zero? (system* "make" "install" "install-icons"))
-                 (with-directory-excursion
-                     (string-append (assoc-ref outputs "out")
-                                    "/share/emacs/site-lisp")
-                   (for-each delete-file '("ChangeLog" "ChangeLog.1"))
-                   (symlink "w3m-load.el" "w3m-autoloads.el")
-                   #t)))
-          %standard-phases)))))
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autoconf
+           (lambda _
+             (zero? (system* "autoconf"))))
+         (add-before 'build 'patch-exec-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (w3m (assoc-ref inputs "w3m"))
+                   (imagemagick (assoc-ref inputs "imagemagick"))
+                   (coreutils (assoc-ref inputs "coreutils")))
+               (emacs-substitute-variables "w3m.el"
+                 ("w3m-command" (string-append w3m "/bin/w3m"))
+                 ("w3m-touch-command"
+                  (string-append coreutils "/bin/touch"))
+                 ("w3m-image-viewer"
+                  (string-append imagemagick "/bin/display"))
+                 ("w3m-icon-directory"
+                  (string-append out "/share/images/emacs-w3m")))
+               (emacs-substitute-variables "w3m-image.el"
+                 ("w3m-imagick-convert-program"
+                  (string-append imagemagick "/bin/convert"))
+                 ("w3m-imagick-identify-program"
+                  (string-append imagemagick "/bin/identify")))
+               #t)))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (and (zero? (system* "make" "install" "install-icons"))
+                  (with-directory-excursion
+                      (string-append (assoc-ref outputs "out")
+                                     "/share/emacs/site-lisp")
+                    (for-each delete-file '("ChangeLog" "ChangeLog.1"))
+                    (symlink "w3m-load.el" "w3m-autoloads.el")
+                    #t)))))))
     (home-page "http://emacs-w3m.namazu.org/")
     (synopsis "Simple Web browser for Emacs based on w3m")
     (description
@@ -650,8 +784,8 @@ provides an optional IDE-like error list.")
              (sha256
               (base32 "10byvyv9dk0ib55gfqm7bcpxmx2qbih1jd03gmihrppr2mn52nff"))))
     (build-system gnu-build-system)
-    (inputs `(("wget" ,wget)
-              ("emacs" ,emacs-no-x)))
+    (inputs `(("wget" ,wget)))
+    (native-inputs `(("emacs" ,emacs-minimal)))
     (arguments
      `(#:modules ((guix build gnu-build-system)
                   (guix build utils)
@@ -693,14 +827,14 @@ provides an optional IDE-like error list.")
 (define-public emms
   (package
     (name "emms")
-    (version "4.0")
+    (version "4.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/emms/emms-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1q0n3iwva8bvai2rl9sm49sdjmk0wi7vajz4knz01l7g67nrp87l"))
+                "0ay6631p3dr6xnhkm7skwn0gp317r1mxbip28m126w4zqf05cbh3"))
               (modules '((guix build utils)))
               (snippet
                '(substitute* "Makefile"
@@ -726,71 +860,68 @@ provides an optional IDE-like error list.")
        #:imported-modules (,@%gnu-build-system-modules
                            (guix build emacs-utils))
 
-       #:phases (alist-replace
-                 'configure
-                 (lambda* (#:key inputs outputs #:allow-other-keys)
-                   (let ((out     (assoc-ref outputs "out"))
-                         (vorbis  (assoc-ref inputs "vorbis-tools"))
-                         (alsa    (assoc-ref inputs "alsa-utils"))
-                         (mpg321  (assoc-ref inputs "mpg321"))
-                         (mp3info (assoc-ref inputs "mp3info")))
-                     ;; Specify the installation directory.
-                     (substitute* "Makefile"
-                       (("PREFIX=.*$")
-                        (string-append "PREFIX := " out "\n")))
-
-                     (setenv "SHELL" (which "sh"))
-                     (setenv "CC" "gcc")
-
-                     ;; Specify the absolute file names of the various
-                     ;; programs so that everything works out-of-the-box.
-                     (with-directory-excursion "lisp"
-                       (emacs-substitute-variables
-                           "emms-player-mpg321-remote.el"
-                         ("emms-player-mpg321-remote-command"
-                          (string-append mpg321 "/bin/mpg321")))
-                       (substitute* "emms-player-simple.el"
-                         (("\"ogg123\"")
-                          (string-append "\"" vorbis "/bin/ogg123\"")))
-                       (emacs-substitute-variables "emms-info-ogginfo.el"
-                         ("emms-info-ogginfo-program-name"
-                          (string-append vorbis "/bin/ogginfo")))
-                       (emacs-substitute-variables "emms-info-libtag.el"
-                         ("emms-info-libtag-program-name"
-                          (string-append out "/bin/emms-print-metadata")))
-                       (emacs-substitute-variables "emms-info-mp3info.el"
-                         ("emms-info-mp3info-program-name"
-                          (string-append mp3info "/bin/mp3info")))
-                       (substitute* "emms-volume-amixer.el"
-                         (("\"amixer\"")
-                          (string-append "\"" alsa "/bin/amixer\"")))
-                       (substitute* "emms-tag-editor.el"
-                         (("\"mp3info\"")
-                          (string-append "\"" mp3info "/bin/mp3info\""))))))
-                 (alist-cons-before
-                  'install 'pre-install
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    ;; The 'install' rule expects the target directory to
-                    ;; exist.
-                    (let* ((out  (assoc-ref outputs "out"))
-                           (man1 (string-append out "/share/man/man1")))
-                      (mkdir-p man1)
-                      #t))
-                  (alist-cons-after
-                   'install 'post-install
-                   (lambda* (#:key outputs #:allow-other-keys)
-                     (let* ((out    (assoc-ref outputs "out"))
-                            (target (string-append
-                                     out "/bin/emms-print-metadata")))
-                       (symlink "emms-auto.el"
-                                (string-append out "/share/emacs/site-lisp/"
-                                               "emms-autoloads.el"))
-                       (mkdir-p (dirname target))
-                       (copy-file "src/emms-print-metadata" target)
-                       (chmod target #o555)))
-                   %standard-phases)))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out     (assoc-ref outputs "out"))
+                   (vorbis  (assoc-ref inputs "vorbis-tools"))
+                   (alsa    (assoc-ref inputs "alsa-utils"))
+                   (mpg321  (assoc-ref inputs "mpg321"))
+                   (mp3info (assoc-ref inputs "mp3info")))
+               ;; Specify the installation directory.
+               (substitute* "Makefile"
+                 (("PREFIX=.*$")
+                  (string-append "PREFIX := " out "\n")))
+
+               (setenv "SHELL" (which "sh"))
+               (setenv "CC" "gcc")
+
+               ;; Specify the absolute file names of the various
+               ;; programs so that everything works out-of-the-box.
+               (with-directory-excursion "lisp"
+                 (emacs-substitute-variables
+                     "emms-player-mpg321-remote.el"
+                   ("emms-player-mpg321-remote-command"
+                    (string-append mpg321 "/bin/mpg321")))
+                 (substitute* "emms-player-simple.el"
+                   (("\"ogg123\"")
+                    (string-append "\"" vorbis "/bin/ogg123\"")))
+                 (emacs-substitute-variables "emms-info-ogginfo.el"
+                   ("emms-info-ogginfo-program-name"
+                    (string-append vorbis "/bin/ogginfo")))
+                 (emacs-substitute-variables "emms-info-libtag.el"
+                   ("emms-info-libtag-program-name"
+                    (string-append out "/bin/emms-print-metadata")))
+                 (emacs-substitute-variables "emms-info-mp3info.el"
+                   ("emms-info-mp3info-program-name"
+                    (string-append mp3info "/bin/mp3info")))
+                 (substitute* "emms-volume-amixer.el"
+                   (("\"amixer\"")
+                    (string-append "\"" alsa "/bin/amixer\"")))
+                 (substitute* "emms-tag-editor.el"
+                   (("\"mp3info\"")
+                    (string-append "\"" mp3info "/bin/mp3info\"")))))))
+         (add-before 'install 'pre-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; The 'install' rule expects the target directory to exist.
+             (let* ((out  (assoc-ref outputs "out"))
+                    (man1 (string-append out "/share/man/man1")))
+               (mkdir-p man1)
+               #t)))
+         (add-after 'install 'post-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out    (assoc-ref outputs "out"))
+                    (target (string-append
+                             out "/bin/emms-print-metadata")))
+               (symlink "emms-auto.el"
+                        (string-append out "/share/emacs/site-lisp/"
+                                       "emms-autoloads.el"))
+               (mkdir-p (dirname target))
+               (copy-file "src/emms-print-metadata" target)
+               (chmod target #o555)))))
        #:tests? #f))
-    (native-inputs `(("emacs" ,emacs-no-x)       ;for (guix build emacs-utils)
+    (native-inputs `(("emacs" ,emacs-minimal)    ;for (guix build emacs-utils)
                      ("texinfo" ,texinfo)))
     (inputs `(("alsa-utils" ,alsa-utils)
               ("vorbis-tools" ,vorbis-tools)
@@ -840,7 +971,7 @@ light user interface.")
                      (with-directory-excursion site
                        (symlink "bbdb-loaddefs.el" "bbdb-autoloads.el"))))
                  %standard-phases)))
-    (native-inputs `(("emacs" ,emacs-no-x)))
+    (native-inputs `(("emacs" ,emacs-minimal)))
     (home-page "http://savannah.nongnu.org/projects/bbdb/")
     (synopsis "Contact management utility for Emacs")
     (description
@@ -850,6 +981,27 @@ like.  It can be linked with various Emacs mail clients (Message and Mail
 mode, Rmail, Gnus, MH-E, and VM).  BBDB is fully customizable.")
     (license license:gpl3+)))
 
+(define-public emacs-async
+  (package
+    (name "emacs-async")
+    (version "1.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://elpa.gnu.org/packages/async-"
+                                  version ".tar"))
+              (sha256
+               (base32
+                "1ip5nc8xyln5szvqwp6wqva9xr84pn8ssn3nnphrszr19y4js2bm"))))
+    (build-system emacs-build-system)
+    (home-page "http://elpa.gnu.org/packages/async.html")
+    (synopsis "Asynchronous processing in Emacs")
+    (description
+     "This package provides the ability to call asynchronous functions and
+processes.  For example, it can be used to run dired commands (for copying,
+moving, etc.) asynchronously using @code{dired-async-mode}.  Also it is used
+as a library for other Emacs packages.")
+    (license license:gpl3+)))
+
 (define-public emacs-auctex
   (package
     (name "emacs-auctex")
@@ -865,6 +1017,9 @@ mode, Rmail, Gnus, MH-E, and VM).  BBDB is fully customizable.")
         (base32
          "1pmki8hdjjikxlvip3pzi350bln3gcimr27yjf0xfwjvnp5hh9nc"))))
     (build-system emacs-build-system)
+    ;; We use 'emacs' because AUCTeX requires dbus at compile time
+    ;; ('emacs-minimal' does not provide dbus).
+    (arguments `(#:emacs ,emacs))
     (native-inputs
      `(("perl" ,perl)))
     (home-page "http://www.gnu.org/software/auctex/")
@@ -899,7 +1054,7 @@ or XEmacs.")
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
-       ("emacs" ,emacs-no-x)
+       ("emacs" ,emacs-minimal)
        ("texinfo" ,texinfo)))
     (home-page "https://github.com/purcell/mmm-mode")
     (synopsis "Allow multiple major modes in an Emacs buffer")
@@ -925,44 +1080,47 @@ single buffer.")
     (arguments
      `(#:tests? #f ; there are no tests
        #:modules ((guix build gnu-build-system)
+                  ((guix build emacs-build-system) #:prefix emacs:)
                   (guix build utils)
                   (guix build emacs-utils))
        #:imported-modules (,@%gnu-build-system-modules
+                           (guix build emacs-build-system)
                            (guix build emacs-utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'enter-dir (lambda _ (chdir "server") #t))
-         (add-before
-          'configure 'autogen
-          (lambda _
-            (zero? (system* "bash" "autogen.sh"))))
-         (add-before
-          'build 'patch-variables
-          (lambda* (#:key outputs #:allow-other-keys)
-            (with-directory-excursion "../lisp"
-              ;; Set path to epdfinfo program.
-              (emacs-substitute-variables "pdf-info.el"
-                ("pdf-info-epdfinfo-program"
-                 (string-append (assoc-ref outputs "out")
-                                "/bin/epdfinfo")))
-              ;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto
-              ;; upgrading" that pdf-tools tries to perform.
-              (emacs-substitute-variables "pdf-tools.el"
-                ("pdf-tools-handle-upgrades" '())))))
-         (add-after
-          'install 'install-lisp
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((target (string-append (assoc-ref outputs "out")
-                                         "/share/emacs/site-lisp/")))
-              (for-each (lambda (file)
-                          (install-file file target))
-                        (find-files "../lisp" "^(pdf|tab).*\\.elc?"))
-              (emacs-byte-compile-directory target)
-              (emacs-generate-autoloads "pdf-tools" target)))))))
+         ;; Build server side using 'gnu-build-system'.
+         (add-after 'unpack 'enter-server-dir
+           (lambda _ (chdir "server") #t))
+         (add-before 'configure 'autogen
+           (lambda _
+             (zero? (system* "bash" "autogen.sh"))))
+
+         ;; Build emacs side using 'emacs-build-system'.
+         (add-after 'compress-documentation 'enter-lisp-dir
+           (lambda _ (chdir "../lisp") #t))
+         (add-after 'enter-lisp-dir 'emacs-patch-variables
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Set path to epdfinfo program.
+             (emacs-substitute-variables "pdf-info.el"
+               ("pdf-info-epdfinfo-program"
+                (string-append (assoc-ref outputs "out")
+                               "/bin/epdfinfo")))
+             ;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto
+             ;; upgrading" that pdf-tools tries to perform.
+             (emacs-substitute-variables "pdf-tools.el"
+               ("pdf-tools-handle-upgrades" '()))))
+         (add-after 'emacs-patch-variables 'emacs-install
+           (assoc-ref emacs:%standard-phases 'install))
+         (add-after 'emacs-install 'emacs-build
+           (assoc-ref emacs:%standard-phases 'build))
+         (add-after 'emacs-install 'emacs-make-autoloads
+           (assoc-ref emacs:%standard-phases 'make-autoloads)))))
     (native-inputs `(("autoconf" ,autoconf)
                      ("automake" ,automake)
                      ("pkg-config" ,pkg-config)
-                     ("emacs" ,emacs-no-x)))
+                     ("emacs" ,emacs-minimal)))
+    (propagated-inputs
+     `(("let-alist" ,let-alist)))
     (inputs `(("poppler" ,poppler)
               ("cairo" ,cairo)
               ("glib" ,glib)
@@ -1002,6 +1160,27 @@ and stored in memory.")
     (description "This package provides a modern list API library for Emacs.")
     (license license:gpl3+)))
 
+(define-public emacs-undo-tree
+  (package
+    (name "emacs-undo-tree")
+    (version "0.6.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "http://dr-qubit.org/git/undo-tree.git")
+                    (commit "release/0.6.4")))
+              (file-name (string-append name "-" version "-checkout"))
+              (sha256
+                (base32
+                  "0b6hnv6bq1g5np5q2yw9r9aj1cxpp14akm21br7vpb7wp01fv4b3"))))
+    (build-system emacs-build-system)
+    (home-page "http://www.dr-qubit.org/emacs.php")
+    (synopsis "Treat undo history as a tree")
+    (description "Tree-like interface to Emacs undo system, providing
+graphical tree presentation of all previous states of buffer that
+allows easily move between them.")
+    (license license:gpl3+)))
+
 (define-public emacs-s
   (package
     (name "emacs-s")
@@ -1075,15 +1254,17 @@ source code using IPython.")
 (define-public emacs-debbugs
   (package
     (name "emacs-debbugs")
-    (version "0.7")
+    (version "0.9")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://elpa.gnu.org/packages/debbugs-"
                                   version ".tar"))
               (sha256
                (base32
-                "0pbglx3paa8icazgxlg4jf40wl8war63y9j2jmbb7gbd1xp95v72"))))
+                "1wc6kw7hihqqdx8qyl01akygycnan44x400hwrcf54m3hb4isa0k"))))
     (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-async" ,emacs-async)))
     (home-page "http://elpa.gnu.org/packages/debbugs.html")
     (synopsis "Access the Debbugs bug tracker in Emacs")
     (description
@@ -1172,3 +1353,581 @@ for quotation marks, dashes, and ellipses.  For example, typing @kbd{\"}
 automatically inserts a Unicode opening or closing quotation mark, depending
 on context.")
     (license license:gpl3+)))
+
+(define-public emacs-scheme-complete
+  (let ((commit "9b5cf224bf2a5994bc6d5b152ff487517f1a9bb5"))
+    (package
+      (name "emacs-scheme-complete")
+      (version (string-append "20151223." (string-take commit 8)))
+      (source
+       (origin
+         (file-name (string-append name "-" version))
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ashinn/scheme-complete.git")
+               (commit commit)))
+         (sha256
+          (base32
+           "141wn9l0m33w0g3dqmx8nxbfdny1r5xbr6ak61rsz21bk0qafs7x"))
+         (patches
+          (search-patches "emacs-scheme-complete-scheme-r5rs-info.patch"))))
+      (build-system emacs-build-system)
+      (home-page "https://github.com/ashinn/scheme-complete")
+      (synopsis "Smart tab completion for Scheme in Emacs")
+      (description
+       "This file provides a single function, @code{scheme-smart-complete},
+which you can use for intelligent, context-sensitive completion for any Scheme
+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-mit-scheme-doc
+  (package
+    (name "emacs-mit-scheme-doc")
+    (version "20140203")
+    (source
+     (origin
+       (modules '((guix build utils)))
+       (snippet
+        ;; keep only file of interest
+        '(begin
+           (for-each delete-file '("dot-emacs.el" "Makefile"))
+           (copy-file "6.945-config/mit-scheme-doc.el" "mit-scheme-doc.el")
+           (delete-file-recursively "6.945-config")))
+       (file-name (string-append name "-" version ".tar.bz2"))
+       (method url-fetch)
+       (uri (string-append "http://groups.csail.mit.edu/mac/users/gjs/"
+                           "6.945/dont-panic/emacs-basic-config.tar.bz2"))
+       (sha256
+        (base32
+         "0dqidg2bd66pawqfarvwca93w5gqf9mikn1k2a2rmd9ymfjpziq1"))))
+    (build-system emacs-build-system)
+    (inputs `(("mit-scheme" ,mit-scheme)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'configure-doc
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((mit-scheme-dir (assoc-ref inputs "mit-scheme"))
+                    (doc-dir (string-append mit-scheme-dir "/share/doc/"
+                                            "mit-scheme-"
+                                            ,(package-version mit-scheme))))
+               (substitute* "mit-scheme-doc.el"
+                 (("http://www\\.gnu\\.org/software/mit-scheme/documentation/mit-scheme-ref/")
+                  (string-append "file:" doc-dir "/mit-scheme-ref/")))))))))
+    (home-page "http://groups.csail.mit.edu/mac/users/gjs/6.945/dont-panic/")
+    (synopsis "MIT-Scheme documentation lookup for Emacs")
+    (description
+     "This package provides a set of Emacs functions to search definitions of
+identifiers in the MIT-Scheme documentation.")
+    (license license:gpl2+)))
+
+(define-public emacs-constants
+  (package
+    (name "emacs-constants")
+    (version "2.6")
+    (home-page "https://staff.fnwi.uva.nl/c.dominik/Tools/constants")
+    (source
+     (origin
+       (file-name (string-append name "-" version ".tar.gz"))
+       (method url-fetch)
+       (uri (string-append "https://github.com/fedeinthemix/emacs-constants"
+                           "/archive/v" version ".tar.gz"))
+       (sha256
+        (base32
+         "0pnrpmmxq8mh5h2hbrp5vcym0j0fh6dv3s7c5ccn18wllhzg9g7n"))))
+    (build-system emacs-build-system)
+    (synopsis "Enter definition of constants into an Emacs buffer")
+    (description
+     "This package provides functions for inserting the definition of natural
+constants and units into an Emacs buffer.")
+    (license license:gpl2+)))
+
+(define-public emacs-slime
+  (package
+    (name "emacs-slime")
+    (version "2.15")
+    (source
+     (origin
+       (file-name (string-append name "-" version ".tar.gz"))
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/slime/slime/archive/v"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0l2z6l2xm78mhh0nczkrmzh2ddb1n911ij9xb6q40zwvx4f8blds"))))
+    (build-system emacs-build-system)
+    (native-inputs
+     `(("texinfo" ,texinfo)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'configure
+           (lambda* _
+             (emacs-substitute-variables "slime.el"
+               ("inferior-lisp-program" "sbcl"))
+             #t))
+         (add-before 'install 'install-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (info-dir (string-append out "/share/info"))
+                    (doc-dir (string-append out "/share/doc/"
+                                            ,name "-" ,version))
+                    (doc-files '("doc/slime-refcard.pdf"
+                                 "README.md" "NEWS" "PROBLEMS"
+                                 "CONTRIBUTING.md")))
+               (with-directory-excursion "doc"
+                 (substitute* "Makefile"
+                   (("infodir=/usr/local/info")
+                    (string-append "infodir=" info-dir)))
+                 (system* "make" "html/index.html")
+                 (system* "make" "slime.info")
+                 (install-file "slime.info" info-dir)
+                 (copy-recursively "html" (string-append doc-dir "/html")))
+               (for-each (lambda (f)
+                           (install-file f doc-dir)
+                           (delete-file f))
+                         doc-files)
+               (delete-file-recursively "doc")
+               #t))))))
+    (home-page "https://github.com/slime/slime")
+    (synopsis "Superior Lisp Interaction Mode for Emacs")
+    (description
+     "SLIME extends Emacs with support for interactive programming in
+Common Lisp.  The features are centered around @{slime-mode}, an Emacs
+minor mode that complements the standard @{lisp-mode}.  While lisp-mode
+supports editing Lisp source files, @{slime-mode} adds support for
+interacting with a running Common Lisp process for compilation,
+debugging, documentation lookup, and so on.")
+    (license license:gpl2+)))
+
+(define-public emacs-popup
+  (package
+    (name "emacs-popup")
+    (version "0.5.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/auto-complete/popup-el/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1yrgfj8y69xmcb6kwgplhq68ndm9410qwh7sd2knnd1gchpphdc0"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/auto-complete/popup-el")
+    (synopsis "Visual Popup User Interface for Emacs")
+    (description
+     "Popup.el is a visual popup user interface library for Emacs.
+This provides a basic API and common UI widgets such as popup tooltips
+and popup menus.")
+    (license license:gpl3+)))
+
+(define-public emacs-god-mode
+  (let ((commit "6cf0807b6555eb6fcf8387a4e3b667071ef38964")
+        (revision "1"))
+    (package
+      (name "emacs-god-mode")
+      (version (string-append "20151005.925."
+                              revision "-" (string-take commit 9)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/chrisdone/god-mode.git")
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32
+           "1am415k4xxcva6y3vbvyvknzc6bma49pq3p85zmpjsdmsp18qdix"))))
+      (build-system emacs-build-system)
+      (home-page "https://github.com/chrisdone/god-mode")
+      (synopsis "Minor mode for entering commands without modifier keys")
+      (description
+       "This package provides a global minor mode for entering Emacs commands
+without modifier keys.  It's similar to Vim's separation of commands and
+insertion mode.  When enabled all keys are implicitly prefixed with
+@samp{C-} (among other helpful shortcuts).")
+      (license license:gpl3+))))
+
+(define-public emacs-rfcview
+  (package
+    (name "emacs-rfcview")
+    (version "0.13")
+    (home-page "http://www.loveshack.ukfsn.org/emacs")
+    (source (origin
+              (method url-fetch)
+              (uri "http://www.loveshack.ukfsn.org/emacs/rfcview.el")
+              (sha256
+               (base32
+                "0ympj5rxig383zl2jf0pzdsa80nnq0dpvjiriq0ivfi98fj7kxbz"))))
+    (build-system emacs-build-system)
+    (synopsis "Prettify Request for Comments (RFC) documents")
+    (description "The Internet Engineering Task Force (IETF) and the Internet
+Society (ISOC) publish various Internet-related protocols and specifications
+as \"Request for Comments\" (RFC) documents and Internet Standard (STD)
+documents.  RFCs and STDs are published in a simple text form.  This package
+provides an Emacs major mode, rfcview-mode, which makes it more pleasant to
+read these documents in Emacs.  It prettifies the text and adds
+hyperlinks/menus for easier navigation.  It also provides functions for
+browsing the index of RFC documents and fetching them from remote servers or
+local directories.")
+    (license license:gpl3+)))
+
+(define-public emacs-ffap-rfc-space
+  (package
+    (name "emacs-ffap-rfc-space")
+    (version "12")
+    (home-page "http://user42.tuxfamily.org/ffap-rfc-space/index.html")
+    (source (origin
+              (method url-fetch)
+              (uri "http://download.tuxfamily.org/user42/ffap-rfc-space.el")
+              (sha256
+               (base32
+                "1iv61dv57a73mdps7rn6zmgz7nqh14v0ninidyrasy45b1nv6gck"))))
+    (build-system emacs-build-system)
+    (synopsis "Make ffap recognize an RFC with a space before its number")
+    (description "The Internet Engineering Task Force (IETF) and the
+Internet Society (ISOC) publish various Internet-related protocols and
+specifications as \"Request for Comments\" (RFC) documents.  The
+built-in Emacs module \"ffap\" (Find File at Point) has the ability to
+recognize names at point which look like \"RFC1234\" and \"RFC-1234\"
+and load the appropriate RFC from a remote server.  However, it fails
+to recognize a name like \"RFC 1234\".  This package enhances ffap so
+that it correctly finds RFCs even when a space appears before the
+number.")
+    (license license:gpl3+)))
+
+(define-public emacs-zenburn-theme
+  (package
+    (name "emacs-zenburn-theme")
+    (version "2.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/bbatsov/zenburn-emacs/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0lyi84bm8sa7vj40n6zg6rlbsmi53mi1y9xn6gkjj29s5zbcnlg7"))))
+    (build-system emacs-build-system)
+    (home-page "http://github.com/bbatsov/zenburn-emacs")
+    (synopsis "Low contrast color theme for Emacs")
+    (description
+     "Zenburn theme is a port of the popular Vim Zenburn theme for Emacs.
+It is built on top of the custom theme support in Emacs 24 or later.")
+    (license license:gpl3+)))
+
+(define-public emacs-smartparens
+  (package
+    (name "emacs-smartparens")
+    (version "1.7.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/Fuco1/smartparens/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1b47ppkzsj8j8a2p0bmvq05rhm2d2lsm3wlc0sg542r4zr6nji8s"))))
+    (build-system emacs-build-system)
+    (propagated-inputs `(("emacs-dash" ,emacs-dash)))
+    (home-page "https://github.com/Fuco1/smartparens")
+    (synopsis "Paredit-like insertion, wrapping and navigation with user
+defined pairs")
+    (description
+     "Smartparens is a minor mode for Emacs that deals with parens pairs
+and tries to be smart about it.  It started as a unification effort to
+combine functionality of several existing packages in a single,
+compatible and extensible way to deal with parentheses, delimiters, tags
+and the like.  Some of these packages include autopair, textmate,
+wrap-region, electric-pair-mode, paredit and others.  With the basic
+features found in other packages it also brings many improvements as
+well as completely new features.")
+    (license license:gpl3+)))
+
+(define-public emacs-clojure-mode
+  (package
+    (name "emacs-clojure-mode")
+    (version "5.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/clojure-emacs/clojure-mode/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0gi8ra3ap5m3mz4qh1yxp2cldn7z9xcxvypznr6rrlc6a9l8s5a6"))))
+    (build-system emacs-build-system)
+    (home-page "http://github.com/clojure-emacs/clojure-mode")
+    (synopsis "Major mode for Clojure code")
+    (description
+     "This Emacs package provides font-lock, indentation, navigation and basic
+refactoring for the @uref{http://clojure.org, Clojure programming language}.
+It is recommended to use @code{clojure-mode} with paredit or smartparens.")
+    (license license:gpl3+)))
+
+(define-public emacs-epl
+  (package
+    (name "emacs-epl")
+    (version "0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/cask/epl/archive/"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1511n3a3f5gvaf2b4nh018by61ciyzi3y3603fzqma7p9hrckarc"))))
+    (build-system emacs-build-system)
+    (home-page "http://github.com/cask/epl")
+    (synopsis "Emacs Package Library")
+    (description
+     "A package management library for Emacs, based on @code{package.el}.
+
+The purpose of this library is to wrap all the quirks and hassle of
+@code{package.el} into a sane API.")
+    (license license:gpl3+)))
+
+(define-public emacs-queue
+  (package
+    (name "emacs-queue")
+    (version "0.1.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://elpa.gnu.org/packages/queue-"
+                                  version ".el"))
+              (sha256
+               (base32
+                "0jw24fxqnf9qcaf2nh09cnds1kqfk7hal35dw83x1ari95say391"))))
+    (build-system emacs-build-system)
+    (home-page "http://www.dr-qubit.org/tags/computing-code-emacs.html")
+    (synopsis "Queue data structure for Emacs")
+    (description
+     "This Emacs library provides queue data structure.  These queues can be
+used both as a first-in last-out (FILO) and as a first-in first-out (FIFO)
+stack, i.e. elements can be added to the front or back of the queue, and can
+be removed from the front.  This type of data structure is sometimes called an
+\"output-restricted deque\".")
+    (license license:gpl3+)))
+
+(define-public emacs-pkg-info
+  (package
+    (name "emacs-pkg-info")
+    (version "0.6")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/lunaryorn/pkg-info.el/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1gy1jks5mmm02gg1c8gcyr4f8a9s5ggzhk56gv33b9mzjqzi5rd5"))))
+    (build-system emacs-build-system)
+    (propagated-inputs `(("emacs-epl" ,emacs-epl)))
+    (home-page "https://github.com/lunaryorn/pkg-info.el")
+    (synopsis "Information about Emacs packages")
+    (description
+     "This library extracts information from the installed Emacs packages.")
+    (license license:gpl3+)))
+
+(define-public emacs-spinner
+  (package
+    (name "emacs-spinner")
+    (version "1.7.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://elpa.gnu.org/packages/spinner-"
+                                  version ".el"))
+              (sha256
+               (base32
+                "1fmwzdih0kbyvs8bn38mpm4sbs2mikqy2vdykfy9g20wpa8vb681"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/Malabarba/spinner.el")
+    (synopsis "Emacs mode-line spinner for operations in progress")
+    (description
+     "This Emacs package adds spinners and progress-bars to the mode-line for
+ongoing operations.")
+    (license license:gpl3+)))
+
+(define-public emacs-seq
+  (package
+    (name "emacs-seq")
+    (version "2.15")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://elpa.gnu.org/packages/seq-"
+                                  version ".tar"))
+              (sha256
+               (base32
+                "09wi1765bmn7i8fg6ajjfaxgs4ipc42d58zx2fdqpidrdg9c7q73"))))
+    (build-system emacs-build-system)
+    (home-page "http://elpa.gnu.org/packages/seq.html")
+    (synopsis "Sequence manipulation functions for Emacs")
+    (description
+     "This Emacs library provides sequence-manipulation functions that
+complement basic functions provided by @code{subr.el}.  All provided functions
+work on lists, strings and vectors.")
+    (license license:gpl3+)))
+
+(define-public emacs-better-defaults
+  (package
+    (name "emacs-better-defaults")
+    (version "0.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/technomancy/better-defaults"
+                           "/archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "08fg4zslzlxbvyil5g4gwvwd22fh4zsgqprs5wh9hv1rgc6757m2"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/technomancy/better-defaults")
+    (synopsis "Better defaults for Emacs")
+    (description
+     "Better defaults attempts to address the most obvious deficiencies of the
+Emacs default configuration in uncontroversial ways that nearly everyone can
+agree upon.")
+    (license license:gpl3+)))
+
+(define-public emacs-smex
+  (package
+    (name "emacs-smex")
+    (version "3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://raw.githubusercontent.com"
+                                  "/nonsequitur/smex/" version "/smex.el"))
+              (file-name (string-append "smex-" version ".el"))
+              (sha256
+               (base32
+                "0ar310zx9k5y4i1vl2rawvi712xj9gx77160860jbs691p77cxqp"))))
+    (build-system emacs-build-system)
+    (home-page "http://github.com/nonsequitur/smex/")
+    (synopsis "M-x interface with Ido-style fuzzy matching")
+    (description
+     "Smex is a M-x enhancement for Emacs.  Built on top of Ido, it provides a
+convenient interface to your recently and most frequently used commands.  And
+to all the other commands, too.")
+    (license license:gpl3+)))
+
+(define-public emacs-js2-mode
+  (package
+    (name "emacs-js2-mode")
+    (version "20150909")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/mooz/js2-mode/archive/"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1nsm36c4kwb473p13i58fgrnlk8fbn3rdhj47d9xz70az4ra44q0"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/mooz/js2-mode/")
+    (synopsis "Improved JavaScript editing mode for Emacs")
+    (description
+     "Js2-mode provides a JavaScript major mode for Emacs that is more
+advanced than the built-in javascript-mode.  Features include accurate syntax
+highlighting using a recursive-descent parser, on-the-fly reporting of syntax
+errors and strict-mode warnings, smart line-wrapping within comments and
+strings, and code folding.")
+    (license license:gpl3+)))
+
+(define-public emacs-markdown-mode
+  (package
+    (name "emacs-markdown-mode")
+    (version "2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://raw.githubusercontent.com/jrblevin"
+                                  "/markdown-mode/v" version
+                                  "/markdown-mode.el"))
+              (file-name (string-append "markdown-mode-" version ".el"))
+              (sha256
+               (base32
+                "1faibar32jnjia9202swblw91q6z1g5s4k9xmypwjahfh8yznl6w"))))
+    (build-system emacs-build-system)
+    (home-page "http://jblevins.org/projects/markdown-mode/")
+    (synopsis "Emacs Major mode for Markdown files")
+    (description
+     "Markdown-mode is a major mode for editing Markdown-formatted text files
+in Emacs.")
+    (license license:gpl3+)))
+
+(define-public emacs-projectile
+  (package
+    (name "emacs-projectile")
+    (version "0.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://raw.githubusercontent.com/bbatsov"
+                                  "/projectile/v" version "/projectile.el"))
+              (file-name (string-append "projectile-" version ".el"))
+              (sha256
+               (base32
+                "1pc6xb61hzxzc5hkqkli1ab0s7wz0rfgx4kcn9y30ksvhw18smbz"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-dash" ,emacs-dash)
+       ("emacs-pkg-info" ,emacs-pkg-info)))
+    (home-page "https://github.com/bbatsov/projectile")
+    (synopsis "Manage and navigate projects in Emacs easily")
+    (description
+     "This library provides easy project management and navigation.  The
+concept of a project is pretty basic - just a folder containing special file.
+Currently git, mercurial and bazaar repos are considered projects by default.
+If you want to mark a folder manually as a project just create an empty
+.projectile file in it.")
+    (license license:gpl3+)))
+
+(define-public emacs-elfeed
+  (package
+    (name "emacs-elfeed")
+    (version "1.4.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/skeeto/elfeed/archive/"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0i75r8x9ypbfjlnym04h16ikcrlks86p7wsgawrx7mh1lk4inp89"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/skeeto/elfeed")
+    (synopsis "Atom/RSS feed reader for Emacs")
+    (description
+     "Elfeed is an extensible web feed reader for Emacs, supporting both Atom
+and RSS, with a user interface inspired by notmuch.")
+    (license license:gpl3+)))
+
+(define-public emacs-rainbow-delimiters
+  (package
+    (name "emacs-rainbow-delimiters")
+    (version "2.1.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://raw.githubusercontent.com/Fanael"
+                                  "/rainbow-delimiters/" version
+                                  "/rainbow-delimiters.el"))
+              (file-name (string-append "rainbow-delimiters-" version ".el"))
+              (sha256
+               (base32
+                "1b3kampwsjabhcqdp0khgff13wc5jqhy3rbvaa12vnv7qy22l9ck"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/Fanael/rainbow-delimiters")
+    (synopsis "Highlight brackets according to their depth")
+    (description
+     "Rainbow-delimiters is a \"rainbow parentheses\"-like mode for Emacs which
+highlights parentheses, brackets, and braces according to their depth.  Each
+successive level is highlighted in a different color, making it easy to spot
+matching delimiters, orient yourself in the code, and tell which statements
+are at a given level.")
+    (license license:gpl3+)))