GNU bug report logs - #55433
[PATCH] gnu: emacs-ledger-mode: Update to 4.0.0-0.11e8503.

Previous Next

Package: guix-patches;

Reported by: Kyle Meyer <kyle <at> kyleam.com>

Date: Sun, 15 May 2022 18:42:02 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 55433 in the body.
You can then email your comments to 55433 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#55433; Package guix-patches. (Sun, 15 May 2022 18:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kyle Meyer <kyle <at> kyleam.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 15 May 2022 18:42:02 GMT) Full text and rfc822 format available.

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

From: Kyle Meyer <kyle <at> kyleam.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: emacs-ledger-mode: Update to 4.0.0-0.11e8503.
Date: Sun, 15 May 2022 14:41:14 -0400
With the Emacs 28 update, building emacs-ledger-mode fails with

  complete-test.el:29:1: Error: Wrong number of arguments: (3 . 4), 2

This error is not present the latest commit on upstream's master branch.

* gnu/packages/finance.scm (emacs-ledger-mode): Update to 4.0.0-0.11e8503.
---
 gnu/packages/finance.scm | 96 +++++++++++++++++++++-------------------
 1 file changed, 50 insertions(+), 46 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index b5ab051a1f..ed7202b17e 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2021 François J <francois-oss <at> avalenn.eu>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;; Copyright © 2021 John Kehayias <john.kehayias <at> protonmail.com>
