[PATCH emacs-team 0/7] Fix some more builds

  • Done
  • quality assurance status badge
Details
2 participants
  • Andrew Tropin
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 08:46
(address . guix-patches@gnu.org)
cover.1692427560.git.liliana.prikler@gmail.com
Hi Andrew, hi other Guixers

Since we're planning to make Emacs 29 the new default soon™, we should probably
take care of some packages that fail to build. Here's a batch to do so.

Cheers

Liliana Marie Prikler (7):
gnu: emacs-all-the-icons: Honour #:tests?
gnu: emacs-haskell-mode: Update to 17.4.
gnu: emacs-helpful: Update to 0.21.
guix: emacs-utils: Add ert-number-tests.
gnu: emacs-libgit: Fix build.
gnu: emacs-all-the-icons: Fix build.
gnu: emacs-yasnippet: Fix build.

gnu/local.mk | 4 +
gnu/packages/emacs-xyz.scm | 252 +++++++++---------
...cs-all-the-icons-remove-duplicate-rs.patch | 21 ++
...acs-haskell-mode-no-redefine-builtin.patch | 75 ++++++
.../patches/emacs-helpful-fix-tests.patch | 28 ++
...acs-yasnippet-fix-empty-snippet-next.patch | 59 ++++
.../patches/emacs-yasnippet-fix-tests.patch | 14 +
guix/build/emacs-utils.scm | 14 +
8 files changed, 345 insertions(+), 122 deletions(-)
create mode 100644 gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch
create mode 100644 gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch
create mode 100644 gnu/packages/patches/emacs-helpful-fix-tests.patch
create mode 100644 gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch


