GNU bug report logs - #78149
31.0.50; find-file not working (cl-remove-if)

Previous Next

Package: emacs;

Reported by: German Pacenza <germanp82 <at> hotmail.com>

Date: Tue, 29 Apr 2025 19:27:07 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: German Pacenza <germanp82 <at> hotmail.com>, 78149 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Wed, 30 Apr 2025 09:37:41 -0400
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Wed, 30 Apr 2025 08:11:14 -0300
>> Cc: 78149 <at> debbugs.gnu.org
>> From: German Pacenza <germanp82 <at> hotmail.com>
>> 
>> 
>> > I cannot reproduce this with today's master branch.  cl-remove-if is
>> > an autoloaded function, so I suspect that your loaddefs.el is outdated
>> > or something.  Try regenerating loaddefs.el and then redumping:
>> > 
>> >   $ make -C lisp autoloads-force
>> >   $ make
>> 
>> Same result, I also did a 'git clean -fdx' 'make reset --hard HEAD' 
>> 'make extraclean' and 'make bootstrap'
>> 
>> 
>> emacs -Q:
>> C-x C-f "shows error"
>> run 'bookmark-jump" C-g
>> C-x C-f "Works as expected"
>> 
>> I added (autoload 'cl-remove-if "cl-seq" nil t) to my init file and that 
>> fixes the issue
>
> Ah, I see.
>
> Spencer, please replace cl-remove-if with seq-remove or something else
> that is available when minibuffer.el is preloaded by loadup.  Calling
> cl-seq functions in preloaded files is a no-no, because the
> corresponding autoloads are not in loaddefs.el, they are in
> cl-loaddefs.el instead, and that file is not loaded until cl-lib is.

Ah, I see.  Apologies for the breakage.  Done in the attached patch.

[0001-Replace-cl-remove-if-with-seq-remove-in-minibuffer.e.patch (text/x-patch, inline)]
From edaef1805c9dc9bf6924596df89a37a117d0cfda Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Wed, 30 Apr 2025 09:35:29 -0400
Subject: [PATCH] Replace cl-remove-if with seq-remove in minibuffer.el

* lisp/minibuffer.el (completion--file-name-table): Replace
cl-remove-if with seq-remove. (bug#78149)
---
 lisp/minibuffer.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index bb9966d82dc..7b2b986aa1d 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3603,8 +3603,8 @@ completion--file-name-table
                      ;; expansion, so regexps containing $ won't work.  Drop
                      ;; them; we'll return more completions, but callers need to
                      ;; handle that anyway.
-                     (cl-remove-if (lambda (regexp) (string-search "$" regexp))
-                                   completion-regexp-list)))
+                     (seq-remove (lambda (regexp) (string-search "$" regexp))
+                                 completion-regexp-list)))
                 (complete-with-action action table sifned pred))))
         (cond
          ((null action)                 ; try-completion
-- 
2.39.3


This bug report was last modified 19 days ago.

Previous Next


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