+;;; Copyright © 2022 Kyle Meyer <kyle <at> kyleam.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -395,51 +396,54 @@ (define-public ledger
                     "See src/wcwidth.cc in the distribution.")))))
 
 (define-public emacs-ledger-mode
-  (package
-    (name "emacs-ledger-mode")
-    (version "4.0.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/ledger/ledger-mode")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "1r5rcyxd6d1rqwamzpvqdbkbdf1zbj75aaciqijrklnm59ps244y"))))
-    (build-system emacs-build-system)
-    (arguments
-     `(;; ledger-test.el is needed at runtime (but probably not for a good reason).
-       #:exclude '()
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-path
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((ledger (assoc-ref inputs "ledger")))
-               (make-file-writable "ledger-exec.el")
-               (emacs-substitute-variables "ledger-exec.el"
-                 ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
-             #t))
-         (add-after 'build 'build-doc
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((target (string-append (assoc-ref outputs "out")
-                                          "/share/info")))
-               (mkdir-p target)
-               (invoke "makeinfo" "-o" target
-                       "../source/doc/ledger-mode.texi"))
-             #t))
-         (replace 'check
-           (lambda _
-             (with-directory-excursion "../source/test"
-               (invoke "make" "test-batch")))))))
-    (inputs
-     (list ledger))
-    (native-inputs
-     (list texinfo))
-    (home-page "https://ledger-cli.org/")
-    (synopsis "Command-line double-entry accounting program")
-    (description
-     "Ledger is a powerful, double-entry accounting system that is
+  ;; The last release was on Nov 8, 2019 and doesn't build with Emacs 28.
+  (let ((commit "11e850395448ee7012dba16bd6df103f5552ebfb")
+        (revision "0"))
+    (package
+      (name "emacs-ledger-mode")
+      (version (git-version "4.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ledger/ledger-mode")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0hzky36vrlb7kvpyz4gy3zn01zdlmlx0s58w6ggk5djbcvjc2rfx"))))
+      (build-system emacs-build-system)
+      (arguments
+       `(;; ledger-test.el is needed at runtime (but probably not for a good reason).
+         #:exclude '()
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((ledger (assoc-ref inputs "ledger")))
+                 (make-file-writable "ledger-exec.el")
+                 (emacs-substitute-variables "ledger-exec.el"
+                   ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
+               #t))
+           (add-after 'build 'build-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((target (string-append (assoc-ref outputs "out")
+                                            "/share/info")))
+                 (mkdir-p target)
+                 (invoke "makeinfo" "-o" target
+                         "../source/doc/ledger-mode.texi"))
+               #t))
+           (replace 'check
+             (lambda _
+               (with-directory-excursion "../source/test"
+                 (invoke "make" "test-batch")))))))
+      (inputs
+       (list ledger))
+      (native-inputs
+       (list texinfo))
+      (home-page "https://ledger-cli.org/")
+      (synopsis "Command-line double-entry accounting program")
+      (description
+       "Ledger is a powerful, double-entry accounting system that is
 accessed from the UNIX command-line.  This may put off some users, since
 there is no flashy UI, but for those who want unparalleled reporting
 access to their data there are few alternatives.
@@ -453,7 +457,7 @@ (define-public emacs-ledger-mode
 in ability, and easy to use.
 
 This package provides the Emacs mode.")
-    (license license:gpl2+)))
+      (license license:gpl2+))))
 
 (define-public geierlein
   (package

base-commit: ebb43029506d994bee0c2b890881fd61a0b0c202
-- 
2.36.0





Information forwarded to guix-patches <at> gnu.org:
bug#55433; Package guix-patches. (Mon, 16 May 2022 11:05:01 GMT) Full text and rfc822 format available.

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

From: Aleksandr Vityazev <avityazev <at> posteo.org>
To: 55433 <at> debbugs.gnu.org
Subject: [PATCH] gnu: emacs-ledger-mode: Update to 4.0.0-0-11e85039.
Date: Mon, 16 May 2022 11:04:14 +0000
Hi, I just went ahead and made changes to the arguments.

* gnu/packages/finance.scm (emacs-ledger-mode): Update to 4.0.0-0-11e85039.
[arguments]: Convert to list of G-Expressions. Use ‘search-input-file’ where possible.
Drop trailing ‘#t’s.  While here, respect TESTS? in check phase.

Co-authored-by: Aleksandr Vityazev <avityazev <at> posteo.org>
---
 gnu/packages/finance.scm | 96 +++++++++++++++++++++-------------------
 1 file changed, 50 insertions(+), 46 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index b5ab051a1f..09b979899d 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -26,6 +26,8 @@
 ;;; Copyright © 2021 François J <francois-oss <at> avalenn.eu>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;; Copyright © 2021 John Kehayias <john.kehayias <at> protonmail.com>
+;;; Copyright © 2022 Kyle Meyer <kyle <at> kyleam.com>
+;;; Copyright © 2022 Aleksandr Vityazev <avityazev <at> posteo.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -395,51 +397,53 @@ (define-public ledger
                     "See src/wcwidth.cc in the distribution.")))))
 
 (define-public emacs-ledger-mode
-  (package
-    (name "emacs-ledger-mode")
-    (version "4.0.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/ledger/ledger-mode")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "1r5rcyxd6d1rqwamzpvqdbkbdf1zbj75aaciqijrklnm59ps244y"))))
-    (build-system emacs-build-system)
-    (arguments
-     `(;; ledger-test.el is needed at runtime (but probably not for a good reason).
-       #:exclude '()
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-path
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let ((ledger (assoc-ref inputs "ledger")))
-               (make-file-writable "ledger-exec.el")
-               (emacs-substitute-variables "ledger-exec.el"
-                 ("ledger-binary-path" (string-append ledger "/bin/ledger"))))
-             #t))
-         (add-after 'build 'build-doc
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((target (string-append (assoc-ref outputs "out")
-                                          "/share/info")))
-               (mkdir-p target)
-               (invoke "makeinfo" "-o" target
-                       "../source/doc/ledger-mode.texi"))
-             #t))
-         (replace 'check
-           (lambda _
-             (with-directory-excursion "../source/test"
-               (invoke "make" "test-batch")))))))
-    (inputs
-     (list ledger))
-    (native-inputs
-     (list texinfo))
-    (home-page "https://ledger-cli.org/")
-    (synopsis "Command-line double-entry accounting program")
-    (description
-     "Ledger is a powerful, double-entry accounting system that is
+  ;; The last release was on Nov 8, 2019 and doesn't build with Emacs 28.
+  (let ((commit "11e850395448ee7012dba16bd6df103f5552ebfb")
+        (revision "0"))
+    (package
+      (name "emacs-ledger-mode")
+      (version (git-version "4.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ledger/ledger-mode")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0hzky36vrlb7kvpyz4gy3zn01zdlmlx0s58w6ggk5djbcvjc2rfx"))))
+      (build-system emacs-build-system)
+      (arguments
+       (list
+        ;; ledger-test.el is needed at runtime (but probably not for a good reason).
+        #:exclude #~'()
+        #:tests? #t
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'patch-path
+              (lambda* (#:key inputs #:allow-other-keys)
+                (make-file-writable "ledger-exec.el")
+                (emacs-substitute-variables "ledger-exec.el"
+                  ("ledger-binary-path" (search-input-file inputs "/bin/ledger")))))
+            (add-after 'build 'build-doc
+              (lambda _
+                (let ((target (string-append #$output "/share/info")))
+                  (mkdir-p target)
+                  (invoke "makeinfo" "-o" target
+                          "../source/doc/ledger-mode.texi"))))
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "../source/test"
+                    (invoke "make" "test-batch"))))))))
+      (inputs
+       (list ledger))
+      (native-inputs
+       (list texinfo))
+      (home-page "https://ledger-cli.org/")
+      (synopsis "Command-line double-entry accounting program")
+      (description
+       "Ledger is a powerful, double-entry accounting system that is
 accessed from the UNIX command-line.  This may put off some users, since
 there is no flashy UI, but for those who want unparalleled reporting
 access to their data there are few alternatives.
@@ -453,7 +457,7 @@ (define-public emacs-ledger-mode
 in ability, and easy to use.
 
 This package provides the Emacs mode.")
-    (license license:gpl2+)))
+      (license license:gpl2+))))
 
 (define-public geierlein
   (package
-- 
2.36.0



-- 
Best regards, 
Aleksandr Vityazev




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Wed, 18 May 2022 04:28:02 GMT) Full text and rfc822 format available.

Notification sent to Kyle Meyer <kyle <at> kyleam.com>:
bug acknowledged by developer. (Wed, 18 May 2022 04:28:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Aleksandr Vityazev <avityazev <at> posteo.org>
Cc: 55433-done <at> debbugs.gnu.org
Subject: Re: bug#55433: [PATCH] gnu: emacs-ledger-mode: Update to
 4.0.0-0.11e8503.
Date: Wed, 18 May 2022 00:27:44 -0400
Hello,

Aleksandr Vityazev <avityazev <at> posteo.org> writes:

> Hi, I just went ahead and made changes to the arguments.
>
> * gnu/packages/finance.scm (emacs-ledger-mode): Update to 4.0.0-0-11e85039.
> [arguments]: Convert to list of G-Expressions. Use ‘search-input-file’ where possible.
> Drop trailing ‘#t’s.  While here, respect TESTS? in check phase.
>
> Co-authored-by: Aleksandr Vityazev <avityazev <at> posteo.org>
> ---
>  gnu/packages/finance.scm | 96 +++++++++++++++++++++-------------------
>  1 file changed, 50 insertions(+), 46 deletions(-)
>
> diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
> index b5ab051a1f..09b979899d 100644
> --- a/gnu/packages/finance.scm
> +++ b/gnu/packages/finance.scm
> @@ -26,6 +26,8 @@
>  ;;; Copyright © 2021 François J <francois-oss <at> avalenn.eu>
>  ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
>  ;;; Copyright © 2021 John Kehayias <john.kehayias <at> protonmail.com>
> +;;; Copyright © 2022 Kyle Meyer <kyle <at> kyleam.com>
> +;;; Copyright © 2022 Aleksandr Vityazev <avityazev <at> posteo.org>

Nice collaboration here :-)

Applied as 5a2b9fc2e6fe868e838ae3865e4a2d2c22cda91d.

Thanks,

Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#55433; Package guix-patches. (Wed, 18 May 2022 22:20:01 GMT) Full text and rfc822 format available.

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

From: Kyle Meyer <kyle <at> kyleam.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Aleksandr Vityazev
 <avityazev <at> posteo.org>
Cc: 55433 <at> debbugs.gnu.org
Subject: Re: bug#55433: [PATCH] gnu: emacs-ledger-mode: Update to
 4.0.0-0.11e8503.
Date: Wed, 18 May 2022 18:19:18 -0400
On 05/18/22 00:27:44 -0400, Maxim Cournoyer wrote:
> Hello,
>
> Aleksandr Vityazev <avityazev <at> posteo.org> writes:
>
>> Hi, I just went ahead and made changes to the arguments.
> [...]
> Nice collaboration here :-)
>
> Applied as 5a2b9fc2e6fe868e838ae3865e4a2d2c22cda91d.

Great, thanks for the improvements, Aleksandr. (And thanks for
reviewing, Maxim.)




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

This bug report was last modified 1 year and 307 days ago.

Previous Next


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