base-commit: d58c6e25ff3d1e70fd9b0e07bdad1b335de8a979
prerequisite-patch-id: db4b84876b1a475e9e7846dd33ecd6d33dc14907
--
2.41.0
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 00:22
[PATCH emacs-team 1/7] gnu: emacs-all-the-icons: Honour #:tests?
(address . 65376@debbugs.gnu.org)
ef077b83f9de49c6f162eddb6ccd61f3d78e591f.1692427560.git.liliana.prikler@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-all-the-icons)[#:phases]<check>: Honour
tests.
---
gnu/packages/emacs-xyz.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 9c23c69f79..30f924a3fb 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27793,10 +27793,12 @@ (define-public emacs-all-the-icons
(install-file "octicons.ttf" fonts)
(install-file "weathericons.ttf" fonts)))))
(replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (apply invoke "ert-runner" "-l"
- (append (find-files "data" "\\.el")
- '("all-the-icons-faces.el"))))))))
+ (lambda* (#:key tests? outputs #:allow-other-keys)
+ (if tests?
+ (apply invoke "ert-runner" "-l"
+ (append (find-files "data" "\\.el")
+ '("all-the-icons-faces.el")))
+ (format #t "test suite not run~%")))))))
(native-inputs
(list emacs-f emacs-ert-runner))
(propagated-inputs
--
2.41.0
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 00:52
[PATCH emacs-team 2/7] gnu: emacs-haskell-mode: Update to 17.4.
(address . 65376@debbugs.gnu.org)
5a989fc417de48b64cb2ee6a5228c3af391acc25.1692427560.git.liliana.prikler@gmail.com
* gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/emacs-xyz.scm (emacs-haskell-mode): Update to 17.4.
[source]<patches>: Use it here.
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 182 +++++++++---------
...acs-haskell-mode-no-redefine-builtin.patch | 75 ++++++++
3 files changed, 167 insertions(+), 91 deletions(-)
create mode 100644 gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch

Toggle diff (290 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7af2755a2b..e14a9adc33 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1096,6 +1096,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-git-email-missing-parens.patch \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
%D%/packages/patches/emacs-json-reformat-fix-tests.patch \
+ %D%/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch \
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
%D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \
%D%/packages/patches/emacs-native-comp-driver-options.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 30f924a3fb..1e03625f62 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -2249,99 +2249,99 @@ (define-public emacs-unpackaged-el
(license license:gpl3+))))
(define-public emacs-haskell-mode
- (let ((revision "0")
- (commit "5a9f8072c7b9168f0a8409adf9d62a3e4ad4ea3d"))
- (package
- (name "emacs-haskell-mode")
- (version (git-version "17.2" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/haskell/haskell-mode")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "0np1wrwdq7b9hpqpl9liampacnkx6diphyk8h2sbz2mfn9qr7pxs"))))
- (propagated-inputs
- (list emacs-dash))
- (native-inputs
- (list emacs-minimal emacs-el-search emacs-stream texinfo))
- (build-system gnu-build-system)
- (arguments
- (list
- #:make-flags #~(list
- (string-append "EMACS=" #$emacs-minimal "/bin/emacs"))
- #:modules `((ice-9 match)
- (srfi srfi-26)
- ((guix build emacs-build-system) #:prefix emacs:)
- ,@%gnu-build-system-modules)
- #:imported-modules `(,@%gnu-build-system-modules
- (guix build emacs-build-system)
- (guix build emacs-utils))
- #:phases
- #~(modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'pre-build
- (lambda* (#:key inputs #:allow-other-keys)
- (define (el-dir store-dir)
- (match (find-files store-dir "\\.el$")
- ((f1 f2 ...) (dirname f1))
- (_ "")))
+ (package
+ (name "emacs-haskell-mode")
+ (version "17.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/haskell/haskell-mode")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "03j94fgw1bljbjqmikbn9mnrfifxf7g9zrb727zmnnrjwyi0wd4n"))
+ (patches
+ (search-patches "emacs-haskell-mode-no-redefine-builtin.patch"))))
+ (propagated-inputs
+ (list emacs-dash))
+ (native-inputs
+ (list emacs-minimal emacs-el-search emacs-stream texinfo))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list
+ (string-append "EMACS=" #$emacs-minimal "/bin/emacs"))
+ #:modules `((ice-9 match)
+ (srfi srfi-26)
+ ((guix build emacs-build-system) #:prefix emacs:)
+ ,@%gnu-build-system-modules)
+ #:imported-modules `(,@%gnu-build-system-modules
+ (guix build emacs-build-system)
+ (guix build emacs-utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'pre-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (el-dir store-dir)
+ (match (find-files store-dir "\\.el$")
+ ((f1 f2 ...) (dirname f1))
+ (_ "")))
- (let ((sh (search-input-file inputs "/bin/sh")))
- (define emacs-prefix? (cut string-prefix? "emacs-" <>))
-
- (setenv "SHELL" "sh")
- (setenv "EMACSLOADPATH"
- (string-concatenate
- (map (match-lambda
- (((? emacs-prefix? name) . dir)
- (string-append (el-dir dir) ":"))
- (_ ""))
- inputs)))
- (substitute* (find-files "." "\\.el") (("/bin/sh") sh)))))
- (add-before 'check 'delete-failing-tests
- ;; XXX: these tests require GHC executable, which would be a big
- ;; native input.
- (lambda _
- (with-directory-excursion "tests"
- ;; File `haskell-indent-tests.el' fails with
- ;; `haskell-indent-put-region-in-literate-2'
- ;; on Emacs 27.1+
- ;; XXX: https://github.com/haskell/haskell-mode/issues/1714
- (for-each delete-file
- '("haskell-indent-tests.el"
- "haskell-customize-tests.el"
- "inferior-haskell-tests.el"))
-
- ;; requires many external tools (e.g. git, hasktags)
- (substitute* "haskell-mode-tests.el"
- (("\\(ert-deftest haskell-generate-tags.*" all)
- (string-append all " (skip-unless nil)"))))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (el-dir (emacs:elpa-directory out))
- (doc (string-append
- out "/share/doc/haskell-mode-" #$version))
- (info (string-append out "/share/info")))
- (define (copy-to-dir dir files)
- (for-each (lambda (f)
- (install-file f dir))
- files))
-
- (with-directory-excursion "doc"
- (invoke "makeinfo" "haskell-mode.texi")
- (install-file "haskell-mode.info" info))
- (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
- (copy-to-dir el-dir (find-files "." "\\.elc?"))))))))
- (home-page "https://github.com/haskell/haskell-mode")
- (synopsis "Haskell mode for Emacs")
- (description
- "This is an Emacs mode for editing, debugging and developing Haskell
+ (let ((sh (search-input-file inputs "/bin/sh")))
+ (define emacs-prefix? (cut string-prefix? "emacs-" <>))
+
+ (setenv "SHELL" "sh")
+ (setenv "EMACSLOADPATH"
+ (string-concatenate
+ (map (match-lambda
+ (((? emacs-prefix? name) . dir)
+ (string-append (el-dir dir) ":"))
+ (_ ""))
+ inputs)))
+ (substitute* (find-files "." "\\.el") (("/bin/sh") sh)))))
+ (add-before 'check 'delete-failing-tests
+ ;; XXX: these tests require GHC executable, which would be a big
+ ;; native input.
+ (lambda _
+ (with-directory-excursion "tests"
+ ;; File `haskell-indent-tests.el' fails with
+ ;; `haskell-indent-put-region-in-literate-2'
+ ;; on Emacs 27.1+
+ ;; XXX: https://github.com/haskell/haskell-mode/issues/1714
+ (for-each delete-file
+ '("haskell-indent-tests.el"
+ "haskell-customize-tests.el"
+ "inferior-haskell-tests.el"))
+
+ ;; requires many external tools (e.g. git, hasktags)
+ (substitute* "haskell-mode-tests.el"
+ (("\\(ert-deftest haskell-generate-tags.*" all)
+ (string-append all " (skip-unless nil)"))))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (el-dir (emacs:elpa-directory out))
+ (doc (string-append
+ out "/share/doc/haskell-mode-" #$version))
+ (info (string-append out "/share/info")))
+ (define (copy-to-dir dir files)
+ (for-each (lambda (f)
+ (install-file f dir))
+ files))
+
+ (with-directory-excursion "doc"
+ (invoke "makeinfo" "haskell-mode.texi")
+ (install-file "haskell-mode.info" info))
+ (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md"))
+ (copy-to-dir el-dir (find-files "." "\\.elc?"))))))))
+ (home-page "https://github.com/haskell/haskell-mode")
+ (synopsis "Haskell mode for Emacs")
+ (description
+ "This is an Emacs mode for editing, debugging and developing Haskell
programs.")
- (license license:gpl3+))))
+ (license license:gpl3+)))
(define-public emacs-dante
(package
diff --git a/gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch b/gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch
new file mode 100644
index 0000000000..65ace2ee5e
--- /dev/null
+++ b/gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch
@@ -0,0 +1,75 @@
+From faa95a784d2c74c72e70367a5d531df6dd61aeab Mon Sep 17 00:00:00 2001
+From: Steve Purcell <steve@sanityinc.com>
+Date: Sun, 6 Aug 2023 16:41:48 +0200
+Subject: [PATCH] Don't redefine built-in function
+
+Fixes #1817
+---
+ tests/haskell-indent-tests.el | 14 ++++++++------
+ tests/haskell-indentation-tests.el | 14 ++++++++------
+ 2 files changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/tests/haskell-indent-tests.el b/tests/haskell-indent-tests.el
+index 7196405b8..9a3de4ad3 100644
+--- a/tests/haskell-indent-tests.el
++++ b/tests/haskell-indent-tests.el
+@@ -40,11 +40,13 @@
+ ;; (haskell-indent-put-region-in-literate (point-min) (point-max) -1)
+ ;; (buffer-substring-no-properties (point-min) (point-max))))))
+
+-(defsubst string-trim-left (string)
+- "Remove leading whitespace from STRING."
+- (if (string-match "\\`[ \t\n\r]+" string)
+- (replace-match "" t t string)
+- string))
++(if (fboundp 'string-trim-left)
++ (defalias 'haskell--string-trim-left 'string-trim-left)
++ (defun haskell--string-trim-left (string &optional regexp)
++ "Remove leading whitespace from STRING."
++ (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string)
++ (substring string (match-end 0))
++ string)))
+
+ (defun haskell-indent-format-info (info)
+ (if (cdr info)
+@@ -128,7 +130,7 @@ macro quotes them for you."
+ :expected-result
+ ,(if allow-failure :failed :passed)
+ (haskell-indent-check
+- ,(string-trim-left source)
++ ,(haskell--string-trim-left source)
+ ,@(mapcar (lambda (x)
+ (list 'quote x))
+ test-cases))))))
+diff --git a/tests/haskell-indentation-tests.el b/tests/haskell-indentation-tests.el
+index 4889b76a7..cd783a4f4 100644
+--- a/tests/haskell-indentation-tests.el
++++ b/tests/haskell-indentation-tests.el
+@@ -33,11 +33,13 @@
+
+ ;;; Code:
+
+-(defsubst string-trim-left (string)
+- "Remove leading whitespace from STRING."
+- (if (string-match "\\`[ \t\n\r]+" string)
+- (replace-match "" t t string)
+- string))
++(if (fboundp 'string-trim-left)
++ (defalias 'haskell--string-trim-left 'string-trim-left)
++ (defun haskell--string-trim-left (string &optional regexp)
++ "Remove leading whitespace from STRING."
++ (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string)
++ (substring string (match-end 0))
++ string)))
+
+ (defun haskell-indentation-check (source &rest test-cases)
+ "Check if `haskell-indentation-find-indentations' returns expected results.
+@@ -115,7 +117,7 @@ macro quotes them for you."
+ :expected-result
+ ,(if allow-failure :failed :passed)
+ (haskell-indentation-check
+- ,(string-trim-left source)
++ ,(haskell--string-trim-left source)
+ ,@(mapcar (lambda (x)
+ (list 'quote x))
+ test-cases))))))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 01:05
[PATCH emacs-team 3/7] gnu: emacs-helpful: Update to 0.21.
(address . 65376@debbugs.gnu.org)
1fcf9c0d7de956e7029090bdcc5b921932e95082.1692427560.git.liliana.prikler@gmail.com
* gnu/packages/patches/emacs-helpful-fix-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/emacs-xyz.scm (emacs-helpful): Update to 0.21.
[source]<patches>: Use it here.
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 51 +++++++++----------
.../patches/emacs-helpful-fix-tests.patch | 28 ++++++++++
3 files changed, 54 insertions(+), 26 deletions(-)
create mode 100644 gnu/packages/patches/emacs-helpful-fix-tests.patch

