guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 3f8460838ff70a694ff7f0c76b298136981104b9
Author: Cayetano Santos <[email protected]>
AuthorDate: Tue Sep 22 14:16:07 2026 +0200

    gnu: emacs-ivy: Fix for emacs 31.
    
    * gnu/packages/patches/emacs-ivy-avoid-nil-predicate.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it here.
    * gnu/packages/emacs-xyz.scm (emacs-ivy)[patches]: Use it here.
    
    Merges guix/guix!11418
---
 gnu/local.mk                                       |  1 +
 gnu/packages/emacs-xyz.scm                         |  6 ++---
 .../patches/emacs-ivy-avoid-nil-predicate.patch    | 31 ++++++++++++++++++++++
 3 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 8c6bb0041d1..f22bdd1927c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1687,6 +1687,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/isl-0.11.1-aarch64-support.patch                \
   %D%/packages/patches/ispell-for-linphone-cmake.patch         \
   %D%/packages/patches/jami-avutil-link.patch                  \
+  %D%/packages/patches/emacs-ivy-avoid-nil-predicate.patch      \
   %D%/packages/patches/jami-libjami-cmake.patch                        \
   %D%/packages/patches/jamvm-1.5.1-aarch64-support.patch       \
   %D%/packages/patches/jamvm-1.5.1-armv7-support.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index b3c047ea607..722609003a2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17754,10 +17754,10 @@ hydras with one column per group of heads.")))
        (method url-fetch)
        (uri (string-append "https://elpa.gnu.org/packages/ivy-"; version 
".tar"))
        (sha256
-        (base32 "12ni3n8h7316hv4nrx4kbjah58n8zdxkf1v8fi0w39da1aqn3r0p"))))
+        (base32 "12ni3n8h7316hv4nrx4kbjah58n8zdxkf1v8fi0w39da1aqn3r0p"))
+       (patches
+        (search-patches "emacs-ivy-avoid-nil-predicate.patch"))))
     (build-system emacs-build-system)
-    (propagated-inputs
-     (list))
     (home-page "https://github.com/abo-abo/swiper";)
     (synopsis "Incremental vertical completion for Emacs")
     (description
diff --git a/gnu/packages/patches/emacs-ivy-avoid-nil-predicate.patch 
b/gnu/packages/patches/emacs-ivy-avoid-nil-predicate.patch
new file mode 100644
index 00000000000..eeb12953e6c
--- /dev/null
+++ b/gnu/packages/patches/emacs-ivy-avoid-nil-predicate.patch
@@ -0,0 +1,31 @@
+From 631df3f68c79cca2a26bc8ea1a98a332ef53751e Mon Sep 17 00:00:00 2001
+Message-ID: 
<631df3f68c79cca2a26bc8ea1a98a332ef53751e.1790072851.git.csant...@disroot.org>
+From: "Basil L. Contovounesios" <[email protected]>
+Date: Mon, 9 Mar 2026 22:02:11 +0100
+Subject: [PATCH] Avoid nil predicate with cl-remove-if-not
+
+Emacs 31 no longer silently accepts a nil predicate.
+
+* ivy.el (ivy--reset-state): Skip alist filtering in the absence of
+a predicate.
+---
+ ivy.el | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/ivy.el b/ivy.el
+index a6aca7a..9d5f805 100644
+--- a/ivy.el
++++ b/ivy.el
+@@ -2497,7 +2497,8 @@ This is useful for recursive `ivy-read'."
+                             ivy--all-candidates
+                           (ivy--dynamic-collection-cands (or initial-input 
"")))))
+             ((consp (car-safe collection))
+-             (setq collection (cl-remove-if-not predicate collection))
++             (when predicate
++               (setq collection (cl-remove-if-not predicate collection)))
+              (when (and sort (setq sort-fn (ivy--sort-function caller)))
+                (setq collection (sort (copy-sequence collection) sort-fn))
+                (setq sort nil))
+--
+2.54.0
+

Reply via email to