unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
@ 2020-02-26 21:07 dakling
  2020-02-27  9:53 ` Pierre Neidhardt
  0 siblings, 1 reply; 12+ messages in thread
From: dakling @ 2020-02-26 21:07 UTC (permalink / raw)
  To: 39804


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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-02-26 21:07 [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next) dakling
@ 2020-02-27  9:53 ` Pierre Neidhardt
  2020-02-27 22:04   ` dario
  0 siblings, 1 reply; 12+ messages in thread
From: Pierre Neidhardt @ 2020-02-27  9:53 UTC (permalink / raw)
  To: dakling; +Cc: 39804

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

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

--8<---------------cut here---------------start------------->8---
git send-email --to=39756@debbugs.gnu.org 0001-my-patch.diff
--8<---------------cut here---------------end--------------->8---

Comments below:

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

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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-02-27  9:53 ` Pierre Neidhardt
@ 2020-02-27 22:04   ` dario
  2020-02-28  8:32     ` Pierre Neidhardt
  0 siblings, 1 reply; 12+ messages in thread
From: dario @ 2020-02-27 22:04 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 39804

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

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-02-27 22:04   ` dario
@ 2020-02-28  8:32     ` Pierre Neidhardt
  2020-02-28  9:53       ` Leo Prikler
  0 siblings, 1 reply; 12+ messages in thread
From: Pierre Neidhardt @ 2020-02-28  8:32 UTC (permalink / raw)
  To: dario; +Cc: 39804, Maxim Cournoyer, Leo Prikler

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

Hi Dario,

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

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

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

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

--8<---------------cut here---------------start------------->8---
git send-email --to=39804@debbugs.gnu.org --in-reply-to=<MESSAGE-ID> 0001-your.patch
--8<---------------cut here---------------end--------------->8---

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
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-02-28  8:32     ` Pierre Neidhardt
@ 2020-02-28  9:53       ` Leo Prikler
  2020-02-28 14:45         ` Maxim Cournoyer
  2020-03-03  2:19         ` Maxim Cournoyer
  0 siblings, 2 replies; 12+ messages in thread
From: Leo Prikler @ 2020-02-28  9:53 UTC (permalink / raw)
  To: Pierre Neidhardt, dario; +Cc: 39804, Maxim Cournoyer

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

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.

Regards,
Leo


[-- Attachment #2: 0001-gnu-Add-emacs-xelb-next.patch --]
[-- Type: text/x-patch, Size: 984 bytes --]

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


[-- Attachment #3: 0002-gnu-Add-emacs-exwm-next.patch --]
[-- Type: text/x-patch, Size: 1297 bytes --]

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+)))
+
 (define-public emacs-switch-window
   (package
     (name "emacs-switch-window")
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-02-28  9:53       ` Leo Prikler
@ 2020-02-28 14:45         ` Maxim Cournoyer
  2020-03-03  2:19         ` Maxim Cournoyer
  1 sibling, 0 replies; 12+ messages in thread
From: Maxim Cournoyer @ 2020-02-28 14:45 UTC (permalink / raw)
  To: Leo Prikler; +Cc: Pierre Neidhardt, dario, 39804

Hi Leo,

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

