Subject: [bug#71592] [PATCH v2 1/4] gnu: emacs-org: Update to 9.7.4.

From: "Suhail Singh" <[email-masked]>
Date: Mon, 17 Jun 2024 08:00:26 -0400

* gnu/packages/emacs-xyz.scm (emacs-org): Update to 9.7.4.

Change-Id: Iec5f62a5d4a8c23f939aef118473b81a2dc9122b
---
 gnu/packages/emacs-xyz.scm | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index da4a2340fe..307950aacd 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17118,7 +17118,7 @@ (define-public emacs-neotree
 (define-public emacs-org
   (package
     (name "emacs-org")
-    (version "9.6.30")
+    (version "9.7.4")
     (source
      (origin
        (method git-fetch)
@@ -17127,7 +17127,7 @@ (define-public emacs-org
              (commit (string-append "release_" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0v4b3yl4limrq3jgf0jvvx73cs7d36p14c2x93pdvn50mjykii3f"))))
+        (base32 "00crs2q4yvmv2jgzmcfyl2g6m7g42zpggyssmcj8anwrsp748z9b"))))
     (build-system emacs-build-system)
     (arguments
      (list
@@ -17156,12 +17156,25 @@ (define-public emacs-org
                 (for-each make-file-writable
                           '("babel.org"
                             "ob-awk-test.org"
-                            "ob-sed-test.org"
-                            "ob-shell-test.org"))
+                            "ob-sed-test.org"))
                 ;; Specify where sh executable is.
                 (let ((sh (search-input-file inputs "/bin/sh")))
                   (substitute* "babel.org"
                     (("/bin/sh") sh))))
+              ;; XXX: Fix failure in ob-tangle/collect-blocks.  The test
+              ;; assumes that ~/../.. corresponds to /.  This isn't true in
+              ;; our case.
+              (substitute* "testing/lisp/test-ob-tangle.el"
+                ((" ~/\\.\\./\\.\\./")
+                 (string-append " ~"
+                                ;; relative path from ${HOME} to / during
+                                ;; build
+                                (string-join
+                                 (map-in-order
+                                  (lambda (x)
+                                    (if (equal? x "") "" ".."))
+                                  (string-split (getcwd) #\/)) "/")
+                                "/")))
               ;; XXX: Skip failing tests.
               (substitute* "testing/lisp/test-ob-shell.el"
                 (("ob-shell/remote-with-stdin-or-cmdline .*" all)
-- 
2.45.2