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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 78149 in the body.
You can then email your comments to 78149 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 bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Tue, 29 Apr 2025 19:27:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to German Pacenza <germanp82 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 29 Apr 2025 19:27:08 GMT) Full text and rfc822 format available.

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

From: German Pacenza <germanp82 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; find-file not working (cl-remove-if)
Date: Tue, 29 Apr 2025 16:21:04 -0300
*****

find-file command fails to run with:
'completion--file-name-table: Symbol's function definition is void:
cl-remove-if'

I bisected to this commit: 509cbe1c35b3dd005a53ac041f9c87ee53b8e115



In GNU Emacs 31.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2025-04-29 built on KRONOS
Repository revision: 483762ef2f71b86c7da98082db14e87f58d009d7
Repository branch: master
System Description: Manjaro Linux

Configured using:
 'configure 'CFLAGS=-O2 -mtune=native -march=native -s' --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  savehist-mode: t
  vertico-mode: t
  electric-pair-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/german/.emacs.d/elpa/ef-themes-1.9.0/theme-loaddefs hides 
/home/german/.emacs.d/elpa/standard-themes-2.2.0/theme-loaddefs
/home/german/.emacs.d/elpa/transient-20250423.1314/transient hides 
/home/german/repos/emacs/lisp/transient
/home/german/.emacs.d/elpa/ef-themes-1.9.0/theme-loaddefs hides 
/home/german/repos/emacs/lisp/theme-loaddefs

Features:
(shadow sort mail-extr comp-run bytecomp byte-compile comp-common rx
emacsbug lisp-mnt message mailcap yank-media puny dired dired-loaddefs
rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config
gnus-util text-property-search time-date subr-x mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
vertico-sort savehist vertico compat init elec-pair info
ace-window-autoloads cape-autoloads casual-suite-autoloads
casual-avy-autoloads avy-autoloads casual-symbol-overlay-autoloads
casual-autoloads catppuccin-theme-autoloads debbugs-autoloads
doom-themes-autoloads easy-kill-autoloads eat-autoloads
ef-themes-autoloads elfeed-autoloads embark-consult-autoloads
consult-autoloads embark-autoloads fish-mode-autoloads gptel-autoloads
hyprlang-ts-mode-autoloads i3wm-config-mode-autoloads kkp-autoloads
lua-mode-autoloads magit-autoloads magit-section-autoloads
llama-autoloads markdown-mode-autoloads mini-ontop-autoloads
ninja-mode-autoloads nov-autoloads esxml-autoloads odin-mode-autoloads
orderless-autoloads org-modern-autoloads pdf-tools-autoloads
qml-ts-mode-autoloads rainbow-mode-autoloads rg-themes-autoloads
selected-window-accent-mode-autoloads show-font-autoloads
sinister-autoloads spacious-padding-autoloads speedrect-autoloads
standard-themes-autoloads status-autoloads symbol-overlay-autoloads
tablist-autoloads transient-autoloads unspecified-theme-autoloads
most-faces-autoloads vertico-autoloads visible-mark-autoloads
visual-fill-column-autoloads with-editor-autoloads
xah-fly-keys-autoloads yeetube-autoloads yuck-mode-autoloads
zig-mode-autoloads early-init g3r-dark-theme rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win touch-screen
pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty move-toolbar
make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 77435 124955) (symbols 48 7954 16)
 (strings 32 21344 11702) (string-bytes 1 766974) (vectors 16 11252)
 (vector-slots 8 154701 75695) (floats 8 49 45) (intervals 56 333 13)
 (buffers 992 10))

-- 
German Pacenza




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 05:39:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: German Pacenza <germanp82 <at> hotmail.com>
Cc: 78149 <at> debbugs.gnu.org
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Wed, 30 Apr 2025 08:38:24 +0300
> Date: Tue, 29 Apr 2025 16:21:04 -0300
> From: German Pacenza <germanp82 <at> hotmail.com>
> 
> *****
> 
> find-file command fails to run with:
> 'completion--file-name-table: Symbol's function definition is void:
> cl-remove-if'
> 
> I bisected to this commit: 509cbe1c35b3dd005a53ac041f9c87ee53b8e115

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

If this still doesn't work, please show the complete and detailed
recipe for reproducing the problem, starting from "emacs -Q".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 11:12:02 GMT) Full text and rfc822 format available.

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