--8<---------------cut here---------------start------------->8---
strace emacs --quick --batch --eval "(progn
 ;(require 'autoload)
 (let ((backup-inhibited t)
       (generated-autoload-file \"/tmp/toto\"))
   (update-directory-autoloads \"/tmp\")))" |& less

--8<---------------cut here---------------end--------------->8---

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

The file is found:

--8<---------------cut here---------------start------------->8---
openat(AT_FDCWD, "/gnu/store/zpmsyn471y4hpgsbz652h4szyskzc2bm-profile/share/emacs/27.0.50/lisp/emacs-lisp/autoload.elc", O_RDONLY|O_CLOEXEC) = 5
--8<---------------cut here---------------end--------------->8---

And the autoload.elc contains:

--8<---------------cut here---------------start------------->8---
(fn &rest DIRS)\x1f
(defalias 'update-directory-autoloads #[128 "\306\307 \211\203\0\211@\310\311\"\204\0\211B\262\x01A\266\202\202\0\210\312\313\314\"\315Q\262\316\317\320\321\322\323\324\325\b!\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\v\306\314#\2034\343 \3448\211:\203\321\211@;\203\321\345\346\224!\210\3478\262\x04\314\fD\235\203\235\x02\262\211\211\203\315\211@\336!\3278\262\211\203\305\350\b\"\204\305\x01\aB\262\a\340\x06\f\"\262\v\210A\266\202\202\236\210\202\"\211;\203\"\335!\203\343\211\a\235\203\356\314\262\345\346\224!\210\202\"\350\3478\211\314\fD\235\203\376\x04\202\377\211\262\336!\3278\262\"\203\"\314\262\345\346\224!\210\351p\n#\203\"\211B\262\211\aB\262\a\340\x06	\"\262\b\266\202p)\206:\352\353\354\355\341	!P!\346	G\306\356%\346\306	\211\203\227\211@\x04T\211\262\306\247\203f\x01@Y\203l\357\x03#\210\266\351\306\n#\211\262\203\215\211\bB\262\b\350\x06\"\203\220\x02\262\202\220\314\262\nA\266\202\202M\210\360!\210\203\306\361\x06\362\"\262db\210\363\364\306\314#\210\365p\306\211	\203\277\x06\b\202\300\f%\2109c\210\266\x03\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).\x1f
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
Wrong type argument: stringp, nil
--8<---------------cut here---------------end--------------->8---

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

Maxim

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-02-28  9:53       ` Leo Prikler
  2020-02-28 14:45         ` Maxim Cournoyer
@ 2020-03-03  2:19         ` Maxim Cournoyer
  2020-03-11  3:54           ` Maxim Cournoyer
  1 sibling, 1 reply; 12+ messages in thread
From: Maxim Cournoyer @ 2020-03-03  2:19 UTC (permalink / raw)
  To: Leo Prikler; +Cc: Pierre Neidhardt, dario, 39804

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.

> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-03-03  2:19         ` Maxim Cournoyer
@ 2020-03-11  3:54           ` Maxim Cournoyer
  2020-03-15 13:48             ` Leo Prikler
  0 siblings, 1 reply; 12+ messages in thread
From: Maxim Cournoyer @ 2020-03-11  3:54 UTC (permalink / raw)
  To: Leo Prikler; +Cc: Pierre Neidhardt, dario, 39804

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-03-11  3:54           ` Maxim Cournoyer
@ 2020-03-15 13:48             ` Leo Prikler
  2020-03-17  1:59               ` Maxim Cournoyer
  2020-03-23  1:52               ` Maxim Cournoyer
  0 siblings, 2 replies; 12+ messages in thread
From: Leo Prikler @ 2020-03-15 13:48 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Pierre Neidhardt, dario, 39804

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?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-03-15 13:48             ` Leo Prikler
@ 2020-03-17  1:59               ` Maxim Cournoyer
  2020-03-23  1:52               ` Maxim Cournoyer
  1 sibling, 0 replies; 12+ messages in thread
From: Maxim Cournoyer @ 2020-03-17  1:59 UTC (permalink / raw)
  To: Leo Prikler; +Cc: Pierre Neidhardt, dario, 39804

Hi Leo!

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

> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-03-15 13:48             ` Leo Prikler
  2020-03-17  1:59               ` Maxim Cournoyer
@ 2020-03-23  1:52               ` Maxim Cournoyer
  2020-03-23  8:57                 ` Pierre Neidhardt
  1 sibling, 1 reply; 12+ messages in thread
From: Maxim Cournoyer @ 2020-03-23  1:52 UTC (permalink / raw)
  To: Leo Prikler; +Cc: Pierre Neidhardt, dario, Maxim Cournoyer, 39804

Hello!

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

> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
  2020-03-23  1:52               ` Maxim Cournoyer
@ 2020-03-23  8:57                 ` Pierre Neidhardt
  0 siblings, 0 replies; 12+ messages in thread
From: Pierre Neidhardt @ 2020-03-23  8:57 UTC (permalink / raw)
  To: Maxim Cournoyer, Leo Prikler; +Cc: 39804, dario

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

Thanks!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-03-23  8:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26 21:07 [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next) dakling
2020-02-27  9:53 ` Pierre Neidhardt
2020-02-27 22:04   ` dario
2020-02-28  8:32     ` Pierre Neidhardt
2020-02-28  9:53       ` Leo Prikler
2020-02-28 14:45         ` Maxim Cournoyer
2020-03-03  2:19         ` Maxim Cournoyer
2020-03-11  3:54           ` Maxim Cournoyer
2020-03-15 13:48             ` Leo Prikler
2020-03-17  1:59               ` Maxim Cournoyer
2020-03-23  1:52               ` Maxim Cournoyer
2020-03-23  8:57                 ` Pierre Neidhardt

Code repositories for project(s) associated with this public inbox

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

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