GNU bug report logs - #39375
[PATCH] gnu: emacs-utils: Port to emacs-next.

Previous Next

Package: guix-patches;

Reported by: Leo Prikler <leo.prikler <at> student.tugraz.at>

Date: Fri, 31 Jan 2020 20:03:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39375 in the body.
You can then email your comments to 39375 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Fri, 31 Jan 2020 20:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 31 Jan 2020 20:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Fri, 31 Jan 2020 21:02:23 +0100
* guix/build/emacs-utils.scm (emacs-batch-eval*): New variable.
(emacs-generate-autoloads): Redefine in terms of emacs-batch-eval*.
Require autoload (needed with emacs-next).
---
 guix/build/emacs-utils.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index 885fd0a217..1462f9d0af 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -23,6 +23,7 @@
   #:use-module (guix build utils)
   #:export (%emacs
             emacs-batch-eval
+            emacs-batch-eval*
             emacs-batch-edit-file
             emacs-batch-disable-compilation
             emacs-generate-autoloads
@@ -46,6 +47,14 @@
   (invoke (%emacs) "--quick" "--batch"
           (format #f "--eval=~S" expr)))
 
+(define (emacs-batch-eval* . exprs)
+  "Run Emacs in batch mode, and execute all of the elisp expressions EXPRS."
+  (apply invoke (%emacs) "--quick" "--batch"
+         (map
+          (lambda (expr)
+            (format #f "--eval=~S" expr))
+          exprs)))
+
 (define (emacs-batch-edit-file file expr)
   "Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
   (invoke (%emacs) "--quick" "--batch"
@@ -64,7 +73,7 @@
          (expr `(let ((backup-inhibited t)
                       (generated-autoload-file ,file))
                   (update-directory-autoloads ,directory))))
-    (emacs-batch-eval expr)))
+    (emacs-batch-eval* '(require 'autoload) expr)))
 
 (define* (emacs-byte-compile-directory dir)
   "Byte compile all files in DIR and its sub-directories."
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Thu, 27 Feb 2020 10:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Thu, 27 Feb 2020 11:38:30 +0100
[Message part 1 (text/plain, inline)]
Looks good to me.  Anything blocking this?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Thu, 27 Feb 2020 10:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Thu, 27 Feb 2020 11:54:53 +0100
Am Donnerstag, den 27.02.2020, 11:38 +0100 schrieb Pierre Neidhardt:
> Looks good to me.  Anything blocking this?
AFAIK the change should be backwards-compatible, so it's just the
rebuilds of all emacs libraries.





Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Thu, 27 Feb 2020 13:21:02 GMT) Full text and rfc822 format available.

Message #14 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Thu, 27 Feb 2020 14:20:15 +0100
[Message part 1 (text/plain, inline)]
So push to staging?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Fri, 28 Feb 2020 09:56:01 GMT) Full text and rfc822 format available.

Message #17 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Fri, 28 Feb 2020 10:55:22 +0100
Am Donnerstag, den 27.02.2020, 14:20 +0100 schrieb Pierre Neidhardt:
> So push to staging?
Staging should be safe, but previous updates to emacs-build-system have
been pushed to master before with the reasoning, that the rebuilds are
all very small.  I'm not sure who has the authority over this.

Regards,
Leo





Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Fri, 28 Feb 2020 10:06:01 GMT) Full text and rfc822 format available.

Message #20 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 39375 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Fri, 28 Feb 2020 11:05:33 +0100
[Message part 1 (text/plain, inline)]
Cc-ing to Maxim:

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

> Am Donnerstag, den 27.02.2020, 14:20 +0100 schrieb Pierre Neidhardt:
>> So push to staging?
> Staging should be safe, but previous updates to emacs-build-system have
> been pushed to master before with the reasoning, that the rebuilds are
> all very small.  I'm not sure who has the authority over this.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Fri, 28 Feb 2020 14:51:02 GMT) Full text and rfc822 format available.

Message #23 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Fri, 28 Feb 2020 09:50:41 -0500
Hi Leo,

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

> * guix/build/emacs-utils.scm (emacs-batch-eval*): New variable.
> (emacs-generate-autoloads): Redefine in terms of emacs-batch-eval*.
> Require autoload (needed with emacs-next).
> ---
>  guix/build/emacs-utils.scm | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
> index 885fd0a217..1462f9d0af 100644
> --- a/guix/build/emacs-utils.scm
> +++ b/guix/build/emacs-utils.scm
> @@ -23,6 +23,7 @@
>    #:use-module (guix build utils)
>    #:export (%emacs
>              emacs-batch-eval
> +            emacs-batch-eval*
>              emacs-batch-edit-file
>              emacs-batch-disable-compilation
>              emacs-generate-autoloads
> @@ -46,6 +47,14 @@
>    (invoke (%emacs) "--quick" "--batch"
>            (format #f "--eval=~S" expr)))
>  
> +(define (emacs-batch-eval* . exprs)
> +  "Run Emacs in batch mode, and execute all of the elisp expressions EXPRS."
> +  (apply invoke (%emacs) "--quick" "--batch"
> +         (map
> +          (lambda (expr)
> +            (format #f "--eval=~S" expr))
> +          exprs)))
> +
>  (define (emacs-batch-edit-file file expr)
>    "Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
>    (invoke (%emacs) "--quick" "--batch"
> @@ -64,7 +73,7 @@
>           (expr `(let ((backup-inhibited t)
>                        (generated-autoload-file ,file))
>                    (update-directory-autoloads ,directory))))
> -    (emacs-batch-eval expr)))
> +    (emacs-batch-eval* '(require 'autoload) expr)))
>  
>  (define* (emacs-byte-compile-directory dir)
>    "Byte compile all files in DIR and its sub-directories."

As I wrote here <https://bugs.gnu.org/39804>, I think we have something
fundamentally flawed in our Emacs 27 build, which I'd like to have
addressed at its core.

Thanks,

Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Fri, 28 Feb 2020 15:27:02 GMT) Full text and rfc822 format available.