Toggle diff (117 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index e14a9adc33..3b087a6d5e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1097,6 +1097,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
%D%/packages/patches/emacs-json-reformat-fix-tests.patch \
%D%/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch \
+ %D%/packages/patches/emacs-helpful-fix-tests.patch \
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
%D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \
%D%/packages/patches/emacs-native-comp-driver-options.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 1e03625f62..dbc176e379 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -24363,31 +24363,30 @@ (define-public emacs-download-region
(license license:gpl3+))))
(define-public emacs-helpful
- (let ((commit "1c98f6f06a85def5d34c735f8cd407f20cebddf9")
- (revision "1"))
- (package
- (name "emacs-helpful")
- (version (git-version "0.19" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/Wilfred/helpful")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32 "18b5hjfji51zxjrxhkklxx3j9svk295awmxv8n95mp8ilas2kd3l"))))
- (build-system emacs-build-system)
- (propagated-inputs
- (list emacs-dash emacs-elisp-refs emacs-f emacs-s))
- (native-inputs
- (list emacs-ert-runner emacs-undercover))
- (arguments
- `(#:tests? #t
- #:test-command '("ert-runner")))
- (home-page "https://github.com/Wilfred/helpful")
- (synopsis "More contextual information in Emacs help")
- (description "@code{helpful} is an alternative to the built-in Emacs help
+ (package
+ (name "emacs-helpful")
+ (version "0.21")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Wilfred/helpful")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "03afgdbs5nmhw833svrqky7fmfs1zlvqzcj7j5g29sakivs60xqc"))
+ (patches (search-patches "emacs-helpful-fix-tests.patch"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ (list emacs-dash emacs-elisp-refs emacs-f emacs-s))
+ (native-inputs
+ (list emacs-ert-runner emacs-undercover))
+ (arguments
+ `(#:tests? #t
+ #:test-command '("ert-runner")))
+ (home-page "https://github.com/Wilfred/helpful")
+ (synopsis "More contextual information in Emacs help")
+ (description "@code{helpful} is an alternative to the built-in Emacs help
that provides much more contextual information.
@itemize
@@ -24406,7 +24405,7 @@ (define-public emacs-helpful
@item Trace, disassemble functions from inside Helpful. This is discoverable
and doesn't require memorisation of commands.
@end itemize\n")
- (license license:gpl3+))))
+ (license license:gpl3+)))
(define-public emacs-logview
(package
diff --git a/gnu/packages/patches/emacs-helpful-fix-tests.patch b/gnu/packages/patches/emacs-helpful-fix-tests.patch
new file mode 100644
index 0000000000..61ed0671a4
--- /dev/null
+++ b/gnu/packages/patches/emacs-helpful-fix-tests.patch
@@ -0,0 +1,28 @@
+From 233e254bbe44f70ca899a506b3706af489228fda Mon Sep 17 00:00:00 2001
+From: aagon <aymeric.agon@hotmail.fr>
+Date: Thu, 10 Aug 2023 20:03:52 +0200
+Subject: [PATCH] Repair helpful--display-implementations test for emacs 29.1
+
+---
+ test/helpful-unit-test.el | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el
+index 0f5177b..0716b0d 100644
+--- a/test/helpful-unit-test.el
++++ b/test/helpful-unit-test.el
+@@ -1089,8 +1089,12 @@ find the source code."
+ (require 'xref)
+ (helpful-function 'xref-location-marker)
+ (should (s-contains-p "Implementations" (buffer-string)))
+- (should (s-contains-p "((l xref-file-location))" (buffer-string)))
+- (should (s-contains-p "((l xref-buffer-location))" (buffer-string))))
++ (should (if (version< emacs-version "29.1")
++ (s-contains-p "((l xref-file-location))" (buffer-string))
++ (s-contains-p "(xref-location-marker (L xref-file-location))" (buffer-string))))
++ (should (if (version< emacs-version "29.1")
++ (s-contains-p "((l xref-buffer-location))" (buffer-string))
++ (s-contains-p "(xref-location-marker (L xref-buffer-location))" (buffer-string)))))
+
+ (defun helpful--boring-advice (orig-fn &rest args)
+ (apply orig-fn args))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 01:37
[PATCH emacs-team 4/7] guix: emacs-utils: Add ert-number-tests.
(address . 65376@debbugs.gnu.org)
50b2db40ea03d8b3c78b3a774e057ebab0f98790.1692427560.git.liliana.prikler@gmail.com
* guix/build/utils.scm (ert-number-tests): New variable.
---
guix/build/emacs-utils.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (34 lines)
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index 850b1f5f2a..ac3dac57d1 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -40,6 +40,7 @@ (define-module (guix build emacs-utils)
emacs-byte-compile-directory
emacs-compile-directory
emacs-header-parse
+ ert-number-tests
as-display
emacs-substitute-sexps
@@ -183,6 +184,19 @@ (define-syntax replacement-helper
(insert " ")
(insert ,(format #f "~s" replacement))))))
+(define (ert-number-tests file test-name)
+ "Add a numerically increasing suffix to tests of the same name.
+This fixes test errors of the pattern \"Test TEST_NAME redefined\"."
+ (emacs-batch-edit-file file
+ `(let ((i 0))
+ (while (re-search-forward ,(string-append "ert-deftest " test-name)
+ nil t)
+ (goto-char (match-beginning 0))
+ (kill-region (match-beginning 0) (match-end 0))
+ (insert (format "ert-deftest %s-%d" ,test-name i))
+ (setq i (+ i 1)))
+ (basic-save-buffer))))
+
(define-syntax emacs-substitute-sexps
(syntax-rules ()
"Substitute the S-expression immediately following the first occurrence of
--
2.41.0
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 01:37
[PATCH emacs-team 5/7] gnu: emacs-libgit: Fix build.
(address . 65376@debbugs.gnu.org)
51bbc440f432523b68a0ef40176d3ab8c27de81c.1692427560.git.liliana.prikler@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-libgit)[#:phases]: Add ‘ert-number-tests’.
---
gnu/packages/emacs-xyz.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index dbc176e379..9aaac5142f 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1407,6 +1407,10 @@ (define-public emacs-libgit
(substitute* "test/submodule-test.el"
(("\\(ert-deftest (status|ids) .*" all)
(string-append all " (skip-unless nil)")))))
+ (add-after 'unpack 'ert-number-tests
+ (lambda _
+ (ert-number-tests "test/repository-test.el"
+ "repository-head-for-worktree")))
(add-before 'install 'prepare-for-install
(lambda _
(let ((s "../source"))
--
2.41.0
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 01:55
[PATCH emacs-team 6/7] gnu: emacs-all-the-icons: Fix build.
(address . 65376@debbugs.gnu.org)
f9b3bcac9ad64bdf43b2cdd8fd9ed74dec137590.1692427560.git.liliana.prikler@gmail.com
* gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/emacs-xyz.scm (emacs-all-the-icons)[source]<patches>: Use it here.
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 2 ++
...cs-all-the-icons-remove-duplicate-rs.patch | 21 +++++++++++++++++++
3 files changed, 24 insertions(+)
create mode 100644 gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch

Toggle diff (54 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3b087a6d5e..fb58b4eac8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1090,6 +1090,7 @@ dist_patch_DATA = \
%D%/packages/patches/elm-offline-package-registry.patch \
%D%/packages/patches/elm-reactor-static-files.patch \
%D%/packages/patches/elogind-revert-polkit-detection.patch \
+ %D%/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch \
%D%/packages/patches/emacs-deferred-fix-number-of-arguments.patch \
%D%/packages/patches/emacs-exec-path.patch \
%D%/packages/patches/emacs-ess-fix-obsolete-function-alias.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 9aaac5142f..89ce0fa900 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27776,6 +27776,8 @@ (define-public emacs-all-the-icons
(url "https://github.com/domtronn/all-the-icons.el")
(commit version)))
(file-name (git-file-name name version))
+ (patches
+ (search-patches "emacs-all-the-icons-remove-duplicate-rs.patch"))
(sha256
(base32 "0lwgvgnqf7vihglm0c5bwsxbl4x7f641289cji5s7jwy2dbsqk7g"))))
(build-system emacs-build-system)
diff --git a/gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch b/gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch
new file mode 100644
index 0000000000..2c6b14e0aa
--- /dev/null
+++ b/gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch
@@ -0,0 +1,21 @@
+From 24b8d5b63e347bd4cdcf79bf897fc0097fa20fc7 Mon Sep 17 00:00:00 2001
+From: Michael Wernthaler <michael.wernthaler@posteo.de>
+Date: Thu, 22 Jul 2021 11:27:31 +0200
+Subject: [PATCH] Fixed icon for .rs-files
+
+---
+ all-the-icons.el | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/all-the-icons.el b/all-the-icons.el
+index e1f4cb7695..3399906cfb 100644
+--- a/all-the-icons.el
++++ b/all-the-icons.el
+@@ -194,7 +194,6 @@
+ ("r" all-the-icons-fileicon "R" :face all-the-icons-lblue)
+ ("rd" all-the-icons-fileicon "R" :face all-the-icons-lblue)
+ ("rdx" all-the-icons-fileicon "R" :face all-the-icons-lblue)
+- ("rs" all-the-icons-fileicon "R" :face all-the-icons-lblue)
+ ("rsx" all-the-icons-fileicon "R" :face all-the-icons-lblue)
+ ;; There seems to be a a bug with this font icon which does not
+ ;; let you propertise it without it reverting to being a lower
--
2.41.0
L
L
Liliana Marie Prikler wrote on 19 Aug 2023 08:40
[PATCH emacs-team 7/7] gnu: emacs-yasnippet: Fix build.
(address . 65376@debbugs.gnu.org)
ca7e310f7ac32354b2e693e9a0f783320952a8fc.1692427560.git.liliana.prikler@gmail.com
* gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/emacs-xyz.scm (emacs-yasnippet)[source]<patches>: Use it here.
* gnu/packages/patches/emacs-yasnippet-fix-tests.patch: Also fix
delete-numberless-inner-snippet-issue-562.
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 3 +-
...acs-yasnippet-fix-empty-snippet-next.patch | 59 +++++++++++++++++++
.../patches/emacs-yasnippet-fix-tests.patch | 14 +++++
4 files changed, 76 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch

Toggle diff (125 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index fb58b4eac8..bdaa9935b1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1107,6 +1107,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-telega-path-placeholder.patch \
%D%/packages/patches/emacs-telega-test-env.patch \
%D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \
+ %D%/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch \
%D%/packages/patches/emacs-yasnippet-fix-tests.patch \
%D%/packages/patches/emacs-kv-fix-tests.patch \
%D%/packages/patches/emacs-pgtk-super-key-fix.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 89ce0fa900..811728d170 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17117,7 +17117,8 @@ (define-public emacs-yasnippet
(sha256
(base32 "0via9dzw8m5lzymg1h78xkwjssh39zr3g6ccyamlf1rjzjsyxknv"))
(patches
- (search-patches "emacs-yasnippet-fix-tests.patch"))))
+ (search-patches "emacs-yasnippet-fix-empty-snippet-next.patch"
+ "emacs-yasnippet-fix-tests.patch"))))
(build-system emacs-build-system)
(arguments
`(#:tests? #t
diff --git a/gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch b/gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch
new file mode 100644
index 0000000000..1faea2b456
--- /dev/null
+++ b/gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch
@@ -0,0 +1,59 @@
+From 925292484162bc35c4258e72c36462bb13a5c69a Mon Sep 17 00:00:00 2001
+From: Liliana Marie Prikler <liliana.prikler@gmail.com>
+Date: Sat, 19 Aug 2023 08:38:17 +0200
+Subject: [PATCH] Guard against empty snippet in yas-next-field.
+
+---
+ yasnippet.el | 29 +++++++++++++++--------------
+ 1 file changed, 15 insertions(+), 14 deletions(-)
+
+diff --git a/yasnippet.el b/yasnippet.el
+index e0b5537..41d86dd 100644
+--- a/yasnippet.el
++++ b/yasnippet.el
+@@ -136,6 +136,7 @@
+ (declare-function cl-progv-after "cl-extra") ; Needed for 23.4.
+ (require 'easymenu)
+ (require 'help-mode)
++(require 'subr-x)
+
+ (defvar yas--editing-template)
+ (defvar yas--guessed-modes)
+@@ -3386,20 +3387,20 @@ Otherwise delegate to `yas-next-field'."
+ If there's none, exit the snippet."
+ (interactive)
+ (unless arg (setq arg 1))
+- (let* ((active-field (overlay-get yas--active-field-overlay 'yas--field))
+- (snippet (car (yas-active-snippets (yas--field-start active-field)
+- (yas--field-end active-field))))
+- (target-field (yas--find-next-field arg snippet active-field)))
+- (yas--letenv (yas--snippet-expand-env snippet)
+- ;; Apply transform to active field.
+- (when active-field
+- (let ((yas-moving-away-p t))
+- (when (yas--field-update-display active-field)
+- (yas--update-mirrors snippet))))
+- ;; Now actually move...
+- (if target-field
+- (yas--move-to-field snippet target-field)
+- (yas-exit-snippet snippet)))))
++ (and-let* ((active-field (overlay-get yas--active-field-overlay 'yas--field))
++ (snippet (car (yas-active-snippets (yas--field-start active-field)
++ (yas--field-end active-field)))))
++ (let ((target-field (yas--find-next-field arg snippet active-field)))
++ (yas--letenv (yas--snippet-expand-env snippet)
++ ;; Apply transform to active field.
++ (when active-field
++ (let ((yas-moving-away-p t))
++ (when (yas--field-update-display active-field)
++ (yas--update-mirrors snippet))))
++ ;; Now actually move...
++ (if target-field
++ (yas--move-to-field snippet target-field)
++ (yas-exit-snippet snippet))))))
+
+ (defun yas--place-overlays (snippet field)
+ "Correctly place overlays for SNIPPET's FIELD."
+--
+2.41.0
+
diff --git a/gnu/packages/patches/emacs-yasnippet-fix-tests.patch b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch
index c70cc75d92..5995b0afa4 100644
--- a/gnu/packages/patches/emacs-yasnippet-fix-tests.patch
+++ b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch
@@ -10,6 +10,11 @@ Content-Transfer-Encoding: 8bit
- A test that was temporarily broken passes again.
- The default for ‘org-adapt-indentation’ has changed.
- buffer-list may be called with arguments when native-comp is enabled.
+
+2023-08-19 Liliana Marie Prikler <liliana.prikler@gmail.com>
+
+ * delete-numberless-inner-snippet-issue-562: Correct value in
+ looking-at.
---
yasnippet-tests.el | 45 ++++++++++++++++++++++++++++-----------------
1 file changed, 28 insertions(+), 17 deletions(-)
@@ -26,6 +31,15 @@ index f7ca2bb..7618ab7 100644
;; Author: João Távora <joaot@siscog.pt>
;; Keywords: emulations, convenience
+@@ -289,7 +289,7 @@ attention to case differences."
+ (should (looking-at "testblable"))
+ (ert-simulate-command '(yas-next-field-or-maybe-expand))
+ (ert-simulate-command '(yas-skip-and-clear-field))
+- (should (looking-at "ble"))
++ (should (looking-at "blable"))
+ (should (null (yas-active-snippets)))))
+
+ (ert-deftest delete-nested-simple-field-issue-824 ()
@@ -556,16 +556,19 @@ XXXXX ------------------------"))))
(yas-mock-insert "foo bar")
(ert-simulate-command '(yas-next-field))
--
2.41.0
A
A
Andrew Tropin wrote on 20 Aug 2023 18:53
Re: [bug#65376] [PATCH emacs-team 0/7] Fix some more builds
(address . liliana.prikler@gmail.com)
87edjxirj4.fsf@trop.in
On 2023-08-19 08:46, Liliana Marie Prikler wrote:

Toggle quote (34 lines)
> Hi Andrew, hi other Guixers
>
> Since we're planning to make Emacs 29 the new default soon™, we should probably
> take care of some packages that fail to build. Here's a batch to do so.
>
> Cheers
>
> Liliana Marie Prikler (7):
> gnu: emacs-all-the-icons: Honour #:tests?
> gnu: emacs-haskell-mode: Update to 17.4.
> gnu: emacs-helpful: Update to 0.21.
> guix: emacs-utils: Add ert-number-tests.
> gnu: emacs-libgit: Fix build.
> gnu: emacs-all-the-icons: Fix build.
> gnu: emacs-yasnippet: Fix build.
>
> gnu/local.mk | 4 +
> gnu/packages/emacs-xyz.scm | 252 +++++++++---------
> ...cs-all-the-icons-remove-duplicate-rs.patch | 21 ++
> ...acs-haskell-mode-no-redefine-builtin.patch | 75 ++++++
> .../patches/emacs-helpful-fix-tests.patch | 28 ++
> ...acs-yasnippet-fix-empty-snippet-next.patch | 59 ++++
> .../patches/emacs-yasnippet-fix-tests.patch | 14 +
> guix/build/emacs-utils.scm | 14 +
> 8 files changed, 345 insertions(+), 122 deletions(-)
> create mode 100644 gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch
> create mode 100644 gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch
> create mode 100644 gnu/packages/patches/emacs-helpful-fix-tests.patch
> create mode 100644 gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch
>
>
> base-commit: d58c6e25ff3d1e70fd9b0e07bdad1b335de8a979
> prerequisite-patch-id: db4b84876b1a475e9e7846dd33ecd6d33dc14907

Hi Liliana, went throught the patches, my eye didn't catch any obvious
issues, so I think we can merge them. Thank you very much for taking
care of those packages! :)

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmTiRR8ACgkQIgjSCVjB
3rAEuQ/9GYOVufXct0ofvt43eN4GSvj3u9Xcw3NUyyG2lVxyJpGN72yKbFRSyPdd
sTTGSPwoN/L7Iy2NZ7vILt1rNvXemFTCFgbq/dK5opIGgsCk51lJYDLGrDpFweZr
WcUDrOyMMlzparw0Pq0tF3W9mC4uu4CM+TI49qzqV6sAe3julQQS3hf4+TPJndzk
aeCZ4vcsc2s7OiF++fZuVBr3pZrWabEUlr949HQrWJwB8eSO3fsmyydVLzhkUyli
6QjMrjcd3+i3rDVqDiV4bhqIw5GVCv22tuluse80WIaBUoHBqTZUb5LEUYnHKXdi
fvitGcyZeGM4R+sW4D7ulBKcpFdjpkuyekViczvnFYz5YgLh6nbr7UGeCID50rho
JjxIRsSvM6qzCX0WRiJY5qMVZgIqEQ3EiROtiq5riP1FEXvxTUr8ZGpshhPwkEIM
HzneFJO+ZdvjyeeHVyJepGOuFaKo3LxBKGdqaI+WR5a4/xEW9wAOOJnwwNKFA9fY
zAgZEO8/yRJ7dnDCMaPItRL7uAa5DSyaCj70Jk8DF1yOGsS+e+D6yX7AG+VAtCnS
2JNSLChq81xI5sh26bpgAz3xHDVJ+v5MnaXfcYDid2zMpRIpbdrHYHsxmg5H0ctO
l32v1L9zlIEVxJcrFHd/DV7kvTHxLeqZEkEsZfZuENVb/DzlTe8=
=ld19
-----END PGP SIGNATURE-----

L
L
Liliana Marie Prikler wrote on 7 Sep 2023 20:22
cee91fa75244575394923ac5e12cedc83d2e4e63.camel@gmail.com
Am Sonntag, dem 20.08.2023 um 20:53 +0400 schrieb Andrew Tropin:
Toggle quote (46 lines)
> On 2023-08-19 08:46, Liliana Marie Prikler wrote:
>
> > Hi Andrew, hi other Guixers
> >
> > Since we're planning to make Emacs 29 the new default soon™, we
> > should probably
> > take care of some packages that fail to build.  Here's a batch to
> > do so.
> >
> > Cheers
> >
> > Liliana Marie Prikler (7):
> >   gnu: emacs-all-the-icons: Honour #:tests?
> >   gnu: emacs-haskell-mode: Update to 17.4.
> >   gnu: emacs-helpful: Update to 0.21.
> >   guix: emacs-utils: Add ert-number-tests.
> >   gnu: emacs-libgit: Fix build.
> >   gnu: emacs-all-the-icons: Fix build.
> >   gnu: emacs-yasnippet: Fix build.
> >
> >  gnu/local.mk                                  |   4 +
> >  gnu/packages/emacs-xyz.scm                    | 252 +++++++++-----
> > ----
> >  ...cs-all-the-icons-remove-duplicate-rs.patch |  21 ++
> >  ...acs-haskell-mode-no-redefine-builtin.patch |  75 ++++++
> >  .../patches/emacs-helpful-fix-tests.patch     |  28 ++
> >  ...acs-yasnippet-fix-empty-snippet-next.patch |  59 ++++
> >  .../patches/emacs-yasnippet-fix-tests.patch   |  14 +
> >  guix/build/emacs-utils.scm                    |  14 +
> >  8 files changed, 345 insertions(+), 122 deletions(-)
> >  create mode 100644 gnu/packages/patches/emacs-all-the-icons-
> > remove-duplicate-rs.patch
> >  create mode 100644 gnu/packages/patches/emacs-haskell-mode-no-
> > redefine-builtin.patch
> >  create mode 100644 gnu/packages/patches/emacs-helpful-fix-
> > tests.patch
> >  create mode 100644 gnu/packages/patches/emacs-yasnippet-fix-empty-
> > snippet-next.patch
> >
> >
> > base-commit: d58c6e25ff3d1e70fd9b0e07bdad1b335de8a979
> > prerequisite-patch-id: db4b84876b1a475e9e7846dd33ecd6d33dc14907
>
> Hi Liliana, went throught the patches, my eye didn't catch any
> obvious issues, so I think we can merge them.  Thank you very much
> for taking care of those packages! :)
Merged them, forgot to mark as done.

Sorry for the delay, cheers!
Closed
?