GNU bug report logs -
#80180
31.0.50; ibuffer error: void-function cl-loop
Previous Next
To reply to this bug, email your comments to 80180 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80180; Package
emacs.
(Sun, 11 Jan 2026 06:45:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Phil Sainty <psainty <at> orcon.net.nz>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Sun, 11 Jan 2026 06:45:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
- emacs -Q
- M-x ibuffer
- Lisp error: (void-function cl-loop)
I believe commit 35576fde5670dffe104a6b2a76837a1f0a4c16ce (Bug#75495)
introduces this.
I'm not sure whether it's better to eliminate the cl-loop usage from
the function, or to require cl-lib at run-time for ibuffer.el, or to
enhance `define-ibuffer-column' to compile these function values.
The function with the unexpanded `cl-loop' is the :summarizer function
for the `size' column, defined with the `define-ibuffer-column' macro
from ibuf-macs.el. That macro does this:
,(if summarizer
;; Store the name of the summarizing function.
`(put (quote ,sym) 'ibuffer-column-summarizer
(quote ,summarizer))) ;; <--- not byte-compiled
So while ibuffer.el requires cl-lib at compile time, that quote for
(quote ,summarizer) prevents the summarizer function from being
compiled during macro-expansion, and so its `cl-loop' call remains.
The full definition in ibuffer.el is:
(define-ibuffer-column size
(:inline t
:header-mouse-map ibuffer-size-header-map
:summarizer
(lambda (strings)
(let ((total
(cl-loop
for s in strings
for i = (text-property-not-all 0 (length s) 'ibuffer-size
nil s)
if i sum (get-text-property i 'ibuffer-size s))))
(if ibuffer-human-readable-size
(file-size-human-readable total)
(number-to-string total)))))
(let ((size (buffer-size)))
(propertize (if ibuffer-human-readable-size
(file-size-human-readable size)
(number-to-string size))
'ibuffer-size size)))
The full error backtrace is:
Debugger entered--Lisp error: (void-function cl-loop)
(cl-loop for s in strings for i = (text-property-not-all 0 (length s)
'ibuffer-size nil s) if i sum (get-text-property i 'ibuffer-size s))
(let ((total (cl-loop for s in strings for i = (text-property-not-all
0 (length s) 'ibuffer-size nil s) if i sum (get-text-property i
'ibuffer-size s)))) (if ibuffer-human-readable-size
(file-size-human-readable total) (number-to-string total)))
(lambda (strings) (let ((total (cl-loop for s in strings for i =
(text-property-not-all 0 (length s) 'ibuffer-size nil s) if i sum
(get-text-property i 'ibuffer-size s)))) (if ibuffer-human-readable-size
(file-size-human-readable total) (number-to-string total))))((#("
238" 6 9 (ibuffer-size 238)) #(" 147" 6 9 (ibuffer-size 147))))
ibuffer--format-summary((ibuffer-make-column-size 9 -1 :right nil))
mapcar(ibuffer--format-summary ((ibuffer-make-column-mark 0 -1 :left
nil) (ibuffer-make-column-modified 0 -1 :left nil)
(ibuffer-make-column-read-only 0 -1 :left nil)
(ibuffer-make-column-locked 0 -1 :left nil) " "
(ibuffer-make-column-name 18 18 :left :elide) " "
(ibuffer-make-column-size 9 -1 :right nil) " " (ibuffer-make-column-mode
16 16 :left :elide) " " (ibuffer-make-column-filename-and-process 0 -1
:left nil)))
ibuffer-update-title-and-summary(((ibuffer-make-column-mark 0 -1
:left nil) (ibuffer-make-column-modified 0 -1 :left nil)
(ibuffer-make-column-read-only 0 -1 :left nil)
(ibuffer-make-column-locked 0 -1 :left nil) " "
(ibuffer-make-column-name 18 18 :left :elide) " "
(ibuffer-make-column-size 9 -1 :right nil) " " (ibuffer-make-column-mode
16 16 :left :elide) " " (ibuffer-make-column-filename-and-process 0 -1
:left nil)))
ibuffer-redisplay-engine(((#<buffer *scratch*> . 32) (#<buffer
*Messages*> . 32)) nil)
ibuffer-update(nil)
ibuffer(nil)
funcall-interactively(ibuffer nil)
call-interactively(ibuffer record nil)
command-execute(ibuffer record)
execute-extended-command(nil "ibuffer" nil)
funcall-interactively(execute-extended-command nil "ibuffer" nil)
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
In GNU Emacs 31.0.50 (build 14, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw scroll bars) of 2026-01-11 built on phil-lp
Repository revision: 0e4a8ae1faaa399c422f0bc6c073f72fd0014eb6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version
11.0.12101004
System Description: Ubuntu 22.04.5 LTS
Configured using:
'configure --prefix=/home/phil/emacs/trunk/usr/local
--without-native-compilation --with-x-toolkit=lucid --without-sound
'--program-transform-name=s/^ctags$/ctags_emacs/''
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
XINERAMA XPM XRANDR LUCID ZLIB
Important settings:
value of $LC_MONETARY: en_NZ.UTF-8
value of $LC_NUMERIC: en_NZ.UTF-8
value of $LC_TIME: en_NZ.UTF-8
value of $LANG: en_GB.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Text
Minor modes in effect:
windmove-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-nonselected-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr 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 mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader sendmail mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils cursor-sensor smerge-mode diff
whitespace cl-seq log-view log-edit ring add-log pcvs-util windmove
iso8601 vc-annotate vc time-date subr-x cl-extra shortdoc
text-property-search comp-common rx ibuf-macs misearch multi-isearch
vc-git diff-mode track-changes easy-mmode files-x vc-dispatcher
bug-reference thingatpt help-fns radix-tree byte-opt gv bytecomp
byte-compile cl-print debug backtrace help-mode find-func cl-loaddefs
cl-lib cus-start cus-load ibuffer ibuffer-loaddefs rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch-screen 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 lcms2 dynamic-setting system-font-setting
font-render-setting cairo x-toolkit x multi-tty move-toolbar
make-network-process tty-child-frames emacs)
Memory information:
((conses 16 115859 9508) (symbols 48 10212 0) (strings 32 27861 2271)
(string-bytes 1 714393) (vectors 16 16622)
(vector-slots 8 176996 9102) (floats 8 123 667)
(intervals 56 4360 18) (buffers 1064 22))
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80180; Package
emacs.
(Sun, 11 Jan 2026 08:19:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 80180 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 11 Jan 2026 19:44:15 +1300
> From: Phil Sainty <psainty <at> orcon.net.nz>
>
> - emacs -Q
> - M-x ibuffer
> - Lisp error: (void-function cl-loop)
>
> I believe commit 35576fde5670dffe104a6b2a76837a1f0a4c16ce (Bug#75495)
> introduces this.
I cannot reproduce this on any of the systems to which I have acces,
but maybe some configuration does need to (require 'cl-lib) in
ibuffer.el, not only inside eval-when-compile. Daniel, could you
please take a look?
> I'm not sure whether it's better to eliminate the cl-loop usage from
> the function, or to require cl-lib at run-time for ibuffer.el, or to
> enhance `define-ibuffer-column' to compile these function values.
If we can get rid of cl-loop there, it would be my personal
preference. But I'm aware that many people like it, and I cannot
fight it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80180; Package
emacs.
(Sun, 11 Jan 2026 12:52:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 80180 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Sun, 11 Jan 2026 19:44:15 +1300
>> From: Phil Sainty <psainty <at> orcon.net.nz>
>>
>> - emacs -Q
>> - M-x ibuffer
>> - Lisp error: (void-function cl-loop)
>>
>> I believe commit 35576fde5670dffe104a6b2a76837a1f0a4c16ce (Bug#75495)
>> introduces this.
>
> I cannot reproduce this on any of the systems to which I have acces,
> but maybe some configuration does need to (require 'cl-lib) in
> ibuffer.el, not only inside eval-when-compile. Daniel, could you
> please take a look?
Thank you for pinging me. The problem is that `define-ibuffer-column'
produces a quoted lambda, which is not byte-compiled and not expanded.
The macro expansion contains the following code:
(put 'ibuffer-make-column-size 'ibuffer-column-summarizer
'(lambda (strings) ;; Note the quoted lambda!
(let
((total
(cl-loop for s in strings for i =
(text-property-not-all 0 (length s) 'ibuffer-size nil s)
if i sum (get-text-property i 'ibuffer-size s))))
(if ibuffer-human-readable-size (file-size-human-readable total)
(number-to-string total)))))
I attached a patch to fix this problem. With the modification,
`define-ibuffer-column' ensures that the lambda is compiled, which is
both more robust, since the compiler checks the code, and more
efficient.
[0001-define-ibuffer-column-Ensure-that-summarizer-lambdas.patch (text/x-diff, inline)]
From e8ef43e71f729386a9b0d7659f590648a1f7c9e6 Mon Sep 17 00:00:00 2001
From: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sun, 11 Jan 2026 13:15:25 +0100
Subject: [PATCH] define-ibuffer-column: Ensure that summarizer lambdas are
compiled
* lisp/ibuf-macs.el (define-ibuffer-column): Only quote summarizer if it
is a symbol, such that lambdas are not quoted and compiled.
---
lisp/ibuf-macs.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el
index 835a8b9aa15..6ffb19b100b 100644
--- a/lisp/ibuf-macs.el
+++ b/lisp/ibuf-macs.el
@@ -120,7 +120,7 @@ define-ibuffer-column
,(if summarizer
;; Store the name of the summarizing function.
`(put (quote ,sym) 'ibuffer-column-summarizer
- (quote ,summarizer)))
+ ,(if (symbolp summarizer) `(quote ,summarizer) summarizer)))
,(if summarizer
;; This will store the actual values of the column
;; summary.
--
2.47.3
[Message part 3 (text/plain, inline)]
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80180; Package
emacs.
(Sun, 11 Jan 2026 13:38:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 80180 <at> debbugs.gnu.org (full text, mbox):
Hi Daniel,
On 2026-01-12 01:51, Daniel Mendler wrote:
> I attached a patch to fix this problem. With the modification,
> `define-ibuffer-column' ensures that the lambda is compiled, which is
> both more robust, since the compiler checks the code, and more
> efficient.
Sadly that patch seems to break the "make lisp" process for me,
due to issues generating autoloads. I get the following:
ELC ibuffer.elc
ELC ibuf-macs.elc
ELC loaddefs.elc
In toplevel form:
loaddefs.el:17415:14: Warning: reference to free variable
‘define-ibuffer-column’
loaddefs.el:17415:50: Warning: reference to free variable ‘name’
loaddefs.el:17415:55: Warning: reference to free variable ‘inline’
loaddefs.el:17415:62: Warning: reference to free variable ‘props’
loaddefs.el:17415:68: Warning: reference to free variable ‘summarizer’
loaddefs.el:17415:79: Warning: reference to free variable
‘header-mouse-map’
loaddefs.el:17415:97: Warning: reference to free variable ‘&rest’
loaddefs.el:17415:103: Warning: reference to free variable ‘body’
loaddefs.el:17438:71: Warning: Stray ‘declare’ form: (declare (indent
defun))
loaddefs.el:17438:150: Warning: reference to free variable ‘symbol’
In end of data:
loaddefs.el:17415:45: Warning: the function ‘&key’ is not known to be
defined.
loaddefs.el:17415:37: Warning: the function ‘symbol’ is not known to be
defined.
loaddefs.el:17415:2: Warning: the function ‘cl-defmacro’ might not be
defined at runtime.
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80180; Package
emacs.
(Sun, 11 Jan 2026 13:44:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 80180 <at> debbugs.gnu.org (full text, mbox):
Phil Sainty <psainty <at> orcon.net.nz> writes:
> Hi Daniel,
>
> On 2026-01-12 01:51, Daniel Mendler wrote:
>> I attached a patch to fix this problem. With the modification,
>> `define-ibuffer-column' ensures that the lambda is compiled, which is
>> both more robust, since the compiler checks the code, and more
>> efficient.
>
> Sadly that patch seems to break the "make lisp" process for me,
> due to issues generating autoloads. I get the following:
Did you run a bootstrap? I recompiled Emacs with the patch from scratch
without problems. The macro expands correctly now.
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80180; Package
emacs.
(Sun, 11 Jan 2026 13:52:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 80180 <at> debbugs.gnu.org (full text, mbox):
On 2026-01-12 02:43, Daniel Mendler wrote:
> Phil Sainty <psainty <at> orcon.net.nz> writes:
>> Sadly that patch seems to break the "make lisp" process for me,
>> due to issues generating autoloads. I get the following:
>
> Did you run a bootstrap? I recompiled Emacs with the patch from
> scratch without problems. The macro expands correctly now.
Good to know, thanks. I didn't "make bootstrap" so it sounds
like that's the reason. I'm heading offline now, but I'll test
again tomorrow.
cheers,
-Phil
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.