GNU bug report logs - #58213
[PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher and use gexp.

Previous Next

Package: guix-patches;

Reported by: Michael Rohleder <mike <at> rohleder.de>

Date: Sat, 1 Oct 2022 05:35:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

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 58213 in the body.
You can then email your comments to 58213 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#58213; Package guix-patches. (Sat, 01 Oct 2022 05:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Rohleder <mike <at> rohleder.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 01 Oct 2022 05:35:02 GMT) Full text and rfc822 format available.

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

From: Michael Rohleder <mike <at> rohleder.de>
To: guix-patches <at> gnu.org
Cc: Michael Rohleder <mike <at> rohleder.de>
Subject: [PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher and use
 gexp.
Date: Sat,  1 Oct 2022 07:33:16 +0200
* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Use gexps.
{substitute-ag-path}: Add phase to avoid propagating ag.
{install-info}: Use gexps.
[inputs]: Add the-silver-searcher.
[propagated-inputs]: Remove the-silver-searcher.
---
 gnu/packages/emacs-xyz.scm | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6d9d0d6a8f..76a17da88e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3026,23 +3026,27 @@ (define-public emacs-ag
         (base32 "1p918y24vcn2pdliaymd210xp9fvhd4a1srqbv2lfiqrh59yjidx"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'make-info
-           (lambda _
-             (with-directory-excursion "docs"
-               (invoke "make" "info"))))
-         (add-after 'install 'install-info
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (info (string-append out "/share/info")))
-               (install-file "docs/_build/texinfo/agel.info" info)))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'substitute-ag-path
+            (lambda _
+              (make-file-writable "ag.el")
+              (emacs-substitute-sexps "ag.el"
+                ("defcustom ag-executable" (which "ag")))))
+          (add-before 'install 'make-info
+            (lambda _
+              (with-directory-excursion "docs"
+                (invoke "make" "info"))))
+          (add-after 'install 'install-info
+            (lambda _
+              (install-file "docs/_build/texinfo/agel.info"
+                            (string-append #$output "/share/info")))))))
+    (inputs (list the-silver-searcher))  ;'ag' executable
     (native-inputs
      (list python-sphinx texinfo))
     (propagated-inputs
-     (list emacs-dash
-           emacs-s
-           the-silver-searcher))        ;'ag' executable
+     (list emacs-dash emacs-s))
     (home-page "https://github.com/Wilfred/ag.el")
     (synopsis "Front-end for ag (the-silver-searcher) for Emacs")
     (description "This package provides the ability to use the silver
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#58213; Package guix-patches. (Sun, 02 Oct 2022 18:15:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Michael Rohleder <mike <at> rohleder.de>
Cc: 58213 <at> debbugs.gnu.org
Subject: Re: [bug#58213] [PATCH] gnu: emacs-ag: Do not propagate
 the-silver-searcher and use gexp.
Date: Sun, 2 Oct 2022 21:14:01 +0300
[Message part 1 (text/plain, inline)]
On Sat, Oct 01, 2022 at 07:33:16AM +0200, Michael Rohleder wrote:
> * gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Use gexps.
> {substitute-ag-path}: Add phase to avoid propagating ag.
> {install-info}: Use gexps.
> [inputs]: Add the-silver-searcher.
> [propagated-inputs]: Remove the-silver-searcher.
> ---
>  gnu/packages/emacs-xyz.scm | 32 ++++++++++++++++++--------------
>  1 file changed, 18 insertions(+), 14 deletions(-)
> 
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 6d9d0d6a8f..76a17da88e 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -3026,23 +3026,27 @@ (define-public emacs-ag
>          (base32 "1p918y24vcn2pdliaymd210xp9fvhd4a1srqbv2lfiqrh59yjidx"))))
>      (build-system emacs-build-system)
>      (arguments
> -     `(#:phases
> -       (modify-phases %standard-phases
> -         (add-before 'install 'make-info
> -           (lambda _
> -             (with-directory-excursion "docs"
> -               (invoke "make" "info"))))
> -         (add-after 'install 'install-info
> -           (lambda* (#:key outputs #:allow-other-keys)
> -             (let* ((out  (assoc-ref outputs "out"))
> -                    (info (string-append out "/share/info")))
> -               (install-file "docs/_build/texinfo/agel.info" info)))))))
> +     (list
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (add-after 'unpack 'substitute-ag-path
> +            (lambda _
> +              (make-file-writable "ag.el")
> +              (emacs-substitute-sexps "ag.el"
> +                ("defcustom ag-executable" (which "ag")))))
> +          (add-before 'install 'make-info
> +            (lambda _
> +              (with-directory-excursion "docs"
> +                (invoke "make" "info"))))
> +          (add-after 'install 'install-info
> +            (lambda _
> +              (install-file "docs/_build/texinfo/agel.info"
> +                            (string-append #$output "/share/info")))))))
> +    (inputs (list the-silver-searcher))  ;'ag' executable
>      (native-inputs
>       (list python-sphinx texinfo))
>      (propagated-inputs
> -     (list emacs-dash
> -           emacs-s
> -           the-silver-searcher))        ;'ag' executable
> +     (list emacs-dash emacs-s))
>      (home-page "https://github.com/Wilfred/ag.el")
>      (synopsis "Front-end for ag (the-silver-searcher) for Emacs")
>      (description "This package provides the ability to use the silver
> -- 
> 2.37.3
> 

Can you split this into two patches? The first to not propagate the
silver searcher and the second to switch to gexps? Thanks.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#58213; Package guix-patches. (Sun, 02 Oct 2022 20:44:02 GMT) Full text and rfc822 format available.

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

From: Michael Rohleder <mike <at> rohleder.de>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 58213 <at> debbugs.gnu.org
Subject: Re: [bug#58213] [PATCH] gnu: emacs-ag: Do not propagate
 the-silver-searcher and use gexp.
Date: Sun, 02 Oct 2022 22:42:27 +0200
[Message part 1 (text/plain, inline)]
Hi Efraim!

Thanks for reviewing!

Efraim Flashner <efraim <at> flashner.co.il> writes:
> Can you split this into two patches? The first to not propagate the
> silver searcher and the second to switch to gexps? Thanks.

[0001-gnu-emacs-ag-Use-gexps.patch (text/x-patch, inline)]
From 040aa27ca507032e8c02e02a90dc2e7aaecf4511 Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike <at> rohleder.de>
Date: Sun, 2 Oct 2022 22:01:17 +0200
Subject: [PATCH] gnu: emacs-ag: Use gexps.

* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Use gexps.
{install-info}: Adjust for gexps.
---
 gnu/packages/emacs-xyz.scm | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 93ad1a6fbf..f907838dc8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3026,17 +3026,17 @@ (define-public emacs-ag
         (base32 "1p918y24vcn2pdliaymd210xp9fvhd4a1srqbv2lfiqrh59yjidx"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'make-info
-           (lambda _
-             (with-directory-excursion "docs"
-               (invoke "make" "info"))))
-         (add-after 'install 'install-info
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out  (assoc-ref outputs "out"))
-                    (info (string-append out "/share/info")))
-               (install-file "docs/_build/texinfo/agel.info" info)))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install 'make-info
+            (lambda _
+              (with-directory-excursion "docs"
+                (invoke "make" "info"))))
+          (add-after 'install 'install-info
+            (lambda _
+              (install-file "docs/_build/texinfo/agel.info"
+                            (string-append #$output "/share/info")))))))
     (native-inputs
      (list python-sphinx texinfo))
     (propagated-inputs
-- 
2.37.3

[Message part 3 (text/plain, inline)]
This applies to the first one.  I changed emacs-substitute-sexps to
emacs-substitute-variables.

[0001-gnu-emacs-ag-Do-not-propagate-the-silver-searcher.patch (text/x-patch, inline)]
From f3ace8a1daa1a40c90c08043df42d0af4864e5cb Mon Sep 17 00:00:00 2001
From: Michael Rohleder <mike <at> rohleder.de>
Date: Sun, 2 Oct 2022 22:25:56 +0200
Subject: [PATCH] gnu: emacs-ag: Do not propagate the-silver-searcher.

* gnu/packages/emacs-xyz.scm (emacs-ag)[phases]: Add phase substitute-ag-path
to avoid propagating ag.
[inputs]: Add the-silver-searcher.
[propagated-inputs]: Remove the-silver-searcher.
---
 gnu/packages/emacs-xyz.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f907838dc8..ff2d45500e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -3029,6 +3029,11 @@ (define-public emacs-ag
      (list
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'substitute-ag-path
+            (lambda _
+              (make-file-writable "ag.el")
+              (emacs-substitute-variables "ag.el"
+                ("ag-executable" (which "ag")))))
           (add-before 'install 'make-info
             (lambda _
               (with-directory-excursion "docs"
@@ -3037,12 +3042,11 @@ (define-public emacs-ag
             (lambda _
               (install-file "docs/_build/texinfo/agel.info"
                             (string-append #$output "/share/info")))))))
+    (inputs (list the-silver-searcher))
     (native-inputs
      (list python-sphinx texinfo))
     (propagated-inputs
-     (list emacs-dash
-           emacs-s
-           the-silver-searcher))        ;'ag' executable
+     (list emacs-dash emacs-s))
     (home-page "https://github.com/Wilfred/ag.el")
     (synopsis "Front-end for ag (the-silver-searcher) for Emacs")
     (description "This package provides the ability to use the silver
-- 
2.37.3

[Message part 5 (text/plain, inline)]
-- 
I still maintain the point that designing a monolithic kernel in 1991 is a
fundamental error.  Be thankful you are not my student.  You would not get a
high grade for such a design :-)
(Andrew Tanenbaum to Linus Torvalds)
[signature.asc (application/pgp-signature, inline)]

Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Mon, 03 Oct 2022 07:38:02 GMT) Full text and rfc822 format available.

Notification sent to Michael Rohleder <mike <at> rohleder.de>:
bug acknowledged by developer. (Mon, 03 Oct 2022 07:38:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Michael Rohleder <mike <at> rohleder.de>
Cc: 58213-done <at> debbugs.gnu.org
Subject: Re: [bug#58213] [PATCH] gnu: emacs-ag: Do not propagate
 the-silver-searcher and use gexp.
Date: Mon, 3 Oct 2022 10:37:26 +0300
[Message part 1 (text/plain, inline)]
On Sun, Oct 02, 2022 at 10:42:27PM +0200, Michael Rohleder wrote:
> Hi Efraim!
> 
> Thanks for reviewing!
> 
> Efraim Flashner <efraim <at> flashner.co.il> writes:
> > Can you split this into two patches? The first to not propagate the
> > silver searcher and the second to switch to gexps? Thanks.

Thanks. Patches pushed!

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 31 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 283 days ago.

Previous Next


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