[PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)

  • Open
  • quality assurance status badge
Details
4 participants
  • dakling
  • Leo Prikler
  • Pierre Neidhardt
  • Maxim Cournoyer
Owner
unassigned
Submitted by
dakling
Severity
normal
D
D
dakling wrote on 26 Feb 2020 22:07
(address . guix-patches@gnu.org)
87blplqcdd.fsf@web.de
---
gnu/packages/emacs-xyz.scm | 71 ++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)

Toggle diff (82 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6b9027df8a..c6df469895 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -8601,6 +8601,77 @@ 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")
--
2.25.1
P
P
Pierre Neidhardt wrote on 27 Feb 2020 10:53
(name . dakling)(address . dario.klingenberg@web.de)(address . 39804@debbugs.gnu.org)
8736aw8igd.fsf@ambrevar.xyz
Thanks for your submission.

Note that you need not create a new thread for to send a update of a
patch. If you used the `git send-email` command, you could have used
the `--to=` option to send to the previous thread. For instance

Toggle snippet (3 lines)
git send-email --to=39756@debbugs.gnu.org 0001-my-patch.diff

Comments below:

Toggle quote (14 lines)
> ---
> gnu/packages/emacs-xyz.scm | 71 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 71 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 6b9027df8a..c6df469895 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -8601,6 +8601,77 @@ It should enable you to implement low-level X11 applications.")
> built on top of XELB.")
> (license license:gpl3+)))
>
> +(define-public emacs-exwm-next

I think you don't need to copy the whole package definition. Instead,
you could `inherit' from the original definition and only adjust the
name, description, inputs and maybe arguments.

For instance

Toggle snippet (8 lines)
(define-public emacs-exwm-next
(package
(inherit emacs)
(name "emacs-exwm-next")
(inputs ...)
(synopsys ...)))

See `substitute-keyword-arguments' in the fftwf package for a convenient
way to modify just one argument.

Toggle quote (5 lines)
> + (package
> + (name "emacs-exwm-next")
> + (version "0.23")
> + (synopsis "Emacs X window manager")

Maybe tell that this is using the next version of Emacs.

Toggle quote (21 lines)
> + (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

Shouldn't this be `emacs-next` as well?

Cheers!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5XkZIACgkQm9z0l6S7
zH9nPQf9E27fTm31eLYvkzUt+6zck81xYzuqnSTCjVr4EH7StDzq0r8xObfBrJNH
JsovSqNGpurjSxHnAHhE/PlZ7KokvQ0JiHL/wEF0ct1jI1wh6UAv1hjX/zMw189G
hCzMePtZ6aIsHC5pHv3Z0NUiLGPPc0qxHlKSPxq6jAdxypY+fx8Nnj/0xdqoQ+0j
xmvLdL3pE2gEplwZ0aVGdZyWpzlO+izgPuWUDSEJL48w5E1QXzW9L8Q6jDSfTio9
kIiOI+7kusXS4B6dolCZhCYCRWfvMeV6C/cYJxf0CGN9Rimi5M0+JUTfVKHPrEbE
kGIjgQti3omKmi06FaFyfMx9VJoGoQ==
=jM47
-----END PGP SIGNATURE-----

D
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 39804@debbugs.gnu.org)
87tv3bd6v1.fsf@web.de
Thanks for your feedback.

Toggle quote (37 lines)
>> ---
>> gnu/packages/emacs-xyz.scm | 71 ++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 71 insertions(+)
>>
>> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
>> index 6b9027df8a..c6df469895 100644
>> --- a/gnu/packages/emacs-xyz.scm
>> +++ b/gnu/packages/emacs-xyz.scm
>> @@ -8601,6 +8601,77 @@ It should enable you to implement low-level X11 applications.")
>> built on top of XELB.")
>> (license license:gpl3+)))
>>
>> +(define-public emacs-exwm-next
>
> I think you don't need to copy the whole package definition. Instead,
> you could `inherit' from the original definition and only adjust the
> name, description, inputs and maybe arguments.
>
> For instance
>
> --8<---------------cut here---------------start------------->8---
> (define-public emacs-exwm-next
> (package
> (inherit emacs)
> (name "emacs-exwm-next")
> (inputs ...)
> (synopsys ...)))
> --8<---------------cut here---------------end--------------->8---
>
> See `substitute-keyword-arguments' in the fftwf package for a convenient
> way to modify just one argument.
>
>> + (package
>> + (name "emacs-exwm-next")
>> + (version "0.23")
>> + (synopsis "Emacs X window manager")

Nice - I was not aware of that. The following definition seems to work
(see also the patch at the end of this mail)
Toggle quote (1 lines)
> --8<---------------cut here---------------start------------->8---
(define-public emacs-exwm-next
(package
(inherit emacs-exwm)
(name "emacs-exwm-next")
(synopsis "Emacs X window manager using the next version of emacs")
(inputs
(cons
`("emacs-next" ,emacs-next)
(delete `("emacs" ,emacs)
(package-inputs emacs-exwm))))))
Toggle quote (6 lines)
> --8<---------------cut here---------------end------------->8---

>> + (arguments
>> + `(#:emacs ,emacs
>
> Shouldn't this be `emacs-next` as well?
I have to admit that I do not understand that part. If I change it to
emacs-next, the build fails with the error
Toggle quote (1 lines)
> --8<---------------cut here---------------start------------->8---
phase `install' succeeded after 0.0 seconds
starting phase `make-autoloads'
Wrong type argument: stringp, nil
command "/gnu/store/1z520fgx6fiq426yf2174kal2q63a9q7-emacs-next-27.0.50-0.36abf68/bin/emacs" "--quick" "--batch" "--eval=(let ((backup-inhibited t) (generated-autoload-file \"/gnu/store/nnjcqc448yj79dxaj11fnq7s9a8zpc1z-emacs-exwm-next-test-0.23/share/emacs/site-lisp/exwm-next-test-autoloads.el\")) (update-directory-autoloads \"/gnu/store/nnjcqc448yj79dxaj11fnq7s9a8zpc1z-emacs-exwm-next-test-0.23/share/emacs/site-lisp\"))" failed with status 255
Toggle quote (1 lines)
> --8<---------------cut here---------------end------------->8---
It is a bit difficult for me to understand what is going on here,
because, like I said, I do not really understand this part of the
package definition in the first place - sorry. However, without
modifying the arguments, everything seems to work.

The following patch seems to work (do I need to send it on its own? I am
new to this type of workflow.)

Best
Dario

---
gnu/packages/emacs-xyz.scm | 72 ++++----------------------------------
1 file changed, 6 insertions(+), 66 deletions(-)

Toggle diff (85 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index c6df469895..3d5b650df9 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -8603,74 +8603,14 @@ built on top of XELB.")

(define-public emacs-exwm-next
(package
+ (inherit emacs-exwm)
(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)))
+ (synopsis "Emacs X window manager using the next version of emacs")
(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+)))
+ (cons
+ `("emacs-next" ,emacs-next)
+ (delete `("emacs" ,emacs)
+ (package-inputs emacs-exwm))))))

(define-public emacs-switch-window
(package
--
2.25.1
P
P
Pierre Neidhardt wrote on 28 Feb 2020 09:32
(name . dario)(address . dario.klingenberg@web.de)
878skn5cys.fsf@ambrevar.xyz
Hi Dario,

dario <dario.klingenberg@web.de> writes:

Toggle quote (53 lines)
> Thanks for your feedback.
>
>>> ---
>>> gnu/packages/emacs-xyz.scm | 71 ++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 71 insertions(+)
>>>
>>> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
>>> index 6b9027df8a..c6df469895 100644
>>> --- a/gnu/packages/emacs-xyz.scm
>>> +++ b/gnu/packages/emacs-xyz.scm
>>> @@ -8601,6 +8601,77 @@ It should enable you to implement low-level X11 applications.")
>>> built on top of XELB.")
>>> (license license:gpl3+)))
>>>
>>> +(define-public emacs-exwm-next
>>
>> I think you don't need to copy the whole package definition. Instead,
>> you could `inherit' from the original definition and only adjust the
>> name, description, inputs and maybe arguments.
>>
>> For instance
>>
>> --8<---------------cut here---------------start------------->8---
>> (define-public emacs-exwm-next
>> (package
>> (inherit emacs)
>> (name "emacs-exwm-next")
>> (inputs ...)
>> (synopsys ...)))
>> --8<---------------cut here---------------end--------------->8---
>>
>> See `substitute-keyword-arguments' in the fftwf package for a convenient
>> way to modify just one argument.
>>
>>> + (package
>>> + (name "emacs-exwm-next")
>>> + (version "0.23")
>>> + (synopsis "Emacs X window manager")
>
> Nice - I was not aware of that. The following definition seems to work
> (see also the patch at the end of this mail)
>> --8<---------------cut here---------------start------------->8---
> (define-public emacs-exwm-next
> (package
> (inherit emacs-exwm)
> (name "emacs-exwm-next")
> (synopsis "Emacs X window manager using the next version of emacs")
> (inputs
> (cons
> `("emacs-next" ,emacs-next)
> (delete `("emacs" ,emacs)
> (package-inputs emacs-exwm))))))

Maybe a bit better:

(inputs
`(("emacs" ,emacs-next)
,@(alist-delete "emacs" (package-inputs emacs-exwm))))))

Toggle quote (19 lines)
>> --8<---------------cut here---------------end------------->8---
>
>>> + (arguments
>>> + `(#:emacs ,emacs
>>
>> Shouldn't this be `emacs-next` as well?
> I have to admit that I do not understand that part. If I change it to
> emacs-next, the build fails with the error
>> --8<---------------cut here---------------start------------->8---
> phase `install' succeeded after 0.0 seconds
> starting phase `make-autoloads'
> Wrong type argument: stringp, nil
> command "/gnu/store/1z520fgx6fiq426yf2174kal2q63a9q7-emacs-next-27.0.50-0.36abf68/bin/emacs" "--quick" "--batch" "--eval=(let ((backup-inhibited t) (generated-autoload-file \"/gnu/store/nnjcqc448yj79dxaj11fnq7s9a8zpc1z-emacs-exwm-next-test-0.23/share/emacs/site-lisp/exwm-next-test-autoloads.el\")) (update-directory-autoloads \"/gnu/store/nnjcqc448yj79dxaj11fnq7s9a8zpc1z-emacs-exwm-next-test-0.23/share/emacs/site-lisp\"))" failed with status 255
>> --8<---------------cut here---------------end------------->8---
> It is a bit difficult for me to understand what is going on here,
> because, like I said, I do not really understand this part of the
> package definition in the first place - sorry. However, without
> modifying the arguments, everything seems to work.

The `#:emacs` field tells the build system which Emacs package to use to
build this package. There may be something that not compatible between
our current build system and emacs-next.

I've CC'ed Maxim and Leo, they might know more than me.

Toggle quote (3 lines)
> The following patch seems to work (do I need to send it on its own? I am
> new to this type of workflow.)

Attaching to this email is fine.
Better is to use `git send-email` like so:

Toggle snippet (3 lines)
git send-email --to=39804@debbugs.gnu.org --in-reply-to=<MESSAGE-ID> 0001-your.patch

with <MESSAGE-ID> being the message ID of the email you are replying to.
You can get this message ID in various ways: one way that always works
is to look up the "message-id" header of the raw email.

Also when you generate the patch with git, set the subject prefix to
[PATCH v2] for the second iteration, PATCH v3 for the third, etc.

Thanks!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5Y0BsACgkQm9z0l6S7
zH95mggAocyhL3wVt7SWN4QJupqaEXIwjSPuM0rzMPU9rLeDd9MKfZJEHgXIubDC
+G3nK2Hy5nUmlQ8tFvzt6GsAOAcMYGcy+Mfv2FglfAPI3+uxy39C7F+i403q3C3P
SrRXJV0tnMzk/3suiQQXjQScqcPwL+Q0LMd7Kq9mXNaS7Sk5D79oYCap70nyW8wE
5ne6f9Ee3+NDyfUYhu/jsPbOlMKwDLxAW16smi2m0yd6FJ7dM3ckg8x1ua7sv6jL
9jtXbtxw3+0K7bAcbPCZVfyQQjzwOfRmWywBJukKLvEL21R8PDnZZjA/v+PLtZFr
txzcS1bOQKsXdS6SKd9XGeHrOA7DOg==
=h9ax
-----END PGP SIGNATURE-----

L
L
Leo Prikler wrote on 28 Feb 2020 10:53
b4cbb0be620be359281742d5c6ab10aeac8c5782.camel@student.tugraz.at
Am Freitag, den 28.02.2020, 09:32 +0100 schrieb Pierre Neidhardt:
Toggle quote (7 lines)
> The `#:emacs` field tells the build system which Emacs package to use
> to
> build this package. There may be something that not compatible
> between
> our current build system and emacs-next.
>
> I've CC'ed Maxim and Leo, they might know more than me.
This issue should be addressed by #39375, which is currently waiting to
be pushed to master or staging. I took the liberty to rewrite this
patch with that one in mind – the build succeeds now, but I'm not sure
how to run it. Perhaps I'm missing a few bits.

Regards,
Leo
From 73eb9dac1bd13a8107aaedddecbe9bf7821a4841 Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Fri, 28 Feb 2020 10:46:23 +0100
Subject: [PATCH 1/2] gnu: Add emacs-xelb-next.

* gnu/packages/emacs-xyz.scm (emacs-xelb-next): New variable.
---
gnu/packages/emacs-xyz.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 76b9746f69..fa007f158b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -9661,6 +9661,14 @@ features an object-oriented API and permits a certain degree of concurrency.
It should enable you to implement low-level X11 applications.")
(license license:gpl3+)))
+(define-public emacs-xelb-next
+ (package
+ (inherit emacs-xelb)
+ (name "emacs-xelb-next")
+ (arguments
+ `(,@(package-arguments emacs-xelb)
+ #:emacs ,emacs-next))))
+
(define-public emacs-exwm
(package
(name "emacs-exwm")
--
2.25.1
From 19056fa969d830d5ee1065988f6a5b4f76fcbae9 Mon Sep 17 00:00:00 2001
From: dakling <dario.klingenberg@web.de>
Date: Wed, 26 Feb 2020 22:07:44 +0100
Subject: [PATCH 2/2] gnu: Add emacs-exwm-next.

* gnu/packages/emacs-xyz.scm (emacs-exwm-next): New variable.
---
gnu/packages/emacs-xyz.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index fa007f158b..9567324da8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -9739,6 +9739,24 @@ It should enable you to implement low-level X11 applications.")
built on top of XELB.")
(license license:gpl3+)))
+(define-public emacs-exwm-next
+ (package
+ (inherit emacs-exwm)
+ (name "emacs-exwm-next")
+ (propagated-inputs
+ `(("emacs-xelb" ,emacs-xelb-next)))
+ (inputs
+ `(("xhost" ,xhost)
+ ("emacs-next" ,emacs-next)
+ ("dbus" ,dbus)))
+ (arguments
+ `(,@(package-arguments emacs-exwm)
+ #:emacs ,emacs-next))
+ (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")
--
2.25.1
M
M
Maxim Cournoyer wrote on 28 Feb 2020 15:45
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
878skmn53h.fsf@gmail.com
Hi Leo,

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (13 lines)
> Am Freitag, den 28.02.2020, 09:32 +0100 schrieb Pierre Neidhardt:
>> The `#:emacs` field tells the build system which Emacs package to use
>> to
>> build this package. There may be something that not compatible
>> between
>> our current build system and emacs-next.
>>
>> I've CC'ed Maxim and Leo, they might know more than me.
> This issue should be addressed by #39375, which is currently waiting to
> be pushed to master or staging. I took the liberty to rewrite this
> patch with that one in mind – the build succeeds now, but I'm not sure
> how to run it. Perhaps I'm missing a few bits.

I'd rather understand why this is so -- there is no reason it should
have changed between Emacs 26 and Emacs 27.

The autoloads.elc file is loaded when doing:

Toggle snippet (8 lines)
strace emacs --quick --batch --eval "(progn
;(require 'autoload)
(let ((backup-inhibited t)
(generated-autoload-file \"/tmp/toto\"))
(update-directory-autoloads \"/tmp\")))" |& less


Noticed that I commented out the (require 'autoload) sexp.

The file is found:

Toggle snippet (3 lines)
openat(AT_FDCWD, "/gnu/store/zpmsyn471y4hpgsbz652h4szyskzc2bm-profile/share/emacs/27.0.50/lisp/emacs-lisp/autoload.elc", O_RDONLY|O_CLOEXEC) = 5

And the autoload.elc contains:

Toggle snippet (8 lines)
(fn &rest DIRS)
(defalias 'update-directory-autoloads #[128 "\306\307 \211\203\211@\310\311\"\204\211B\262A\266\202\202\210\312\313\314\"\315Q\262\316\317\320\321\322\323\324\325!\326\"\327\330%\"\"\306\211\211\211\211\331\332!\203K\333\334!\202L \335 !\205[\336 !\3278\262r\337 q\210\212\340\341\n!\320\341 \"\"\262eb\210\342 \306\314#\2034\343 \3448\211:\203\321\211@;\203\321\345\346\224!\210\3478\262\314\fD\235\203\235\262\211\211\203\315\211@\336!\3278\262\211\203\305\350\"\204\305B\262\340\f\"\262 \210A\266\202\202\236\210\202\"\211;\203\"\335!\203\343\211\235\203\356\314\262\345\346\224!\210\202\"\350\3478\211\314\fD\235\203\376\202\377\211\262\336!\3278\262\"\203\"\314\262\345\346\224!\210\351p\n#\203\"\211B\262\211B\262\340 \"\262\266\202p)\206:\352\353\354\355\341 !P!\346 G\306\356%\346\306 \211\203\227\211@T\211\262\306\247\203f@Y\203l\357#\210\266\351\306\n#\211\262\203\215\211B\262\350\"\203\220\262\202\220\314\262\nA\266\202\202M\210\360!\210\203\306\361\362\"\262db\210\363\364\306\314#\210\365p\306\211 \203\277\202\300\f%\2109c\210\266\204\323\366\306!\210\202\326\367 \210\370 +\207" [autoload-modified-buffers generated-autoload-file buffer-file-name generate-autoload-section-header autoload--non-timestamp autoload-timestamps nil get-load-suffixes string-match "\\.\\(elc\\|so\\|dll\\)" "^[^=.].*" regexp-opt t "\\'" apply nconc mapcar make-byte-code 257 "\301\302!\303\300#\207" vconcat vector [directory-files expand-file-name t] 5 "\n\n(fn DIR)" called-interactively-p interactive read-file-name "Write autoload definitions to file: " file-exists-p file-attributes autoload-find-generated-file delete file-relative-name search-forward autoload-read-section-header 3 autoload-remove-section 0 4 time-less-p autoload-generate-file-autoloads (0 0 0 0) make-progress-reporter byte-compile-info-string "Scraping files for " 10 progress-reporter-do-update progress-reporter-done sort string< search-backward "\f" autoload-insert-section-header set-buffer-modified-p autoload--save-buffer autoload-save-buffers generate-autoload-section-trailer] 21 (#$ . 25075) "DUpdate autoloads from directory: "])
#@191 Update loaddefs.el autoloads in batch mode.
Calls `update-directory-autoloads' on the command line arguments.
Definitions are written to `generated-autoload-file' (which
should be non-nil).

Perhaps the byte compiled version has a bug that causes it to fail with

Toggle snippet (3 lines)
Wrong type argument: stringp, nil

I'd rather this be understood (and fixed at its root) before continuing.

Maxim
M
M
Maxim Cournoyer wrote on 3 Mar 2020 03:19
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
87d09ukwnn.fsf@gmail.com
Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (11 lines)
> Am Freitag, den 28.02.2020, 09:32 +0100 schrieb Pierre Neidhardt:
>> The `#:emacs` field tells the build system which Emacs package to use
>> to
>> build this package. There may be something that not compatible
>> between
>> our current build system and emacs-next.
>>
>> I've CC'ed Maxim and Leo, they might know more than me.
> This issue should be addressed by #39375, which is currently waiting to
> be pushed to master or staging.

If we don't hear back from
be OK with pushing #39375 to master.

Toggle quote (76 lines)
> I took the liberty to rewrite this
> patch with that one in mind – the build succeeds now, but I'm not sure
> how to run it. Perhaps I'm missing a few bits.
>
> Regards,
> Leo
>
> From 73eb9dac1bd13a8107aaedddecbe9bf7821a4841 Mon Sep 17 00:00:00 2001
> From: Leo Prikler <leo.prikler@student.tugraz.at>
> Date: Fri, 28 Feb 2020 10:46:23 +0100
> Subject: [PATCH 1/2] gnu: Add emacs-xelb-next.
>
> * gnu/packages/emacs-xyz.scm (emacs-xelb-next): New variable.
> ---
> gnu/packages/emacs-xyz.scm | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 76b9746f69..fa007f158b 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -9661,6 +9661,14 @@ features an object-oriented API and permits a certain degree of concurrency.
> It should enable you to implement low-level X11 applications.")
> (license license:gpl3+)))
>
> +(define-public emacs-xelb-next
> + (package
> + (inherit emacs-xelb)
> + (name "emacs-xelb-next")
> + (arguments
> + `(,@(package-arguments emacs-xelb)
> + #:emacs ,emacs-next))))
> +
> (define-public emacs-exwm
> (package
> (name "emacs-exwm")
> --
> 2.25.1
>
>
> From 19056fa969d830d5ee1065988f6a5b4f76fcbae9 Mon Sep 17 00:00:00 2001
> From: dakling <dario.klingenberg@web.de>
> Date: Wed, 26 Feb 2020 22:07:44 +0100
> Subject: [PATCH 2/2] gnu: Add emacs-exwm-next.
>
> * gnu/packages/emacs-xyz.scm (emacs-exwm-next): New variable.
> ---
> gnu/packages/emacs-xyz.scm | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index fa007f158b..9567324da8 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -9739,6 +9739,24 @@ It should enable you to implement low-level X11 applications.")
> built on top of XELB.")
> (license license:gpl3+)))
>
> +(define-public emacs-exwm-next
> + (package
> + (inherit emacs-exwm)
> + (name "emacs-exwm-next")
> + (propagated-inputs
> + `(("emacs-xelb" ,emacs-xelb-next)))
> + (inputs
> + `(("xhost" ,xhost)
> + ("emacs-next" ,emacs-next)
> + ("dbus" ,dbus)))
> + (arguments
> + `(,@(package-arguments emacs-exwm)
> + #:emacs ,emacs-next))
> + (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+)))

No need to repeat the home-page, description and license field.

Other than that, LGTM.

Maxim
M
M
Maxim Cournoyer wrote on 11 Mar 2020 04:54
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
87zhcn35rl.fsf@gmail.com
Hello Leo,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (17 lines)
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
>
>> Am Freitag, den 28.02.2020, 09:32 +0100 schrieb Pierre Neidhardt:
>>> The `#:emacs` field tells the build system which Emacs package to use
>>> to
>>> build this package. There may be something that not compatible
>>> between
>>> our current build system and emacs-next.
>>>
>>> I've CC'ed Maxim and Leo, they might know more than me.
>> This issue should be addressed by #39375, which is currently waiting to
>> be pushed to master or staging.
>
> If we don't hear back from
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39823 in a day or two, I'd
> be OK with pushing #39375 to master.

There have been no activity or reply on #39823 yet, so feel free to push
the workaround discussed earlier (on the master branch is fine).

Maxim
L
L
Leo Prikler wrote on 15 Mar 2020 14:48
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
3021ddd02db7fe16676875b33c1a404960e21a2e.camel@student.tugraz.at
Am Dienstag, den 10.03.2020, 23:54 -0400 schrieb Maxim Cournoyer:
Toggle quote (29 lines)
> Hello Leo,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
> > Leo Prikler <leo.prikler@student.tugraz.at> writes:
> >
> > > Am Freitag, den 28.02.2020, 09:32 +0100 schrieb Pierre Neidhardt:
> > > > The `#:emacs` field tells the build system which Emacs package
> > > > to use
> > > > to
> > > > build this package. There may be something that not compatible
> > > > between
> > > > our current build system and emacs-next.
> > > >
> > > > I've CC'ed Maxim and Leo, they might know more than me.
> > > This issue should be addressed by #39375, which is currently
> > > waiting to
> > > be pushed to master or staging.
> >
> > If we don't hear back from
> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39823 in a day or
> > two, I'd
> > be OK with pushing #39375 to master.
>
> There have been no activity or reply on #39823 yet, so feel free to
> push
> the workaround discussed earlier (on the master branch is fine).
>
> Maxim
Following the discussion in 39823, we now have two options.
1. loading the library in advance as I do.
2. wrapping our code in `(eval ...)'.
The latter has the advantage of not needing an additional function, but
both require a build system change.

WDYT?
M
M
Maxim Cournoyer wrote on 17 Mar 2020 02:59
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
874kun68rn.fsf@gmail.com
Hi Leo!

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (38 lines)
> Am Dienstag, den 10.03.2020, 23:54 -0400 schrieb Maxim Cournoyer:
>> Hello Leo,
>>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>>
>> > Leo Prikler <leo.prikler@student.tugraz.at> writes:
>> >
>> > > Am Freitag, den 28.02.2020, 09:32 +0100 schrieb Pierre Neidhardt:
>> > > > The `#:emacs` field tells the build system which Emacs package
>> > > > to use
>> > > > to
>> > > > build this package. There may be something that not compatible
>> > > > between
>> > > > our current build system and emacs-next.
>> > > >
>> > > > I've CC'ed Maxim and Leo, they might know more than me.
>> > > This issue should be addressed by #39375, which is currently
>> > > waiting to
>> > > be pushed to master or staging.
>> >
>> > If we don't hear back from
>> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39823 in a day or
>> > two, I'd
>> > be OK with pushing #39375 to master.
>>
>> There have been no activity or reply on #39823 yet, so feel free to
>> push
>> the workaround discussed earlier (on the master branch is fine).
>>
>> Maxim
> Following the discussion in 39823, we now have two options.
> 1. loading the library in advance as I do.
> 2. wrapping our code in `(eval ...)'.
> The latter has the advantage of not needing an additional function, but
> both require a build system change.
>
> WDYT?

#1 would be best, as it is a general fix, and we can even add a
parameter to allow choosing between dynamic vs lexcal evaluation (see
the doc for `eval', it takes such a parameter and defaults to
dynamical).

Maxim
M
M
Maxim Cournoyer wrote on 23 Mar 2020 02:52
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
87k13b4z2r.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me
Hello!

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (39 lines)
> Am Dienstag, den 10.03.2020, 23:54 -0400 schrieb Maxim Cournoyer:
>> Hello Leo,
>>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>>
>> > Leo Prikler <leo.prikler@student.tugraz.at> writes:
>> >
>> > > Am Freitag, den 28.02.2020, 09:32 +0100 schrieb Pierre Neidhardt:
>> > > > The `#:emacs` field tells the build system which Emacs package
>> > > > to use
>> > > > to
>> > > > build this package. There may be something that not compatible
>> > > > between
>> > > > our current build system and emacs-next.
>> > > >
>> > > > I've CC'ed Maxim and Leo, they might know more than me.
>> > > This issue should be addressed by #39375, which is currently
>> > > waiting to
>> > > be pushed to master or staging.
>> >
>> > If we don't hear back from
>> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39823 in a day or
>> > two, I'd
>> > be OK with pushing #39375 to master.
>>
>> There have been no activity or reply on #39823 yet, so feel free to
>> push
>> the workaround discussed earlier (on the master branch is fine).
>>
>> Maxim

> Following the discussion in 39823, we now have two options.
> 1. loading the library in advance as I do.
> 2. wrapping our code in `(eval ...)'.
> The latter has the advantage of not needing an additional function, but
> both require a build system change.
>
> WDYT?

I went with option 2, and tested that emacs-exwm-next could be built.
The relevant commit is afc6b1c0b635e3268795c0f766be408c5e9858e7 on
master.

Maxim
P
P
Pierre Neidhardt wrote on 23 Mar 2020 09:57
87k13ba1o1.fsf@ambrevar.xyz
Thanks!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl54eg4ACgkQm9z0l6S7
zH++oQf9EYd2j/eofvgrH+CPJXZzS/Y7d5y6ggtB0j4cL12QX+JpYbaA23smqA5H
I5x1KtppeVquEj66ttyzYz93duOXFy/VUtoZmHvXdbO29YdC7k/lBKQt4o5KBnh8
VYUQp5KSYtN7ycLlXn0Tbn2qG8gQ5YcM6fA5kilC1uJtLN8yoQYnZ3Akbsz3i+6z
JhikqBeU6Ne74uZhnHH246tlZsTznlUpbQTlPJCYCMhFB+lsuQiBHpETykSvBmGj
7/OXEP+gWMqmHjKGyBJngU4B3dcOcE38lAI1REuojBflMGG4aolOLivOzXdK3xAN
lkjWiDwFgU7c26KTjTPvDarG2H8Mpg==
=V+Hm
-----END PGP SIGNATURE-----

?