Package: emacs;
Reported by: Bohong Huang <bohonghuang <at> qq.com>
Date: Sun, 16 Mar 2025 12:10:03 UTC
Severity: normal
Found in version 30.1
To reply to this bug, email your comments to 77048 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Sun, 16 Mar 2025 12:10:03 GMT) Full text and rfc822 format available.Bohong Huang <bohonghuang <at> qq.com>
:bug-gnu-emacs <at> gnu.org
.
(Sun, 16 Mar 2025 12:10:03 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Bohong Huang <bohonghuang <at> qq.com> To: bug-gnu-emacs <at> gnu.org Subject: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Sun, 16 Mar 2025 15:21:06 +0800
Hello Emacs maintainers, When using `cl-load-time-value` from `cl-lib`, I encountered an issue where the macro fails during both byte-compilation and runtime: `reference to free variable ‘--cl-load-time--0’` I find this macro is quite useful for performing compile-time computations within a function body without polluting global variable names and relying on `cl-macrolet`. Thank you for taking the time to look into this. Best regards, Bohong Huang --- In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.48, cairo version 1.18.2) System Description: Manjaro Linux Configured using: 'configure --with-pgtk --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --disable-build-details --with-cairo --with-harfbuzz --with-libsystemd --with-modules --with-native-compilation=aot --with-tree-sitter 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' 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 $LC_MONETARY: zh_CN.UTF-8 value of $LC_NUMERIC: zh_CN.UTF-8 value of $LC_TIME: zh_CN.UTF-8 value of $LANG: zh_CN.UTF-8 value of $XMODIFIERS: @im=fcitx locale-coding-system: utf-8-unix Major mode: Markdown Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t server-mode: t corfu-popupinfo-mode: t gptel-mode: t org-roam-db-autosync-mode: t org-media-note-mode: t org-edna-mode: t recentf-mode: t savehist-mode: t nerd-icons-completion-mode: t marginalia-mode: t tempel-tab-mode: t show-smartparens-mode: t smartparens-mode: t repeat-mode: t which-key-mode: t sis-global-context-mode: t sis-context-mode: t sis-global-respect-mode: t sis-global-cursor-color-mode: t sis-auto-refresh-mode: t isearch-mb-mode: t global-treesit-auto-mode: t pixel-scroll-precision-mode: t popper-echo-mode: t popper-mode: t cnfonts-mode: t vertico-mouse-mode: t vertico-mode: t mode-line-bell-mode: t doom-modeline-mode: t winner-mode: t minibuffer-depth-indicate-mode: t override-global-mode: t url-handler-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t column-number-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/coco24/.emacs.d/elpa/vertico-directory-20221123.14415/vertico-directory hides /home/coco24/.emacs.d/elpa/vertico-20250311.1655/vertico-directory /home/coco24/.emacs.d/elpa/cmake-mode-20250304.1338/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /home/coco24/.emacs.d/elpa/which-key-20240620.2145/which-key hides /usr/share/emacs/30.1/lisp/which-key /home/coco24/.emacs.d/elpa/transient-20250312.1453/transient hides /usr/share/emacs/30.1/lisp/transient /home/coco24/.emacs.d/elpa/jsonrpc-1.0.25.0.20250225.2515/jsonrpc hides /usr/share/emacs/30.1/lisp/jsonrpc /home/coco24/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /usr/share/emacs/30.1/lisp/bind-key /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package hides /usr/share/emacs/30.1/lisp/use-package/use-package /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /usr/share/emacs/30.1/lisp/use-package/use-package-lint /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /usr/share/emacs/30.1/lisp/use-package/use-package-jump /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /usr/share/emacs/30.1/lisp/use-package/use-package-ensure /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /usr/share/emacs/30.1/lisp/use-package/use-package-diminish /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /usr/share/emacs/30.1/lisp/use-package/use-package-delight /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /usr/share/emacs/30.1/lisp/use-package/use-package-core /home/coco24/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /usr/share/emacs/30.1/lisp/use-package/use-package-bind-key /home/coco24/.emacs.d/elpa/peg-1.0.1.0.20221221.81502/peg hides /usr/share/emacs/30.1/lisp/progmodes/peg /home/coco24/.emacs.d/elpa/eglot-1.18/eglot hides /usr/share/emacs/30.1/lisp/progmodes/eglot /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox hides /usr/share/emacs/30.1/lisp/org/ox /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-texinfo hides /usr/share/emacs/30.1/lisp/org/ox-texinfo /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-publish hides /usr/share/emacs/30.1/lisp/org/ox-publish /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-org hides /usr/share/emacs/30.1/lisp/org/ox-org /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-odt hides /usr/share/emacs/30.1/lisp/org/ox-odt /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-md hides /usr/share/emacs/30.1/lisp/org/ox-md /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-man hides /usr/share/emacs/30.1/lisp/org/ox-man /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-latex hides /usr/share/emacs/30.1/lisp/org/ox-latex /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-koma-letter hides /usr/share/emacs/30.1/lisp/org/ox-koma-letter /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-icalendar hides /usr/share/emacs/30.1/lisp/org/ox-icalendar /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-html hides /usr/share/emacs/30.1/lisp/org/ox-html /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-beamer hides /usr/share/emacs/30.1/lisp/org/ox-beamer /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ox-ascii hides /usr/share/emacs/30.1/lisp/org/ox-ascii /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org hides /usr/share/emacs/30.1/lisp/org/org /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-version hides /usr/share/emacs/30.1/lisp/org/org-version /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-timer hides /usr/share/emacs/30.1/lisp/org/org-timer /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-tempo hides /usr/share/emacs/30.1/lisp/org/org-tempo /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-table hides /usr/share/emacs/30.1/lisp/org/org-table /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-src hides /usr/share/emacs/30.1/lisp/org/org-src /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-refile hides /usr/share/emacs/30.1/lisp/org/org-refile /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-protocol hides /usr/share/emacs/30.1/lisp/org/org-protocol /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-plot hides /usr/share/emacs/30.1/lisp/org/org-plot /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-persist hides /usr/share/emacs/30.1/lisp/org/org-persist /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-pcomplete hides /usr/share/emacs/30.1/lisp/org/org-pcomplete /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-num hides /usr/share/emacs/30.1/lisp/org/org-num /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-mouse hides /usr/share/emacs/30.1/lisp/org/org-mouse /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-mobile hides /usr/share/emacs/30.1/lisp/org/org-mobile /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-macs hides /usr/share/emacs/30.1/lisp/org/org-macs /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-macro hides /usr/share/emacs/30.1/lisp/org/org-macro /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-loaddefs hides /usr/share/emacs/30.1/lisp/org/org-loaddefs /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-list hides /usr/share/emacs/30.1/lisp/org/org-list /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-lint hides /usr/share/emacs/30.1/lisp/org/org-lint /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-keys hides /usr/share/emacs/30.1/lisp/org/org-keys /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-inlinetask hides /usr/share/emacs/30.1/lisp/org/org-inlinetask /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-indent hides /usr/share/emacs/30.1/lisp/org/org-indent /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-id hides /usr/share/emacs/30.1/lisp/org/org-id /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-habit hides /usr/share/emacs/30.1/lisp/org/org-habit /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-goto hides /usr/share/emacs/30.1/lisp/org/org-goto /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-footnote hides /usr/share/emacs/30.1/lisp/org/org-footnote /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-fold hides /usr/share/emacs/30.1/lisp/org/org-fold /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-fold-core hides /usr/share/emacs/30.1/lisp/org/org-fold-core /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-feed hides /usr/share/emacs/30.1/lisp/org/org-feed /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-faces hides /usr/share/emacs/30.1/lisp/org/org-faces /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-entities hides /usr/share/emacs/30.1/lisp/org/org-entities /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-element hides /usr/share/emacs/30.1/lisp/org/org-element /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-element-ast hides /usr/share/emacs/30.1/lisp/org/org-element-ast /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-duration hides /usr/share/emacs/30.1/lisp/org/org-duration /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-datetree hides /usr/share/emacs/30.1/lisp/org/org-datetree /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-cycle hides /usr/share/emacs/30.1/lisp/org/org-cycle /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-ctags hides /usr/share/emacs/30.1/lisp/org/org-ctags /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-crypt hides /usr/share/emacs/30.1/lisp/org/org-crypt /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-compat hides /usr/share/emacs/30.1/lisp/org/org-compat /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-colview hides /usr/share/emacs/30.1/lisp/org/org-colview /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-clock hides /usr/share/emacs/30.1/lisp/org/org-clock /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-capture hides /usr/share/emacs/30.1/lisp/org/org-capture /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-attach hides /usr/share/emacs/30.1/lisp/org/org-attach /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-attach-git hides /usr/share/emacs/30.1/lisp/org/org-attach-git /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-archive hides /usr/share/emacs/30.1/lisp/org/org-archive /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/org-agenda hides /usr/share/emacs/30.1/lisp/org/org-agenda /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol hides /usr/share/emacs/30.1/lisp/org/ol /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-w3m hides /usr/share/emacs/30.1/lisp/org/ol-w3m /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-rmail hides /usr/share/emacs/30.1/lisp/org/ol-rmail /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-mhe hides /usr/share/emacs/30.1/lisp/org/ol-mhe /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-man hides /usr/share/emacs/30.1/lisp/org/ol-man /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-irc hides /usr/share/emacs/30.1/lisp/org/ol-irc /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-info hides /usr/share/emacs/30.1/lisp/org/ol-info /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-gnus hides /usr/share/emacs/30.1/lisp/org/ol-gnus /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-eww hides /usr/share/emacs/30.1/lisp/org/ol-eww /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-eshell hides /usr/share/emacs/30.1/lisp/org/ol-eshell /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-doi hides /usr/share/emacs/30.1/lisp/org/ol-doi /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-docview hides /usr/share/emacs/30.1/lisp/org/ol-docview /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-bibtex hides /usr/share/emacs/30.1/lisp/org/ol-bibtex /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ol-bbdb hides /usr/share/emacs/30.1/lisp/org/ol-bbdb /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/oc hides /usr/share/emacs/30.1/lisp/org/oc /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/oc-natbib hides /usr/share/emacs/30.1/lisp/org/oc-natbib /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/oc-csl hides /usr/share/emacs/30.1/lisp/org/oc-csl /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/oc-bibtex hides /usr/share/emacs/30.1/lisp/org/oc-bibtex /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/oc-biblatex hides /usr/share/emacs/30.1/lisp/org/oc-biblatex /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/oc-basic hides /usr/share/emacs/30.1/lisp/org/oc-basic /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob hides /usr/share/emacs/30.1/lisp/org/ob /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-tangle hides /usr/share/emacs/30.1/lisp/org/ob-tangle /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-table hides /usr/share/emacs/30.1/lisp/org/ob-table /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-sqlite hides /usr/share/emacs/30.1/lisp/org/ob-sqlite /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-sql hides /usr/share/emacs/30.1/lisp/org/ob-sql /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-shell hides /usr/share/emacs/30.1/lisp/org/ob-shell /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-sed hides /usr/share/emacs/30.1/lisp/org/ob-sed /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-screen hides /usr/share/emacs/30.1/lisp/org/ob-screen /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-scheme hides /usr/share/emacs/30.1/lisp/org/ob-scheme /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-sass hides /usr/share/emacs/30.1/lisp/org/ob-sass /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-ruby hides /usr/share/emacs/30.1/lisp/org/ob-ruby /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-ref hides /usr/share/emacs/30.1/lisp/org/ob-ref /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-python hides /usr/share/emacs/30.1/lisp/org/ob-python /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-processing hides /usr/share/emacs/30.1/lisp/org/ob-processing /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-plantuml hides /usr/share/emacs/30.1/lisp/org/ob-plantuml /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-perl hides /usr/share/emacs/30.1/lisp/org/ob-perl /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-org hides /usr/share/emacs/30.1/lisp/org/ob-org /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-octave hides /usr/share/emacs/30.1/lisp/org/ob-octave /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-ocaml hides /usr/share/emacs/30.1/lisp/org/ob-ocaml /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-maxima hides /usr/share/emacs/30.1/lisp/org/ob-maxima /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-matlab hides /usr/share/emacs/30.1/lisp/org/ob-matlab /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-makefile hides /usr/share/emacs/30.1/lisp/org/ob-makefile /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-lua hides /usr/share/emacs/30.1/lisp/org/ob-lua /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-lob hides /usr/share/emacs/30.1/lisp/org/ob-lob /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-lisp hides /usr/share/emacs/30.1/lisp/org/ob-lisp /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-lilypond hides /usr/share/emacs/30.1/lisp/org/ob-lilypond /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-latex hides /usr/share/emacs/30.1/lisp/org/ob-latex /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-julia hides /usr/share/emacs/30.1/lisp/org/ob-julia /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-js hides /usr/share/emacs/30.1/lisp/org/ob-js /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-java hides /usr/share/emacs/30.1/lisp/org/ob-java /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-haskell hides /usr/share/emacs/30.1/lisp/org/ob-haskell /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-groovy hides /usr/share/emacs/30.1/lisp/org/ob-groovy /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-gnuplot hides /usr/share/emacs/30.1/lisp/org/ob-gnuplot /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-fortran hides /usr/share/emacs/30.1/lisp/org/ob-fortran /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-forth hides /usr/share/emacs/30.1/lisp/org/ob-forth /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-exp hides /usr/share/emacs/30.1/lisp/org/ob-exp /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-eval hides /usr/share/emacs/30.1/lisp/org/ob-eval /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-eshell hides /usr/share/emacs/30.1/lisp/org/ob-eshell /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-emacs-lisp hides /usr/share/emacs/30.1/lisp/org/ob-emacs-lisp /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-dot hides /usr/share/emacs/30.1/lisp/org/ob-dot /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-ditaa hides /usr/share/emacs/30.1/lisp/org/ob-ditaa /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-css hides /usr/share/emacs/30.1/lisp/org/ob-css /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-core hides /usr/share/emacs/30.1/lisp/org/ob-core /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-comint hides /usr/share/emacs/30.1/lisp/org/ob-comint /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-clojure hides /usr/share/emacs/30.1/lisp/org/ob-clojure /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-calc hides /usr/share/emacs/30.1/lisp/org/ob-calc /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-awk hides /usr/share/emacs/30.1/lisp/org/ob-awk /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-R hides /usr/share/emacs/30.1/lisp/org/ob-R /home/coco24/.emacs.d/elpa/org-9.8pre0.20250312.181832/ob-C hides /usr/share/emacs/30.1/lisp/org/ob-C /home/coco24/.emacs.d/elpa/track-changes-1.4.0.20250312.1734/track-changes hides /usr/share/emacs/30.1/lisp/emacs-lisp/track-changes /home/coco24/.emacs.d/elpa/eldoc-1.15.0.0.20250304.14245/eldoc hides /usr/share/emacs/30.1/lisp/emacs-lisp/eldoc Features: (url-cache go-translate gt-text-utility gt-engine-echo gt-engine-libre gt-engine-chatgpt gt-engine-youdao gt-engine-osxdict gt-engine-stardict gt-engine-deepl gt-engine-google-rpc gt-engine-google gt-engine-bing gt-extension gt-faces gt-core gt-httpx consult-flymake mailalias smtpmail textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check gptel-curl misearch multi-isearch shortdoc cl-format-def shadow sort mail-extr emacsbug cape-char dabbrev cape-keyword magit-extras dired-aux nerd-icons-dired diredfl embark-org embark-consult embark org-srs-stats-interval org-srs-item-card org-srs-algorithm-fsrs org-srs-fuzz org-srs-review-cache org-srs-step fsrs loaddefs-gen tar-mode arc-mode archive-mode quelpa help-fns radix-tree vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view bug-reference magit-bookmark magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff git-commit log-edit magit-core magit-autorevert autorevert magit-margin magit-transient magit-process with-editor server magit-mode benchmark magit-git magit-base checkdoc lisp-mnt flymake-popon posframe popon hl-line display-line-numbers corfu-popupinfo nerd-icons-corfu corfu indent-yank hideshow gptel gptel-openai which-func vc tempo srecode soap-client rng-xsd rng-dt rng-util xsd-regexp smerge-mode sieve sieve-mode sieve-manage sasl sasl-anonymous sasl-login sasl-plain pcvs-defs pcvs-util grep glasses gdb-mi bindat gud etags-regen emerge elide-head eglot external-completion jsonrpc flymake ert debug backtrace editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util ede/project-am ede/autoconf-edit autoconf autoconf-mode semantic/find ede/makefile-edit make-mode ede/linux semantic/db semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local ede/make ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source eieio-base eieio-speedbar speedbar ezimage dframe eieio-custom cedet ebrowse ebuff-menu view diff copyright compare-w cl-font-lock check-declare calculator add-log expand-region text-mode-expansions the-org-mode-expansions er-basic-expansions expand-region-core expand-region-custom tabify lsp-mode lsp-protocol spinner network-stream imenu ht ewoc tramp-cmds undo-hl org-srs-embed org-srs-item-cloze org-srs-review org-srs-query org-srs-item org-srs-log org-srs-table org-srs-time org-srs-algorithm org-srs-property org-download url-http url-auth url-gw nsm async org-appear emacsql-sqlite-builtin sqlite org-roam-protocol org-roam-migrate org-roam-log org-roam-mode org-roam-capture org-roam-id org-roam-node crm org-roam-db org-roam-utils org-roam-compat org-roam emacsql-sqlite emacsql emacsql-compiler magit-section cursor-sensor llama org-tree-slide-ext org-tree-slide org-bars org-indent org-media-note org-media-note-import org-media-note-mpv org-media-note-core mpv tq org-timer org-clock pretty-hydra hydra lv cape yasnippet rainbow-delimiters cdlatex reftex reftex-loaddefs reftex-vars texmathp face-remap oc-basic ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win ol-docview doc-view filenotify jka-compr image-mode exif dired-ext dired dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi smartparens-org org-ext org-attach org-gtd-habitica smartparens-markdown markdown-mode edit-indirect appt diary-lib diary-loaddefs org-gtd org-gtd-upgrades org-habit org-gtd-oops org-gtd-review org-gtd-skip org-gtd-mode org-gtd-areas-of-focus org-gtd-organize org-gtd-process org-gtd-capture org-gtd-projects org-gtd-delegate org-gtd-trash org-gtd-single-action org-gtd-quick-action org-gtd-incubate org-gtd-knowledge org-gtd-archive org-gtd-agenda org-archive org-gtd-habit org-gtd-calendar org-gtd-refile org-gtd-clarify org-gtd-horizons org-gtd-files org-gtd-id org-gtd-core org-gtd-backward-compatibility org-edna org-agenda-property org-agenda org-protocol org-capture transient habitica org-element org-persist org-id org-refile org-element-ast inline avl-tree org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script smie executable ob-comint org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-china-x cal-china lunar solar cal-dst holidays holiday-loaddefs calendar-ext cal-iso cal-menu calendar cal-loaddefs org-version org-compat org-macs tramp-sh tramp-gvfs tramp-cache time-stamp zeroconf dbus xml tramp trampver tramp-integration files-x tramp-message tramp-compat xdg shell pcomplete parse-time iso8601 format-spec tramp-loaddefs vc-git diff-mode track-changes vc-dispatcher smartparens-go go-mode find-file ffap etags fileloop generator xref project recentf tree-widget consult bookmark cus-edit pp cus-start vertico-directory mule-util orderless savehist nerd-icons-completion marginalia tempel smartparens-config smartparens-text smartparens loadhist thingatpt repeat which-key pulse color init compile comint ansi-osc ansi-color sis isearch-mb language-support treesit-auto treesit pixel-scroll cua-base popper-echo popper cnfonts vlf-setup advice vertico-mouse vertico mode-line-bell doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path f s dash nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline nerd-icons-data-octicon nerd-icons-data-pomicon nerd-icons-data-ipsicon compat winner ring mule-cmds paragraphs monokai-theme finder-inf gnus nnheader gnus-util text-property-search time-date mail-utils range mm-util mail-prsvr wid-edit cus-load comp comp-cstr warnings comp-run comp-common kinsoku startup mb-depth elisp-mode-ext edmacro kmacro emacs-ext quelpa-use-package cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core 0blayout-autoloads affe-autoloads anaphora-autoloads anki-editor-autoloads app-launcher-autoloads auctex-autoloads tex-site blueprint-mode-autoloads breadcrumb-autoloads buffer-timer-autoloads cal-china-x-autoloads cape-autoloads cdlatex-autoloads chatgpt-shell-autoloads circe-autoloads citeproc-autoloads citre-autoloads cl-format-autoloads cmake-mode-autoloads cnfonts-autoloads command-log-mode-autoloads commenter-autoloads consult-dir-autoloads consult-emms-autoloads consult-lsp-autoloads corfu-doc-terminal-autoloads corfu-doc-autoloads corfu-terminal-autoloads corfu-autoloads crux-autoloads csv-mode-autoloads dired-narrow-autoloads dired-hacks-utils-autoloads diredfl-autoloads doom-modeline-autoloads doom-modeline-pokemon-autoloads doom-themes-autoloads drag-stuff-autoloads eat-autoloads edit-server-autoloads eglot-tempel-autoloads eglot-autoloads eldoc-box-autoloads eldoc-overlay-autoloads elmacro-autoloads embark-consult-autoloads consult-autoloads embark-autoloads emms-autoloads emms-vgm-autoloads epc-autoloads ctable-autoloads concurrent-autoloads deferred-autoloads esh-autosuggest-autoloads company-autoloads eshell-outline-autoloads eshell-prompt-extras-autoloads eshell-syntax-highlighting-autoloads expand-region-autoloads fd-dired-autoloads fish-completion-autoloads fish-mode-autoloads flycheck-autoloads flymake-popon-autoloads focus-autoloads frameshot-autoloads fsrs-autoloads geiser-guile-autoloads glsl-mode-autoloads go-mode-autoloads go-translate-autoloads gptel-autoloads graphql-autoloads habitica-autoloads hackernews-autoloads hide-mode-line-autoloads highlight-indent-guides-autoloads hnreader-autoloads htmlize-autoloads indent-yank-autoloads inf-clojure-autoloads clojure-mode-autoloads inline-docs-autoloads isearch-mb-autoloads json-mode-autoloads rx json-snatcher-autoloads jsonrpc-autoloads kana-autoloads kind-icon-autoloads kotlin-mode-autoloads kotlin-ts-mode-autoloads latex-math-preview-autoloads leetcode-autoloads aio-autoloads log4e-autoloads lsp-java-autoloads dap-mode-autoloads lsp-docker-autoloads bui-autoloads lsp-pyright-autoloads lsp-treemacs-autoloads lsp-ui-autoloads lsp-mode-autoloads eldoc-autoloads lua-mode-autoloads macrostep-geiser-autoloads geiser-autoloads magit-autoloads pcase marginalia-autoloads markless-autoloads material-pbm-icons-autoloads mode-fontify-autoloads mode-line-bell-autoloads monokai-theme-autoloads multiple-cursors-autoloads nerd-icons-completion-autoloads nerd-icons-corfu-autoloads nerd-icons-dired-autoloads nerd-icons-ibuffer-autoloads nhexl-mode-autoloads nov-autoloads esxml-autoloads kv-autoloads ob-svgbob-autoloads orderless-autoloads org-appear-autoloads org-attach-refactor-autoloads org-bars-autoloads org-download-autoloads async-autoloads org-englearn-autoloads org-gtd-autoloads org-agenda-property-autoloads org-edna-autoloads org-gtd-habitica-autoloads org-journal-autoloads org-media-note-autoloads mpv-autoloads org-mime-autoloads org-pdftools-autoloads org-noter-autoloads org-remark-autoloads org-roam-ui-autoloads org-roam-autoloads magit-section-autoloads llama-autoloads emacsql-autoloads org-autoloads org-srs-autoloads org-tree-slide-autoloads ox-hugo-autoloads package-lint-flymake-autoloads package-lint-autoloads parsebib-autoloads parsec-autoloads paw-autoloads pdf-tools-autoloads peg-autoloads phi-search-autoloads pkg-info-autoloads epl-autoloads polymode-autoloads popon-autoloads popper-autoloads pretty-hydra-autoloads promise-autoloads pyvenv-autoloads quelpa-use-package-autoloads quelpa-autoloads queue-autoloads quick-peek-autoloads quickrun-autoloads racket-mode-autoloads rainbow-delimiters-autoloads redacted-autoloads request-autoloads rescript-mode-autoloads rime-autoloads popup-autoloads rustic-autoloads markdown-mode-autoloads rust-mode-autoloads sbt-mode-autoloads scad-preview-autoloads scad-mode-autoloads scala-mode-autoloads separedit-autoloads edit-indirect-autoloads shell-maker-autoloads shrink-path-autoloads f-autoloads simple-httpd-autoloads sis-autoloads sloff-autoloads sly-macrostep-autoloads macrostep-autoloads sly-autoloads smartparens-autoloads smooth-scroll-autoloads smooth-scrolling-autoloads spinner-autoloads string-inflection-autoloads svg-lib-autoloads tab-line-nerd-icons-autoloads nerd-icons-autoloads tablist-autoloads tempel-autoloads terminal-focus-reporting-autoloads tomelr-autoloads toml-mode-autoloads track-changes-autoloads transient-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads s-autoloads dash-autoloads treesit-auto-autoloads typescript-mode-autoloads undo-hl-autoloads use-package-autoloads bind-key-autoloads vala-mode-autoloads cc-styles cc-align cc-engine cc-vars cc-defs vertico-directory-autoloads vertico-autoloads vlf-autoloads websocket-autoloads wgrep-autoloads which-key-autoloads info with-editor-autoloads xclip-autoloads xterm-color-autoloads yaml-autoloads yaml-mode-autoloads yasnippet-autoloads zmq-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt bytecomp byte-compile url-vars early-init gv cl-loaddefs cl-lib china-util 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 native-compile emacs) Memory information: ((conses 16 1523626 303747) (symbols 48 74443 7) (strings 32 403808 16211) (string-bytes 1 13792902) (vectors 16 163538) (vector-slots 8 2696053 74486) (floats 8 2035 6537) (intervals 56 16783 9746) (buffers 992 45))
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Sun, 16 Mar 2025 12:32:02 GMT) Full text and rfc822 format available.Message #8 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Bohong Huang <bohonghuang <at> qq.com>, Stefan Monnier <monnier <at> iro.umontreal.ca> Cc: 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Sun, 16 Mar 2025 14:30:53 +0200
> Date: Sun, 16 Mar 2025 15:21:06 +0800 > From: Bohong Huang via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > > Hello Emacs maintainers, > > When using `cl-load-time-value` from `cl-lib`, I encountered an issue > where the macro fails during both byte-compilation and runtime: > > `reference to free variable ‘--cl-load-time--0’` I'm guessing your Lisp file doesn't have the lexical-binding cookie. If it did, you should have seen a different warning. > I find this macro is quite useful for performing compile-time > computations within a function body without polluting global variable > names and relying on `cl-macrolet`. Stefan, any comments?
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Sun, 16 Mar 2025 13:02:04 GMT) Full text and rfc822 format available.Message #11 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Bohong Huang <bohonghuang <at> qq.com> To: Eli Zaretskii <eliz <at> gnu.org> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Sun, 16 Mar 2025 20:56:10 +0800
`lexical-binding` is enabled for sure, which is, IMO, exactly why the compiler deems `--cl-load-time--0` a free variable. This issue can be reproduced by inserting `(cl-load-time-value t)` in any existing `.el` file with lexical binding enabled. Eli Zaretskii <eliz <at> gnu.org> writes: > I'm guessing your Lisp file doesn't have the lexical-binding cookie. > If it did, you should have seen a different warning.
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Sun, 16 Mar 2025 21:05:03 GMT) Full text and rfc822 format available.Message #14 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Stefan Monnier <monnier <at> iro.umontreal.ca> To: Bohong Huang <bohonghuang <at> qq.com> Cc: 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Sun, 16 Mar 2025 17:03:56 -0400
> When using `cl-load-time-value` from `cl-lib`, I encountered an issue > where the macro fails during both byte-compilation and runtime: > > `reference to free variable ‘--cl-load-time--0’` I tried ;; -*- lexical-binding:t -*- (require 'cl-lib) (defun my-foo () (time-convert (time-subtract (current-time) (cl-load-time-value (current-time))) 'integer)) and I did get the above warning at compile-time, but it did work correctly after loading the `.elc` file. I.e. `M-: (my-foo)` gives me the number of seconds since the file was loaded. My crystal ball tells me that perhaps you're using `cl-load-time-value` "at toplevel" rather than within a function? In that case, indeed, I think the macro will fail because it relies on (defun cl--compiling-top-level-p () "Nil if we're in the middle of byte-compiling something." ;; ¡¡Yuck!! (not (and (fboundp 'byte-compile-file-form-defmumble) ;; FIXME: These are lexical now! (boundp 'bytecomp-this-kind) (boundp 'bytecomp-that-one)))) which has stopped working with: commit ca1055060d5793e368c1a165c412944d6800c3a6 Author: Stefan Monnier <monnier <at> iro.umontreal.ca> Date: Wed Mar 16 16:08:39 2011 -0400 Remove bytecomp- prefix, plus misc changes. which made `(bytecomp-)this-kind` into a lexically scoped variable. So, this is a long-standing bug (of which I've been somewhat aware, as the FIXME above suggests). The current implementation of `cl-load-time-value` is fairly ugly/hackish, so I'd rather not add yet more hideous hacks to it. > I find this macro is quite useful for performing compile-time > computations within a function body without polluting global variable > names and relying on `cl-macrolet`. Hmm... I don't quite follow: `cl-load-time-value` does not perform compile-time evaluation but load-time evaluation, as its name suggests. Maybe you could/should use `eval-when-compile` instead? Can you show some examples of how you use `cl-load-time-value`? Maybe some detail may give me an idea how to go about making it work without making it worse. Stefan
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Mon, 17 Mar 2025 16:59:05 GMT) Full text and rfc822 format available.Message #17 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Bohong Huang <bohonghuang <at> qq.com> To: Stefan Monnier <monnier <at> iro.umontreal.ca> Cc: 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Tue, 18 Mar 2025 00:58:00 +0800
> My crystal ball tells me that perhaps you're using `cl-load-time-value` > "at toplevel" rather than within a function? No, actually, I am using it within a function. > Can you show some examples of how you use `cl-load-time-value`? > Maybe some detail may give me an idea how to go about making it work > without making it worse. I created a minimal package to reproduce this issue, please check that out: https://github.com/bohonghuang/cl-load-time-value-test.git In my test (with native compilation), simply running command `ltvt-test` results in an error: funcall-interactively: Symbol’s value as variable is void: --cl-load-time--0 > Hmm... I don't quite follow: `cl-load-time-value` does not perform > compile-time evaluation but load-time evaluation, as its name suggests. > Maybe you could/should use `eval-when-compile` instead? You are right. My description was inaccurate, but the general idea is that I hope the form in `cl-load-time-value` can be evaluated before the function is actually called, and return an object that is always `eq`. Maybe it's due to the load-time evaluation that makes using `cl-load-time-value` sometimes be more convenient, as it does not require wrapping all functions in the same file as the caller on the call chain within `eval-when-compile`, just as I provided in the example package.
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Tue, 18 Mar 2025 03:14:03 GMT) Full text and rfc822 format available.Message #20 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Stefan Monnier <monnier <at> iro.umontreal.ca> To: Bohong Huang <bohonghuang <at> qq.com> Cc: 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Mon, 17 Mar 2025 23:13:37 -0400
> I created a minimal package to reproduce this issue, please check that > out: https://github.com/bohonghuang/cl-load-time-value-test.git > > In my test (with native compilation), simply running command `ltvt-test` > results in an error: > > funcall-interactively: Symbol’s value as variable is void: > --cl-load-time--0 I don't see that. Can you show in detail the steps you go through? I did put your file in ~/tmp/foo.el, then byte-compiled it, then did emacs -Q -l ~/tmp/foo then waited a little for the native compiler to kick in, and then M-x ltvt-test RET which did nothing. Doing that `M-x` a second time gave me the message "Test message". Same thing without native compilation. >> Hmm... I don't quite follow: `cl-load-time-value` does not perform >> compile-time evaluation but load-time evaluation, as its name suggests. >> Maybe you could/should use `eval-when-compile` instead? > > You are right. My description was inaccurate, but the general idea is > that I hope the form in `cl-load-time-value` can be evaluated before > the function is actually called, and return an object that is always > `eq`. Maybe it's due to the load-time evaluation that makes using > `cl-load-time-value` sometimes be more convenient, as it does not > require wrapping all functions in the same file as the caller on the > call chain within `eval-when-compile`, just as I provided in the example > package. In my experience, it's always quite easy to rewrite the code without the use of `cl-load-time-value` by moving that code outside to some earlier `defconst`. So I do that because I shudder at the idea of relying on the hackish implementation of `cl-load-time-value`. 🙂 I think its main use case is in macros where you may not have the liberty to move the code to some earlier `defconst`, so you're stuck asking `cl-load-time-value` to do it for you. Stefan
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Tue, 18 Mar 2025 17:27:02 GMT) Full text and rfc822 format available.Message #23 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Bohong Huang <bohonghuang <at> qq.com> To: Stefan Monnier <monnier <at> iro.umontreal.ca> Cc: 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Wed, 19 Mar 2025 01:26:06 +0800
> I don't see that. Can you show in detail the steps you go through? > I did put your file in ~/tmp/foo.el, then byte-compiled it, then did > > emacs -Q -l ~/tmp/foo > > then waited a little for the native compiler to kick in, and then > > M-x ltvt-test RET > > which did nothing. > Doing that `M-x` a second time gave me the message "Test message". > Same thing without native compilation. > Interestingly, I can't even byte-compile it (type `B` in Dired), only to get the following error reported 😢: Compiling file /tmp/cl-load-time-value-test.el at Wed Mar 19 01:04:46 2025 Entering directory ‘/tmp/’ In ltvt-test: cl-load-time-value-test.el:41:4: Warning: reference to free variable ‘--cl-load-time--281’ cl-load-time-value-test.el: Error: End of file during parsing However, my previous way of reproducing the issue was through `package-vc-install`, which can be successfully native-compiled. Confirmed by checking the function's documentation: ltvt-test is an autoloaded interactive native-comp-function in ‘cl-load-time-value-test.el’. (ltvt-test) Inferred type: (function nil t) Not documented. [back] Yet running the command reports the following error: Debugger entered--Lisp error: (void-variable --cl-load-time--0) ltvt-test() funcall-interactively(ltvt-test) command-execute(ltvt-test record) execute-extended-command(nil "ltvt-test" nil) funcall-interactively(execute-extended-command nil "ltvt-test" nil) command-execute(execute-extended-command) > In my experience, it's always quite easy to rewrite the code without the > use of `cl-load-time-value` by moving that code outside to some earlier > `defconst`. So I do that because I shudder at the idea of relying on > the hackish implementation of `cl-load-time-value`. 🙂 > > I think its main use case is in macros where you may not have the > liberty to move the code to some earlier `defconst`, so you're stuck > asking `cl-load-time-value` to do it for you. You're right, but just like this special form is used in Common Lisp, it's very convenient to wrap a form in `load-time-value` in place to avoid some repeat evaluations during multiple calls. Perhaps for my example, I should indeed use `defconst`, while using `eval-when-compile` for other cases that do not involve function calls in the same file.
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Tue, 18 Mar 2025 18:01:02 GMT) Full text and rfc822 format available.Message #26 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Stefan Monnier <monnier <at> iro.umontreal.ca> To: Bohong Huang <bohonghuang <at> qq.com> Cc: 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Tue, 18 Mar 2025 14:00:17 -0400
> In ltvt-test: > cl-load-time-value-test.el:41:4: Warning: reference to free variable > ‘--cl-load-time--281’ That's not an error, but a warning. > cl-load-time-value-test.el: Error: End of file during parsing This usually means a missing closing paren somewhere. My crystal ball tells me you're not using the same code as the one in the Git repo you sent. > However, my previous way of reproducing the issue was through > `package-vc-install`, which can be successfully native-compiled. > Confirmed by checking the function's documentation: > > ltvt-test is an autoloaded interactive native-comp-function in > ‘cl-load-time-value-test.el’. > > (ltvt-test) > > Inferred type: (function nil t) > > Not documented. > > [back] > > Yet running the command reports the following error: > > Debugger entered--Lisp error: (void-variable --cl-load-time--0) > ltvt-test() > funcall-interactively(ltvt-test) > command-execute(ltvt-test record) > execute-extended-command(nil "ltvt-test" nil) > funcall-interactively(execute-extended-command nil "ltvt-test" nil) > command-execute(execute-extended-command) As long as I can't reproduce it here, I can't really investigate further. Stefan
bug-gnu-emacs <at> gnu.org
:bug#77048
; Package emacs
.
(Wed, 19 Mar 2025 16:25:09 GMT) Full text and rfc822 format available.Message #29 received at 77048 <at> debbugs.gnu.org (full text, mbox):
From: Bohong Huang <bohonghuang <at> qq.com> To: Stefan Monnier <monnier <at> iro.umontreal.ca> Cc: 77048 <at> debbugs.gnu.org Subject: Re: bug#77048: 30.1; Macro `cl-load-time-value` malfunctioning at compile-time and runtime Date: Thu, 20 Mar 2025 00:24:11 +0800
>> In ltvt-test: >> cl-load-time-value-test.el:41:4: Warning: reference to free variable >> ‘--cl-load-time--281’ > > That's not an error, but a warning. > >> cl-load-time-value-test.el: Error: End of file during parsing > > This usually means a missing closing paren somewhere. > My crystal ball tells me you're not using the same code as the one in > the Git repo you sent. I can confirm the identity of code used by the two methods. If that’s the case, this parsing error issue might be beyond the scope of this thread, and I may report it separately. >> However, my previous way of reproducing the issue was through >> `package-vc-install`, which can be successfully native-compiled. >> Confirmed by checking the function's documentation: >> >> ltvt-test is an autoloaded interactive native-comp-function in >> ‘cl-load-time-value-test.el’. >> >> (ltvt-test) >> >> Inferred type: (function nil t) >> >> Not documented. >> >> [back] >> >> Yet running the command reports the following error: >> >> Debugger entered--Lisp error: (void-variable --cl-load-time--0) >> ltvt-test() >> funcall-interactively(ltvt-test) >> command-execute(ltvt-test record) >> execute-extended-command(nil "ltvt-test" nil) >> funcall-interactively(execute-extended-command nil "ltvt-test" nil) >> command-execute(execute-extended-command) > > As long as I can't reproduce it here, I can't really > investigate further. Alright, I'll tinker with this issue myself. Thank you for the time you've spent on it so far! 😉
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.