From: German Pacenza <germanp82 <at> hotmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78149 <at> debbugs.gnu.org
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Wed, 30 Apr 2025 08:11:14 -0300
> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 12:12:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: German Pacenza <germanp82 <at> hotmail.com>,
 Spencer Baugh <sbaugh <at> janestreet.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 78149 <at> debbugs.gnu.org
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Wed, 30 Apr 2025 15:10:22 +0300
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 13:38:02 GMT) Full text and rfc822 format available.

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


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 13:48:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: germanp82 <at> hotmail.com, 78149 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Wed, 30 Apr 2025 16:47:20 +0300
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: German Pacenza <germanp82 <at> hotmail.com>,  Stefan Monnier
>   <monnier <at> iro.umontreal.ca>,  78149 <at> debbugs.gnu.org
> Date: Wed, 30 Apr 2025 09:37:41 -0400
> 
> > 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.

Thanks.  But AFAIU, cl-remove-if is non-destructive, whereas
seq-remove is destructive.  Does that matter in this case?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 13:52:01 GMT) Full text and rfc822 format available.

Message #23 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: germanp82 <at> hotmail.com, 78149 <at> debbugs.gnu.org, 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:51:45 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Spencer Baugh <sbaugh <at> janestreet.com>
>> Cc: German Pacenza <germanp82 <at> hotmail.com>,  Stefan Monnier
>>   <monnier <at> iro.umontreal.ca>,  78149 <at> debbugs.gnu.org
>> Date: Wed, 30 Apr 2025 09:37:41 -0400
>> 
>> > 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.
>
> Thanks.  But AFAIU, cl-remove-if is non-destructive, whereas
> seq-remove is destructive.  Does that matter in this case?

I think seq-remove is also non-destructive:

(let ((l (list 1 2))) (seq-remove #'numberp l) l)
; => '(1 2)

Looking at the implementation, it works by doing delq on the result of a
cl-map over the list.  cl-map makes a copy, so the delq is only
destructive on that copy.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 15:20:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: germanp82 <at> hotmail.com, 78149 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Wed, 30 Apr 2025 18:19:30 +0300
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: German Pacenza <germanp82 <at> hotmail.com>,  Stefan Monnier
>   <monnier <at> iro.umontreal.ca>,  78149 <at> debbugs.gnu.org
> Date: Wed, 30 Apr 2025 09:37:41 -0400
> 
> > 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.

German, does this fix your problem?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78149; Package emacs. (Wed, 30 Apr 2025 15:54:02 GMT) Full text and rfc822 format available.

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

From: German Pacenza <germanp82 <at> hotmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 78149 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Wed, 30 Apr 2025 12:53:27 -0300
On 4/30/25 12:19, Eli Zaretskii wrote:
>> From: Spencer Baugh <sbaugh <at> janestreet.com>
>> Cc: German Pacenza <germanp82 <at> hotmail.com>,  Stefan Monnier
>>    <monnier <at> iro.umontreal.ca>,  78149 <at> debbugs.gnu.org
>> Date: Wed, 30 Apr 2025 09:37:41 -0400
>>
>>> 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.
> 
> German, does this fix your problem?

Yes, it works now.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 01 May 2025 16:46:02 GMT) Full text and rfc822 format available.

Notification sent to German Pacenza <germanp82 <at> hotmail.com>:
bug acknowledged by developer. (Thu, 01 May 2025 16:46:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: German Pacenza <germanp82 <at> hotmail.com>
Cc: sbaugh <at> janestreet.com, 78149-done <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#78149: 31.0.50; find-file not working (cl-remove-if)
Date: Thu, 01 May 2025 19:45:49 +0300
> Date: Wed, 30 Apr 2025 12:53:27 -0300
> Cc: monnier <at> iro.umontreal.ca, 78149 <at> debbugs.gnu.org
> From: German Pacenza <germanp82 <at> hotmail.com>
> 
> On 4/30/25 12:19, Eli Zaretskii wrote:
> >> From: Spencer Baugh <sbaugh <at> janestreet.com>
> >> Cc: German Pacenza <germanp82 <at> hotmail.com>,  Stefan Monnier
> >>    <monnier <at> iro.umontreal.ca>,  78149 <at> debbugs.gnu.org
> >> Date: Wed, 30 Apr 2025 09:37:41 -0400
> >>
> >>> 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.
> > 
> > German, does this fix your problem?
> 
> Yes, it works now.

Thanks, installed on the master branch, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 30 May 2025 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 18 days ago.

Previous Next


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