[bug#39375] gnu: emacs-utils: Port to emacs-next.
diff mbox series

Message ID 20200131200222.23792-1-leo.prikler@student.tugraz.at
State New
Headers show
Series
  • [bug#39375] gnu: emacs-utils: Port to emacs-next.
Related show

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Leo Prikler Jan. 31, 2020, 8:02 p.m. UTC
* 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(-)

Comments

Pierre Neidhardt Feb. 27, 2020, 10:38 a.m. UTC | #1
Looks good to me.  Anything blocking this?
Leo Prikler Feb. 27, 2020, 10:54 a.m. UTC | #2
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.
Pierre Neidhardt Feb. 27, 2020, 1:20 p.m. UTC | #3
So push to staging?
Leo Prikler Feb. 28, 2020, 9:55 a.m. UTC | #4
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
Pierre Neidhardt Feb. 28, 2020, 10:05 a.m. UTC | #5
Cc-ing to Maxim:

Leo Prikler <leo.prikler@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.
Maxim Cournoyer Feb. 28, 2020, 2:50 p.m. UTC | #6
Hi Leo,

Leo Prikler <leo.prikler@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
Maxim Cournoyer Feb. 28, 2020, 3:26 p.m. UTC | #7
Maxim Cournoyer <maxim.cournoyer@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

Patch
diff mbox series

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