[PATCH] emacs-xyz.el: add package for emacs-exwm-next (exwm with emacs-next)

  • Open
  • quality assurance status badge
Details
One participant
  • dakling
Owner
unassigned
Submitted by
dakling
Severity
normal
D
D
dakling wrote on 23 Feb 2020 16:13
(name . guix-patches)(address . guix-patches@gnu.org)
87pne59w1g.fsf@web.de
Date: Sun, 23 Feb 2020 16:00:41 +0100
User-agent: mu4e 1.2.0; emacs 27.0.50
From 12f7a8d3f54c7d5238a96b7671db9552bab1ab16 Mon Sep 17 00:00:00 2001
---
gnu/packages/emacs-xyz.scm | 495 +++++++++++++++++++++----------------
1 file changed, 284 insertions(+), 211 deletions(-)

Toggle diff (467 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3a026bec9a..643a2a1d41 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -166,14 +166,14 @@
(name "emacs-geiser")
(version "0.11")
(source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://gitlab.com/jaor/geiser/")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0fb2h984hn7bnyiziplp7kgk29zdzc9yainsv0k1li436irlp9dd"))))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/jaor/geiser/")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0fb2h984hn7bnyiziplp7kgk29zdzc9yainsv0k1li436irlp9dd"))))
(build-system gnu-build-system)
(arguments
'(#:phases
@@ -240,8 +240,8 @@ when typing parentheses directly or commenting out code line by line.")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/magit/git-modes")
- (commit version)))
+ (url "https://github.com/magit/git-modes")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
@@ -662,11 +662,11 @@ for editing Racket's Scribble documentation syntax in Emacs.")
(base32 "0q2pb3w8s833fjhkzicciw2php4lsnismad1dnwgp2lcway757ra"))))
(build-system gnu-build-system)
(native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("texinfo" ,texinfo)
- ("perl" ,perl)
- ("emacs-minimal" ,emacs-minimal)))
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("texinfo" ,texinfo)
+ ("perl" ,perl)
+ ("emacs-minimal" ,emacs-minimal)))
(propagated-inputs
`(("emacs-bui" ,emacs-bui)
("emacs-dash" ,emacs-dash)
@@ -3750,12 +3750,12 @@ languages.")
(arguments `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'configure
- (lambda* (#:key inputs #:allow-other-keys)
- (chmod "irony.el" #o644)
- (emacs-substitute-variables "irony.el"
- ("irony-server-install-prefix"
- (assoc-ref inputs "server")))
- #t)))))
+ (lambda* (#:key inputs #:allow-other-keys)
+ (chmod "irony.el" #o644)
+ (emacs-substitute-variables "irony.el"
+ ("irony-server-install-prefix"
+ (assoc-ref inputs "server")))
+ #t)))))
(synopsis "C/C++/ObjC Code completion and syntax checks for Emacs")
(description "Irony-mode provides Clang-assisted syntax checking and
completion for C, C++, and ObjC in GNU Emacs. Using @code{libclang} it can
@@ -3767,20 +3767,20 @@ described on the homepage.")
(define-public emacs-irony-mode-server
(package (inherit emacs-irony-mode)
- (name "emacs-irony-mode-server")
- (inputs
- `(("clang" ,clang)))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (invoke "cmake"
- "server"
- (string-append "-DCMAKE_INSTALL_PREFIX=" out)) #t))))))
- (build-system cmake-build-system)
- (synopsis "Server for the Emacs @dfn{irony mode}")))
+ (name "emacs-irony-mode-server")
+ (inputs
+ `(("clang" ,clang)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "cmake"
+ "server"
+ (string-append "-DCMAKE_INSTALL_PREFIX=" out)) #t))))))
+ (build-system cmake-build-system)
+ (synopsis "Server for the Emacs @dfn{irony mode}")))
(define-public emacs-company-irony
(package
@@ -4838,22 +4838,22 @@ to their corresponding tangled blocks.")
(let ((commit "1f1185bf667a38d3d0d180ce85fd4c131818aae2")
(revision "0"))
(package
- (name "emacs-atom-one-dark-theme")
- (version (git-version "0.4.0" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/jonathanchu/atom-one-dark-theme.git")
- (commit commit)))
- (sha256
- (base32
- "1alma16hg3mfjly8a9s3mrswkjjx4lrpdnf43869hn2ibkn7zx9z"))
- (file-name (git-file-name name version))))
- (build-system emacs-build-system)
- (home-page "https://github.com/jonathanchu/atom-one-dark-theme")
- (synopsis "Atom One Dark color theme for Emacs")
- (description "An Emacs port of the Atom One Dark theme from Atom.io.")
- (license license:gpl3+))))
+ (name "emacs-atom-one-dark-theme")
+ (version (git-version "0.4.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jonathanchu/atom-one-dark-theme.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "1alma16hg3mfjly8a9s3mrswkjjx4lrpdnf43869hn2ibkn7zx9z"))
+ (file-name (git-file-name name version))))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/jonathanchu/atom-one-dark-theme")
+ (synopsis "Atom One Dark color theme for Emacs")
+ (description "An Emacs port of the Atom One Dark theme from Atom.io.")
+ (license license:gpl3+))))
(define-public emacs-zenburn-theme
(package
@@ -4907,8 +4907,8 @@ variants.")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/bbatsov/solarized-emacs/")
- (commit (string-append "v" version))))
+ (url "https://github.com/bbatsov/solarized-emacs/")
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
@@ -5040,7 +5040,7 @@ orange and red as accent colors.")
"This program is an implementation of 2048 for Emacs.
The goal of this game is to create a tile with value 2048. The size of the
board and goal value can be customized.")
- (license license:gpl3+)))
+ (license license:gpl3+)))
(define-public emacs-base16-theme
(package
@@ -5434,8 +5434,8 @@ fully-functional one.")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/abo-abo/hydra")
- (commit version)))
+ (url "https://github.com/abo-abo/hydra")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
@@ -6032,8 +6032,8 @@ possible to query other endpoints like DBPedia.")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/technomancy/better-defaults")
- (commit version)))
+ (url "https://github.com/technomancy/better-defaults")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
@@ -6692,7 +6692,7 @@ indentation guides in Emacs:
;; Move .info file at the root so that it can installed by the
;; 'move-doc phase.
(rename-file "docs/_build/texinfo/Elpy.info" "Elpy.info")
- #t))
+ #t))
(add-after 'build-doc 'install-manpage
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -6894,7 +6894,7 @@ Emacs completion function instead.")
(description
"Ido-ubiquitous enables ido-style completion for almost every function
that uses the standard completion function completing-read.")
- (license license:gpl3+)))
+ (license license:gpl3+)))
(define-public emacs-yaml-mode
(package
@@ -8063,8 +8063,8 @@ passive voice.")
(source (origin
(method git-fetch)
(uri (git-reference
- (url home-page)
- (commit version)))
+ (url home-page)
+ (commit version)))
(sha256
(base32
"0hx72fq10772bbyqrj7mhhp02k26cccjxdadiqm1ykainhfmn1x0"))
@@ -8150,8 +8150,8 @@ files that you would find in @file{contrib/} from the git repository.")))
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/lewang/flx.git")
- (commit (string-append "v" version))))
+ (url "https://github.com/lewang/flx.git")
+ (commit (string-append "v" version))))
(sha256
(base32
"0sjybrcnb2sl33swy3q664vqrparajcl0m455gciiih2j87hwadc"))
@@ -8175,8 +8175,8 @@ Flx has support for ido (interactively do things) through flx-ido.")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/n3mo/cyberpunk-theme.el/")
- (commit version)))
+ (url "https://github.com/n3mo/cyberpunk-theme.el/")
+ (commit version)))
(sha256
(base32
"05mfgr9aj7knn7niadv9p6z3qrfpq2lbbi2wxxx62xywim9maw2y"))
@@ -8250,8 +8250,8 @@ by zenburn, sinburn and similar themes, but slowly diverging from them.")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/auto-complete/auto-complete.git")
- (commit (string-append "v" version))))
+ (url "https://github.com/auto-complete/auto-complete.git")
+ (commit (string-append "v" version))))
(sha256
(base32
"04i9b11iksg6acn885wl3qgi5xpsm3yszlqmd2x21yhprndlz7gb"))
@@ -8547,7 +8547,7 @@ mode-line.")
(home-page "https://gitlab.com/wavexx/mu4e-jump-to-list.el")
(synopsis "Select and view mailing lists in mu4e")
(description
- "@code{mu4e-jump-to-list} allows you to select and view mailing lists
+ "@code{mu4e-jump-to-list} allows you to select and view mailing lists
automatically using existing List-ID headers in your mu database. Just press
\"l\" in the headers view and any mailing list you've subscribed to will be
automatically discovered and presented in recency order.")
@@ -8574,7 +8574,7 @@ automatically discovered and presented in recency order.")
(home-page "https://github.com/seanfarley/mu4e-patch")
(synopsis "Colorize patch-like emails in mu4e")
(description
- "Extension for mu4e to colorize patch-like emails with diff-mode.
+ "Extension for mu4e to colorize patch-like emails with diff-mode.
This is based on Frank Terbeck's @code{gnus-article-treat-patch.el} but has
been adapted to work with mu4e.")
(license license:gpl3+))))
@@ -8587,8 +8587,8 @@ been adapted to work with mu4e.")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/akatov/pretty-mode/")
- (commit version)))
+ (url "https://github.com/akatov/pretty-mode/")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
@@ -9628,6 +9628,79 @@ It should enable you to implement low-level X11 applications.")
built on top of XELB.")
(license license:gpl3+)))
+
+(define-public emacs-exwm-next
+ (package
+ (name "emacs-exwm-next")
+ (version "0.23")
+ (synopsis "Emacs X window manager")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://elpa.gnu.org/packages/exwm-"
+ version ".tar"))
+ (sha256
+ (base32
+ "05w1v3wrp1lzz20zd9lcvr5nhk809kgy6svvkbs15xhnr6x55ad5"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-xelb" ,emacs-xelb)))
+ (inputs
+ `(("xhost" ,xhost)
+ ("emacs-next" ,emacs-next)
+ ("dbus" ,dbus)))
+ ;; The following functions and variables needed by emacs-exwm are
+ ;; not included in emacs-minimal:
+ ;; scroll-bar-mode, fringe-mode
+ ;; x-display-pixel-width, x-display-pixel-height
+ (arguments
+ `(#:emacs ,emacs
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'install-xsession
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (xsessions (string-append out "/share/xsessions"))
+ (bin (string-append out "/bin"))
+ (exwm-executable (string-append bin "/exwm")))
+ ;; Add a .desktop file to xsessions
+ (mkdir-p xsessions)
+ (mkdir-p bin)
+ (with-output-to-file
+ (string-append xsessions "/exwm.desktop")
+ (lambda _
+ (format #t "[Desktop Entry]~@
+ Name=~a~@
+ Comment=~a~@
+ Exec=~a~@
+ TryExec=~:*~a~@
+ Type=Application~%" ,name ,synopsis exwm-executable)))
+ ;; Add a shell wrapper to bin
+ (with-output-to-file exwm-executable
+ (lambda _
+ (format #t "#!~a ~@
+ ~a +SI:localuser:$USER ~@
+ exec ~a --exit-with-session ~a \"$@\" --eval '~s' ~%"
+ (string-append (assoc-ref inputs "bash") "/bin/sh")
+ (string-append (assoc-ref inputs "xhost") "/bin/xhost")
+ (string-append (assoc-ref inputs "dbus") "/bin/dbus-launch")
+ (string-append (assoc-ref inputs "emacs-next") "/bin/emacs")
+ '(cond
+ ((file-exists-p "~/.exwm")
+ (load-file "~/.exwm"))
+ ((not (featurep 'exwm))
+ (require 'exwm)
+ (require 'exwm-config)
+ (exwm-config-default)
+ (message (concat "exwm configuration not found. "
+ "Falling back to default configuration...")))))))
+ (chmod exwm-executable #o555)
+ #t))))))
+ (home-page "https://github.com/ch11ng/exwm")
+ (description "EXWM is a full-featured tiling X window manager for Emacs
+built on top of XELB.")
+ (license license:gpl3+)))
+
+
(define-public emacs-switch-window
(package
(name "emacs-switch-window")
@@ -9962,7 +10035,7 @@ Emacs.")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(source-directory (string-append
- (getenv "TMPDIR") "/source")))
+ (getenv "TMPDIR") "/source")))
(substitute* "bin/ert-runner"
(("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)")
(string-append "ERT_RUNNER=\"" out
@@ -10993,38 +11066,38 @@ messaging service.")
(define-public emacs-bash-completion
(package
- (name "emacs-bash-completion")
- (version "2.1.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/szermatt/emacs-bash-completion.git")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "1a1wxcqzh0javjmxwi3lng5i99xiylm8lm04kv4q1lh9bli6vmv0"))))
- (inputs `(("bash" ,bash)))
- (build-system emacs-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'make-git-checkout-writable
- (λ _
- (for-each make-file-writable (find-files "."))
- #t))
- (add-before 'install 'configure
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash")))
- (emacs-substitute-variables "bash-completion.el"
- ("bash-completion-prog" (string-append bash "/bin/bash"))))
- #t)))))
- (home-page "https://github.com/szermatt/emacs-bash-completion")
- (synopsis "Bash completion for the shell buffer")
- (description
- "@code{bash-completion} defines dynamic completion hooks for shell-mode
+ (name "emacs-bash-completion")
+ (version "2.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/szermatt/emacs-bash-completion.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1a1wxcqzh0javjmxwi3lng5i99xiylm8lm04kv4q1lh9bli6vmv0"))))
+ (inputs `(("bash" ,bash)))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'make-git-checkout-writable
+ (λ _
+ (for-each make-file-writable (find-files "."))
+ #t))
+ (add-before 'install 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bash (assoc-ref inputs "bash")))
+ (emacs-substitute-variables "bash-completion.el"
+ ("bash-completion-prog" (string-append bash "/bin/bash"))))
+ #t)))))
+ (home-page "https://github.com/szermatt/emacs-bash-completion")
+ (synopsis "Bash completion for the shell buffer")
+ (description
+ "@code{bash-completion} defines dynamic completion hooks for shell-mode
and shell-command prompts that are based on Bash completion.")
- (license license:gpl2+)))
+ (license license:gpl2+)))
(define-public emacs-easy-kill
(package
@@ -11332,8 +11405,8 @@ supports multiple backends such as @code{vlc}, @code{mpg123},
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes")
- (commit version)))
+ (url "https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
@@ -11973,28 +12046,28 @@ match and total match information in the mode-line in various search modes.")
(define-public emacs-finalize
(package
- (name "emacs-finalize")
- (version "2.0.0")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/skeeto/elisp-finalize.git")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
+ (name "emacs-finalize")
+ (version "2.0.0")
This message was truncated. Download the full message here.
D
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 39756@debbugs.gnu.org)
87a755qc9k.fsf@web.de
Hi,

what a stupid mistake, sorry! I have submitted a corrected patch.

Best,
Dario

PS: I am a big fan of your blog, it made me dive deeper into emacs and
also got me interested in Guix :)

Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (9 lines)
> Hi!
>
> This is probably a good idea, but your patch seems to have reindented
> everything.
> Can you resubmit a fixed patch?
> If you have to modify multiple packages, make sure to do one commit
> per package.
>
> Thanks!
?