Package: emacs;
Reported by: Lester Longley <lester <at> ieee.org>
Date: Fri, 15 Aug 2025 18:51:02 UTC
Severity: normal
Found in version 31.0.50
To reply to this bug, email your comments to 79247 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#79247; Package emacs.
(Fri, 15 Aug 2025 18:51:02 GMT) Full text and rfc822 format available.Lester Longley <lester <at> ieee.org>:bug-gnu-emacs <at> gnu.org.
(Fri, 15 Aug 2025 18:51:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Lester Longley <lester <at> ieee.org> To: bug-gnu-emacs <at> gnu.org Subject: 31.0.50; cond* bind* clause body Date: Fri, 15 Aug 2025 14:49:56 -0400
[Message part 1 (text/plain, inline)]
Hello,
I don't know that the below represents a bug, but it might...
(Please advise if I should instead send this to emacs-devel <at> gnu.org)
I haven't been able to locate any examples of using bind* with a clause
body.
(I also checked lisp/emacs-lisp/cond-star-tests.el.)
Based on Trevor's example in
https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I
tried (emacs -Q):
(cond*
((bind* (foo 1))
(message "bound"))
(t :nothing))
This returns :nothing, as expected, since bind* is non-exiting,
but I had also expected (hoped) to--but didn't--see the message "bound" in
the Messages buffer,
through execution of the clause body "(message "bound")"
since I believe that the condition "(bind* (foo 1))" should be true,
as per "As a condition, it counts as true if the first binding’s value is
non-‘nil’."
in the following excerpt from "(elisp) cond* Macro":
-- Macro: cond* &rest clauses
The ‘cond*’ macro is an extended form of the traditional ‘cond’. A
‘cond*’ expression contains a series of CLAUSES, each of which can
use ‘bind*’ to specify binding variables, use ‘match*’ to specify
matching a pattern as a condition, or specify an expression as a
condition to evaluate as a test.
Each clause normally has the form ‘(CONDITION BODY...)’.
CONDITION can be a Lisp expression, as in ‘cond’ (*note
Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or
‘(match* PATTERN DATUM)’.
‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings
list in ‘let*’, *note Local Variables::) for the body of the
clause. As a condition, it counts as true if the first binding’s
value is non-‘nil’.
I believe this result means that the clause "body" didn't execute, even
though the corresponding "condition" is (should be) true.
Thanks,
Lester
In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.16.0) of 2025-08-11 built on penguin
Repository revision: 66eead6fd06d40b919ee6d1de86099592729d671
Repository branch: master
System Description: Debian GNU/Linux 12 (bookworm)
Configured using:
'configure --with-pgtk 'CFLAGS=-g -O2
-ffile-prefix-map=/tmp/emacs.git=. -fstack-protector-strong -Wformat
-Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND 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:
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-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 compile comint ansi-osc ansi-color ring 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 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 66922 14238) (symbols 48 6803 0) (strings 32 17289 2551)
(string-bytes 1 550776) (vectors 16 11399)
(vector-slots 8 154109 11674) (floats 8 22 13) (intervals 56 252 0)
(buffers 1064 11))
[Message part 2 (text/html, inline)]
bug-gnu-emacs <at> gnu.org:bug#79247; Package emacs.
(Sat, 16 Aug 2025 09:51:02 GMT) Full text and rfc822 format available.Message #8 received at 79247 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Lester Longley <lester <at> ieee.org>, Richard Stallman <rms <at> gnu.org> Cc: 79247 <at> debbugs.gnu.org Subject: Re: bug#79247: 31.0.50; cond* bind* clause body Date: Sat, 16 Aug 2025 12:50:13 +0300
> Date: Fri, 15 Aug 2025 14:49:56 -0400 > From: Lester Longley via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > I don't know that the below represents a bug, but it might... > (Please advise if I should instead send this to emacs-devel <at> gnu.org) > > I haven't been able to locate any examples of using bind* with a clause body. > (I also checked lisp/emacs-lisp/cond-star-tests.el.) > > Based on Trevor's example in https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I tried > (emacs -Q): > > (cond* > ((bind* (foo 1)) > (message "bound")) > (t :nothing)) > > This returns :nothing, as expected, since bind* is non-exiting, > but I had also expected (hoped) to--but didn't--see the message "bound" in the Messages buffer, > through execution of the clause body "(message "bound")" > since I believe that the condition "(bind* (foo 1))" should be true, > as per "As a condition, it counts as true if the first binding’s value is non-‘nil’." > in the following excerpt from "(elisp) cond* Macro": > > -- Macro: cond* &rest clauses > The ‘cond*’ macro is an extended form of the traditional ‘cond’. A > ‘cond*’ expression contains a series of CLAUSES, each of which can > use ‘bind*’ to specify binding variables, use ‘match*’ to specify > matching a pattern as a condition, or specify an expression as a > condition to evaluate as a test. > > Each clause normally has the form ‘(CONDITION BODY...)’. > > CONDITION can be a Lisp expression, as in ‘cond’ (*note > Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or > ‘(match* PATTERN DATUM)’. > > ‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings > list in ‘let*’, *note Local Variables::) for the body of the > clause. As a condition, it counts as true if the first binding’s > value is non-‘nil’. > > I believe this result means that the clause "body" didn't execute, even though the corresponding "condition" > is (should be) true. Richard, could you please look into this?
bug-gnu-emacs <at> gnu.org:bug#79247; Package emacs.
(Sat, 30 Aug 2025 07:57:01 GMT) Full text and rfc822 format available.Message #11 received at 79247 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Richard Stallman <rms <at> gnu.org> Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org Subject: Re: bug#79247: 31.0.50; cond* bind* clause body Date: Sat, 30 Aug 2025 10:55:58 +0300
Ping! Richard, could you please look into this issue? > Cc: 79247 <at> debbugs.gnu.org > Date: Sat, 16 Aug 2025 12:50:13 +0300 > From: Eli Zaretskii <eliz <at> gnu.org> > > > Date: Fri, 15 Aug 2025 14:49:56 -0400 > > From: Lester Longley via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > > > I don't know that the below represents a bug, but it might... > > (Please advise if I should instead send this to emacs-devel <at> gnu.org) > > > > I haven't been able to locate any examples of using bind* with a clause body. > > (I also checked lisp/emacs-lisp/cond-star-tests.el.) > > > > Based on Trevor's example in https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I tried > > (emacs -Q): > > > > (cond* > > ((bind* (foo 1)) > > (message "bound")) > > (t :nothing)) > > > > This returns :nothing, as expected, since bind* is non-exiting, > > but I had also expected (hoped) to--but didn't--see the message "bound" in the Messages buffer, > > through execution of the clause body "(message "bound")" > > since I believe that the condition "(bind* (foo 1))" should be true, > > as per "As a condition, it counts as true if the first binding’s value is non-‘nil’." > > in the following excerpt from "(elisp) cond* Macro": > > > > -- Macro: cond* &rest clauses > > The ‘cond*’ macro is an extended form of the traditional ‘cond’. A > > ‘cond*’ expression contains a series of CLAUSES, each of which can > > use ‘bind*’ to specify binding variables, use ‘match*’ to specify > > matching a pattern as a condition, or specify an expression as a > > condition to evaluate as a test. > > > > Each clause normally has the form ‘(CONDITION BODY...)’. > > > > CONDITION can be a Lisp expression, as in ‘cond’ (*note > > Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or > > ‘(match* PATTERN DATUM)’. > > > > ‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings > > list in ‘let*’, *note Local Variables::) for the body of the > > clause. As a condition, it counts as true if the first binding’s > > value is non-‘nil’. > > > > I believe this result means that the clause "body" didn't execute, even though the corresponding "condition" > > is (should be) true. > > Richard, could you please look into this? > > > >
bug-gnu-emacs <at> gnu.org:bug#79247; Package emacs.
(Sat, 13 Sep 2025 07:49:01 GMT) Full text and rfc822 format available.Message #14 received at 79247 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: rms <at> gnu.org Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org Subject: Re: bug#79247: 31.0.50; cond* bind* clause body Date: Sat, 13 Sep 2025 10:48:23 +0300
Ping! Ping! Richard, could you please respond? > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > Date: Sat, 30 Aug 2025 10:55:58 +0300 > From: Eli Zaretskii <eliz <at> gnu.org> > > Ping! Richard, could you please look into this issue? > > > Cc: 79247 <at> debbugs.gnu.org > > Date: Sat, 16 Aug 2025 12:50:13 +0300 > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > > Date: Fri, 15 Aug 2025 14:49:56 -0400 > > > From: Lester Longley via "Bug reports for GNU Emacs, > > > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > > > > > I don't know that the below represents a bug, but it might... > > > (Please advise if I should instead send this to emacs-devel <at> gnu.org) > > > > > > I haven't been able to locate any examples of using bind* with a clause body. > > > (I also checked lisp/emacs-lisp/cond-star-tests.el.) > > > > > > Based on Trevor's example in https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I tried > > > (emacs -Q): > > > > > > (cond* > > > ((bind* (foo 1)) > > > (message "bound")) > > > (t :nothing)) > > > > > > This returns :nothing, as expected, since bind* is non-exiting, > > > but I had also expected (hoped) to--but didn't--see the message "bound" in the Messages buffer, > > > through execution of the clause body "(message "bound")" > > > since I believe that the condition "(bind* (foo 1))" should be true, > > > as per "As a condition, it counts as true if the first binding’s value is non-‘nil’." > > > in the following excerpt from "(elisp) cond* Macro": > > > > > > -- Macro: cond* &rest clauses > > > The ‘cond*’ macro is an extended form of the traditional ‘cond’. A > > > ‘cond*’ expression contains a series of CLAUSES, each of which can > > > use ‘bind*’ to specify binding variables, use ‘match*’ to specify > > > matching a pattern as a condition, or specify an expression as a > > > condition to evaluate as a test. > > > > > > Each clause normally has the form ‘(CONDITION BODY...)’. > > > > > > CONDITION can be a Lisp expression, as in ‘cond’ (*note > > > Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or > > > ‘(match* PATTERN DATUM)’. > > > > > > ‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings > > > list in ‘let*’, *note Local Variables::) for the body of the > > > clause. As a condition, it counts as true if the first binding’s > > > value is non-‘nil’. > > > > > > I believe this result means that the clause "body" didn't execute, even though the corresponding "condition" > > > is (should be) true. > > > > Richard, could you please look into this? > > > > > > > > > > > >
bug-gnu-emacs <at> gnu.org:bug#79247; Package emacs.
(Mon, 15 Sep 2025 13:36:04 GMT) Full text and rfc822 format available.Message #17 received at 79247 <at> debbugs.gnu.org (full text, mbox):
From: Lester Longley <lester <at> ieee.org> To: Eli Zaretskii <eliz <at> gnu.org> Cc: 79247 <at> debbugs.gnu.org, rms <at> gnu.org Subject: Re: bug#79247: 31.0.50; cond* bind* clause body Date: Mon, 15 Sep 2025 09:35:03 -0400
[Message part 1 (text/plain, inline)]
In case it is helpful, I find that the attached change addresses the original issue (which I posited). The change is similar to (motivated by) that in commit f3ef16f86ff, though it doesn't go as far as the change (to `cond*-non-exit-clause-p') in that commit, since I'm unsure whether "Don't check for keywords" should also be applied to `cond*-non-exit-clause-substance'. Regards, Lester On Sat, Sep 13, 2025 at 3:48 AM Eli Zaretskii <eliz <at> gnu.org> wrote: > > Ping! Ping! Richard, could you please respond? > > > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > > Date: Sat, 30 Aug 2025 10:55:58 +0300 > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > Ping! Richard, could you please look into this issue? > > > > > Cc: 79247 <at> debbugs.gnu.org > > > Date: Sat, 16 Aug 2025 12:50:13 +0300 > > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > > > > Date: Fri, 15 Aug 2025 14:49:56 -0400 > > > > From: Lester Longley via "Bug reports for GNU Emacs, > > > > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > > > > > > > I don't know that the below represents a bug, but it might... > > > > (Please advise if I should instead send this to emacs-devel <at> gnu.org) > > > > > > > > I haven't been able to locate any examples of using bind* with a clause body. > > > > (I also checked lisp/emacs-lisp/cond-star-tests.el.) > > > > > > > > Based on Trevor's example in https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I tried > > > > (emacs -Q): > > > > > > > > (cond* > > > > ((bind* (foo 1)) > > > > (message "bound")) > > > > (t :nothing)) > > > > > > > > This returns :nothing, as expected, since bind* is non-exiting, > > > > but I had also expected (hoped) to--but didn't--see the message "bound" in the Messages buffer, > > > > through execution of the clause body "(message "bound")" > > > > since I believe that the condition "(bind* (foo 1))" should be true, > > > > as per "As a condition, it counts as true if the first binding’s value is non-‘nil’." > > > > in the following excerpt from "(elisp) cond* Macro": > > > > > > > > -- Macro: cond* &rest clauses > > > > The ‘cond*’ macro is an extended form of the traditional ‘cond’. A > > > > ‘cond*’ expression contains a series of CLAUSES, each of which can > > > > use ‘bind*’ to specify binding variables, use ‘match*’ to specify > > > > matching a pattern as a condition, or specify an expression as a > > > > condition to evaluate as a test. > > > > > > > > Each clause normally has the form ‘(CONDITION BODY...)’. > > > > > > > > CONDITION can be a Lisp expression, as in ‘cond’ (*note > > > > Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or > > > > ‘(match* PATTERN DATUM)’. > > > > > > > > ‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings > > > > list in ‘let*’, *note Local Variables::) for the body of the > > > > clause. As a condition, it counts as true if the first binding’s > > > > value is non-‘nil’. > > > > > > > > I believe this result means that the clause "body" didn't execute, even though the corresponding "condition" > > > > is (should be) true. > > > > > > Richard, could you please look into this? > > > > > > > > > > > > > > > > > > > >
[cond-star.diff (application/octet-stream, attachment)]
bug-gnu-emacs <at> gnu.org:bug#79247; Package emacs.
(Sat, 27 Sep 2025 08:53:01 GMT) Full text and rfc822 format available.Message #20 received at 79247 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: rms <at> gnu.org Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org Subject: Re: bug#79247: 31.0.50; cond* bind* clause body Date: Sat, 27 Sep 2025 11:52:04 +0300
Ping! Ping! Ping! Richard, could you please chime in? > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > Date: Sat, 13 Sep 2025 10:48:23 +0300 > From: Eli Zaretskii <eliz <at> gnu.org> > > Ping! Ping! Richard, could you please respond? > > > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > > Date: Sat, 30 Aug 2025 10:55:58 +0300 > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > Ping! Richard, could you please look into this issue? > > > > > Cc: 79247 <at> debbugs.gnu.org > > > Date: Sat, 16 Aug 2025 12:50:13 +0300 > > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > > > > Date: Fri, 15 Aug 2025 14:49:56 -0400 > > > > From: Lester Longley via "Bug reports for GNU Emacs, > > > > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > > > > > > > I don't know that the below represents a bug, but it might... > > > > (Please advise if I should instead send this to emacs-devel <at> gnu.org) > > > > > > > > I haven't been able to locate any examples of using bind* with a clause body. > > > > (I also checked lisp/emacs-lisp/cond-star-tests.el.) > > > > > > > > Based on Trevor's example in https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I tried > > > > (emacs -Q): > > > > > > > > (cond* > > > > ((bind* (foo 1)) > > > > (message "bound")) > > > > (t :nothing)) > > > > > > > > This returns :nothing, as expected, since bind* is non-exiting, > > > > but I had also expected (hoped) to--but didn't--see the message "bound" in the Messages buffer, > > > > through execution of the clause body "(message "bound")" > > > > since I believe that the condition "(bind* (foo 1))" should be true, > > > > as per "As a condition, it counts as true if the first binding’s value is non-‘nil’." > > > > in the following excerpt from "(elisp) cond* Macro": > > > > > > > > -- Macro: cond* &rest clauses > > > > The ‘cond*’ macro is an extended form of the traditional ‘cond’. A > > > > ‘cond*’ expression contains a series of CLAUSES, each of which can > > > > use ‘bind*’ to specify binding variables, use ‘match*’ to specify > > > > matching a pattern as a condition, or specify an expression as a > > > > condition to evaluate as a test. > > > > > > > > Each clause normally has the form ‘(CONDITION BODY...)’. > > > > > > > > CONDITION can be a Lisp expression, as in ‘cond’ (*note > > > > Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or > > > > ‘(match* PATTERN DATUM)’. > > > > > > > > ‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings > > > > list in ‘let*’, *note Local Variables::) for the body of the > > > > clause. As a condition, it counts as true if the first binding’s > > > > value is non-‘nil’. > > > > > > > > I believe this result means that the clause "body" didn't execute, even though the corresponding "condition" > > > > is (should be) true. > > > > > > Richard, could you please look into this? > > > > > > > > > > > > > > > > > > > > > > > >
bug-gnu-emacs <at> gnu.org:bug#79247; Package emacs.
(Sat, 11 Oct 2025 08:30:02 GMT) Full text and rfc822 format available.Message #23 received at 79247 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: rms <at> gnu.org Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org Subject: Re: bug#79247: 31.0.50; cond* bind* clause body Date: Sat, 11 Oct 2025 11:28:50 +0300
Ping! Ping! Ping! Ping! Richard, please respond. > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > Date: Sat, 27 Sep 2025 11:52:04 +0300 > From: Eli Zaretskii <eliz <at> gnu.org> > > Ping! Ping! Ping! Richard, could you please chime in? > > > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > > Date: Sat, 13 Sep 2025 10:48:23 +0300 > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > Ping! Ping! Richard, could you please respond? > > > > > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > > > Date: Sat, 30 Aug 2025 10:55:58 +0300 > > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > > > Ping! Richard, could you please look into this issue? > > > > > > > Cc: 79247 <at> debbugs.gnu.org > > > > Date: Sat, 16 Aug 2025 12:50:13 +0300 > > > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > > > > > > Date: Fri, 15 Aug 2025 14:49:56 -0400 > > > > > From: Lester Longley via "Bug reports for GNU Emacs, > > > > > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > > > > > > > > > I don't know that the below represents a bug, but it might... > > > > > (Please advise if I should instead send this to emacs-devel <at> gnu.org) > > > > > > > > > > I haven't been able to locate any examples of using bind* with a clause body. > > > > > (I also checked lisp/emacs-lisp/cond-star-tests.el.) > > > > > > > > > > Based on Trevor's example in https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I tried > > > > > (emacs -Q): > > > > > > > > > > (cond* > > > > > ((bind* (foo 1)) > > > > > (message "bound")) > > > > > (t :nothing)) > > > > > > > > > > This returns :nothing, as expected, since bind* is non-exiting, > > > > > but I had also expected (hoped) to--but didn't--see the message "bound" in the Messages buffer, > > > > > through execution of the clause body "(message "bound")" > > > > > since I believe that the condition "(bind* (foo 1))" should be true, > > > > > as per "As a condition, it counts as true if the first binding’s value is non-‘nil’." > > > > > in the following excerpt from "(elisp) cond* Macro": > > > > > > > > > > -- Macro: cond* &rest clauses > > > > > The ‘cond*’ macro is an extended form of the traditional ‘cond’. A > > > > > ‘cond*’ expression contains a series of CLAUSES, each of which can > > > > > use ‘bind*’ to specify binding variables, use ‘match*’ to specify > > > > > matching a pattern as a condition, or specify an expression as a > > > > > condition to evaluate as a test. > > > > > > > > > > Each clause normally has the form ‘(CONDITION BODY...)’. > > > > > > > > > > CONDITION can be a Lisp expression, as in ‘cond’ (*note > > > > > Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or > > > > > ‘(match* PATTERN DATUM)’. > > > > > > > > > > ‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings > > > > > list in ‘let*’, *note Local Variables::) for the body of the > > > > > clause. As a condition, it counts as true if the first binding’s > > > > > value is non-‘nil’. > > > > > > > > > > I believe this result means that the clause "body" didn't execute, even though the corresponding "condition" > > > > > is (should be) true. > > > > > > > > Richard, could you please look into this? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
bug-gnu-emacs <at> gnu.org:bug#79247; Package emacs.
(Tue, 04 Nov 2025 12:57:02 GMT) Full text and rfc822 format available.Message #26 received at 79247 <at> debbugs.gnu.org (full text, mbox):
From: Lester Longley <lester <at> ieee.org> To: Eli Zaretskii <eliz <at> gnu.org> Cc: 79247 <at> debbugs.gnu.org, rms <at> gnu.org Subject: Re: bug#79247: 31.0.50; cond* bind* clause body Date: Tue, 4 Nov 2025 07:55:41 -0500
[Message part 1 (text/plain, inline)]
Hi Eli, Richard clarified yesterday, in [[ https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg00103.html][Re: Adding bind-and* to cond*]] > > `(bind* BINDINGS...)' means to bind BINDINGS (as if they were in `let*') > > for the body of the clause, and all subsequent clauses, since the `bind*' > > clause is always a non-exit clause. As a condition, it counts as true > > and runs the body of the clause if the first binding's value is non-nil. > > That describes the meaning it is supposed to have. If the code > disagrees with that, the code should be fixed. I believe that the patch (cond-star.diff) which I had sent earlier in this thread (9/15/25) would correct, or at least be helpful towards "fixing," the operation of `bind*' as regards this particular issue. Regards, Lester On Sat, Oct 11, 2025 at 4:29 AM Eli Zaretskii <eliz <at> gnu.org> wrote: > Ping! Ping! Ping! Ping! Richard, please respond. > > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > Date: Sat, 27 Sep 2025 11:52:04 +0300 > From: Eli Zaretskii <eliz <at> gnu.org> > > Ping! Ping! Ping! Richard, could you please chime in? > > > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > > Date: Sat, 13 Sep 2025 10:48:23 +0300 > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > Ping! Ping! Richard, could you please respond? > > > > > Cc: 79247 <at> debbugs.gnu.org, lester <at> ieee.org > > > Date: Sat, 30 Aug 2025 10:55:58 +0300 > > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > > > Ping! Richard, could you please look into this issue? > > > > > > > Cc: 79247 <at> debbugs.gnu.org > > > > Date: Sat, 16 Aug 2025 12:50:13 +0300 > > > > From: Eli Zaretskii <eliz <at> gnu.org> > > > > > > > > > Date: Fri, 15 Aug 2025 14:49:56 -0400 > > > > > From: Lester Longley via "Bug reports for GNU Emacs, > > > > > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> > > > > > > > > > > I don't know that the below represents a bug, but it might... > > > > > (Please advise if I should instead send this to emacs-devel <at> gnu.org) > > > > > > > > > > I haven't been able to locate any examples of using bind* with a clause body. > > > > > (I also checked lisp/emacs-lisp/cond-star-tests.el.) > > > > > > > > > > Based on Trevor's example in https://lists.gnu.org/archive/html/emacs-devel/2025-01/msg00312.html, I tried > > > > > (emacs -Q): > > > > > > > > > > (cond* > > > > > ((bind* (foo 1)) > > > > > (message "bound")) > > > > > (t :nothing)) > > > > > > > > > > This returns :nothing, as expected, since bind* is non-exiting, > > > > > but I had also expected (hoped) to--but didn't--see the message "bound" in the Messages buffer, > > > > > through execution of the clause body "(message "bound")" > > > > > since I believe that the condition "(bind* (foo 1))" should be true, > > > > > as per "As a condition, it counts as true if the first binding’s value is non-‘nil’." > > > > > in the following excerpt from "(elisp) cond* Macro": > > > > > > > > > > -- Macro: cond* &rest clauses > > > > > The ‘cond*’ macro is an extended form of the traditional ‘cond’. A > > > > > ‘cond*’ expression contains a series of CLAUSES, each of which can > > > > > use ‘bind*’ to specify binding variables, use ‘match*’ to specify > > > > > matching a pattern as a condition, or specify an expression as a > > > > > condition to evaluate as a test. > > > > > > > > > > Each clause normally has the form ‘(CONDITION BODY...)’. > > > > > > > > > > CONDITION can be a Lisp expression, as in ‘cond’ (*note > > > > > Conditionals::). Or it can be ‘(bind* BINDINGS...)’ or > > > > > ‘(match* PATTERN DATUM)’. > > > > > > > > > > ‘(bind* BINDINGS...)’ means to bind BINDINGS (like the bindings > > > > > list in ‘let*’, *note Local Variables::) for the body of the > > > > > clause. As a condition, it counts as true if the first binding’s > > > > > value is non-‘nil’. > > > > > > > > > > I believe this result means that the clause "body" didn't execute, even though the corresponding "condition" > > > > > is (should be) true. > > > > > > > > Richard, could you please look into this? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
[Message part 2 (text/html, inline)]
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.