Message #26 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: [bug#39375] [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Fri, 28 Feb 2020 10:26:11 -0500
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

[...]

> As I wrote here <https://bugs.gnu.org/39804>, I think we have something
> fundamentally flawed in our Emacs 27 build, which I'd like to have
> addressed at its core.

For the record, I've opened an issue with Emacs here: <https://bugs.gnu.org/39823>.

Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Mon, 30 Aug 2021 20:17:01 GMT) Full text and rfc822 format available.

Message #29 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: bug#39375: [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Mon, 30 Aug 2021 16:16:38 -0400
Hi Leo,

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

> Hi Leo,
>
> Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
>
>> * guix/build/emacs-utils.scm (emacs-batch-eval*): New variable.
>> (emacs-generate-autoloads): Redefine in terms of emacs-batch-eval*.
>> Require autoload (needed with emacs-next).
>> ---
>>  guix/build/emacs-utils.scm | 11 ++++++++++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
>> index 885fd0a217..1462f9d0af 100644
>> --- a/guix/build/emacs-utils.scm
>> +++ b/guix/build/emacs-utils.scm
>> @@ -23,6 +23,7 @@
>>    #:use-module (guix build utils)
>>    #:export (%emacs
>>              emacs-batch-eval
>> +            emacs-batch-eval*
>>              emacs-batch-edit-file
>>              emacs-batch-disable-compilation
>>              emacs-generate-autoloads
>> @@ -46,6 +47,14 @@
>>    (invoke (%emacs) "--quick" "--batch"
>>            (format #f "--eval=~S" expr)))
>>  
>> +(define (emacs-batch-eval* . exprs)
>> +  "Run Emacs in batch mode, and execute all of the elisp expressions EXPRS."
>> +  (apply invoke (%emacs) "--quick" "--batch"
>> +         (map
>> +          (lambda (expr)
>> +            (format #f "--eval=~S" expr))
>> +          exprs)))
>> +
>>  (define (emacs-batch-edit-file file expr)
>>    "Load FILE in Emacs using batch mode, and execute the elisp code EXPR."
>>    (invoke (%emacs) "--quick" "--batch"
>> @@ -64,7 +73,7 @@
>>           (expr `(let ((backup-inhibited t)
>>                        (generated-autoload-file ,file))
>>                    (update-directory-autoloads ,directory))))
>> -    (emacs-batch-eval expr)))
>> +    (emacs-batch-eval* '(require 'autoload) expr)))
>>  
>>  (define* (emacs-byte-compile-directory dir)
>>    "Byte compile all files in DIR and its sub-directories."
>
> As I wrote here <https://bugs.gnu.org/39804>, I think we have something
> fundamentally flawed in our Emacs 27 build, which I'd like to have
> addressed at its core.

Correct me if I'm wrong, but I think we ended up addressing the issue
differently at the time, right?  If you confirm that this is no longer
needed, let's close it!

Thanks,

Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#39375; Package guix-patches. (Mon, 30 Aug 2021 21:34:02 GMT) Full text and rfc822 format available.

Message #32 received at 39375 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 39375 <at> debbugs.gnu.org
Subject: Re: bug#39375: [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Mon, 30 Aug 2021 23:33:14 +0200
Hi Maxim,

Am Montag, den 30.08.2021, 16:16 -0400 schrieb Maxim Cournoyer:
> Hi Leo,
> 
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> 
> > Hi Leo,
> > 
> > Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> > 
> > > * guix/build/emacs-utils.scm (emacs-batch-eval*): New variable.
> > > (emacs-generate-autoloads): Redefine in terms of emacs-batch-
> > > eval*.
> > > Require autoload (needed with emacs-next).
> > > ---
> > >  guix/build/emacs-utils.scm | 11 ++++++++++-
> > >  1 file changed, 10 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-
> > > utils.scm
> > > index 885fd0a217..1462f9d0af 100644
> > > --- a/guix/build/emacs-utils.scm
> > > +++ b/guix/build/emacs-utils.scm
> > > @@ -23,6 +23,7 @@
> > >    #:use-module (guix build utils)
> > >    #:export (%emacs
> > >              emacs-batch-eval
> > > +            emacs-batch-eval*
> > >              emacs-batch-edit-file
> > >              emacs-batch-disable-compilation
> > >              emacs-generate-autoloads
> > > @@ -46,6 +47,14 @@
> > >    (invoke (%emacs) "--quick" "--batch"
> > >            (format #f "--eval=~S" expr)))
> > >  
> > > +(define (emacs-batch-eval* . exprs)
> > > +  "Run Emacs in batch mode, and execute all of the elisp
> > > expressions EXPRS."
> > > +  (apply invoke (%emacs) "--quick" "--batch"
> > > +         (map
> > > +          (lambda (expr)
> > > +            (format #f "--eval=~S" expr))
> > > +          exprs)))
> > > +
> > >  (define (emacs-batch-edit-file file expr)
> > >    "Load FILE in Emacs using batch mode, and execute the elisp
> > > code EXPR."
> > >    (invoke (%emacs) "--quick" "--batch"
> > > @@ -64,7 +73,7 @@
> > >           (expr `(let ((backup-inhibited t)
> > >                        (generated-autoload-file ,file))
> > >                    (update-directory-autoloads ,directory))))
> > > -    (emacs-batch-eval expr)))
> > > +    (emacs-batch-eval* '(require 'autoload) expr)))
> > >  
> > >  (define* (emacs-byte-compile-directory dir)
> > >    "Byte compile all files in DIR and its sub-directories."
> > 
> > As I wrote here <https://bugs.gnu.org/39804>;, I think we have
> > something
> > fundamentally flawed in our Emacs 27 build, which I'd like to have
> > addressed at its core.
> 
> Correct me if I'm wrong, but I think we ended up addressing the issue
> differently at the time, right?  If you confirm that this is no
> longer
> needed, let's close it!
On the top of my head I can't think of any use for multiple --eval
lines when you can switch between lexical and dynamic scoping at will. 
Perhaps in the future we might find one, but if you want to close this
bug in the meantime, go ahead.

Thanks





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 31 Aug 2021 02:45:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
bug acknowledged by developer. (Tue, 31 Aug 2021 02:45:02 GMT) Full text and rfc822 format available.

Message #37 received at 39375-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 39375-done <at> debbugs.gnu.org
Subject: Re: bug#39375: [PATCH] gnu: emacs-utils: Port to emacs-next.
Date: Mon, 30 Aug 2021 22:44:11 -0400
Hi Leo,

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

> Hi Maxim,
>
> Am Montag, den 30.08.2021, 16:16 -0400 schrieb Maxim Cournoyer:
>> Hi Leo,
>> 
>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>> 
>> > Hi Leo,
>> > 
>> > Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
>> > 
>> > > * guix/build/emacs-utils.scm (emacs-batch-eval*): New variable.
>> > > (emacs-generate-autoloads): Redefine in terms of emacs-batch-
>> > > eval*.
>> > > Require autoload (needed with emacs-next).
>> > > ---
>> > >  guix/build/emacs-utils.scm | 11 ++++++++++-
>> > >  1 file changed, 10 insertions(+), 1 deletion(-)
>> > > 
>> > > diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-
>> > > utils.scm
>> > > index 885fd0a217..1462f9d0af 100644
>> > > --- a/guix/build/emacs-utils.scm
>> > > +++ b/guix/build/emacs-utils.scm
>> > > @@ -23,6 +23,7 @@
>> > >    #:use-module (guix build utils)
>> > >    #:export (%emacs
>> > >              emacs-batch-eval
>> > > +            emacs-batch-eval*
>> > >              emacs-batch-edit-file
>> > >              emacs-batch-disable-compilation
>> > >              emacs-generate-autoloads
>> > > @@ -46,6 +47,14 @@
>> > >    (invoke (%emacs) "--quick" "--batch"
>> > >            (format #f "--eval=~S" expr)))
>> > >  
>> > > +(define (emacs-batch-eval* . exprs)
>> > > +  "Run Emacs in batch mode, and execute all of the elisp
>> > > expressions EXPRS."
>> > > +  (apply invoke (%emacs) "--quick" "--batch"
>> > > +         (map
>> > > +          (lambda (expr)
>> > > +            (format #f "--eval=~S" expr))
>> > > +          exprs)))
>> > > +
>> > >  (define (emacs-batch-edit-file file expr)
>> > >    "Load FILE in Emacs using batch mode, and execute the elisp
>> > > code EXPR."
>> > >    (invoke (%emacs) "--quick" "--batch"
>> > > @@ -64,7 +73,7 @@
>> > >           (expr `(let ((backup-inhibited t)
>> > >                        (generated-autoload-file ,file))
>> > >                    (update-directory-autoloads ,directory))))
>> > > -    (emacs-batch-eval expr)))
>> > > +    (emacs-batch-eval* '(require 'autoload) expr)))
>> > >  
>> > >  (define* (emacs-byte-compile-directory dir)
>> > >    "Byte compile all files in DIR and its sub-directories."
>> > 
>> > As I wrote here <https://bugs.gnu.org/39804>;, I think we have
>> > something
>> > fundamentally flawed in our Emacs 27 build, which I'd like to have
>> > addressed at its core.
>> 
>> Correct me if I'm wrong, but I think we ended up addressing the issue
>> differently at the time, right?  If you confirm that this is no
>> longer
>> needed, let's close it!
> On the top of my head I can't think of any use for multiple --eval
> lines when you can switch between lexical and dynamic scoping at will. 
> Perhaps in the future we might find one, but if you want to close this
> bug in the meantime, go ahead.

Yeah, the main value this patch was bringing was fixing an error on
Emacs 27 that was caused by going to lexical scope even when using
--eval (your fix was to require autoload in (emacs-batch-eval* '(require
'autoload) expr)).  The fixed that ended up being pushed was this:

--8<---------------cut here---------------start------------->8---
(define* (emacs-batch-eval expr #:key dynamic?)
  "Run Emacs in batch mode, and execute the Elisp code EXPR.  If DYNAMIC? is
true, evaluate using dynamic scoping."
  (invoke (%emacs) "--quick" "--batch"
          (format #f "--eval=(eval '~a ~:[t~;nil~])"
                  (expr->string expr) dynamic?)))
--8<---------------cut here---------------end--------------->8---

Which allows requesting dynamic scope.

Closing.

Thank you!

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Sep 2021 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.