unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#69270: 29.1; transient.el: Using `transient-define-prefix' with a lambda command results in warning
@ 2024-02-19 10:45 Fadi Moukayed
  2024-02-19 13:05 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Fadi Moukayed @ 2024-02-19 10:45 UTC (permalink / raw)
  To: 69270

Mentioned on the #emacs channel (libera).

As per https://www.gnu.org/software/emacs/manual/html_mono/transient.html#Suffix-Specifications
– it is mentioned that "COMMAND can also be a lambda expression."

However, evaluating the form (even on an Emacs instance started with "emacs -Q")

  (transient-define-prefix my-test-transient () ["Heading" ("a"
"choice a" (lambda () (interactive)))])

Results in the following warning being printed on the *Messages* buffer:

  Warning: (lambda nil \...) quoted with ' rather than with #'

Attempting to hashquote the lambda as in:

  (transient-define-prefix my-test-transient () ["Heading" ("a"
"choice a" (lambda () (interactive)))])

... as suggested by some on #emacs results in an error when evaluating.

At this point, I am not sure if this is an error in documentation of
transient.el, or an error in the macro definition of the
`transient-define-prefix' macro itself, or if the warning is
superfluous and whether it should be ignored. As I'm unsure whether
this is a bug or not, I'm erring on the side of safety and reporting
it to bring it to attention.

In GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
 cairo version 1.16.0) of 2023-12-10 built on lcy02-amd64-098
Repository revision: 28fb02492c2444c5976eb53fd6f9badfe54f4ea1
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12201001
System Description: Ubuntu 22.04.4 LTS

Configured using:
 'configure --prefix=/snap/emacs/current/usr --with-x-toolkit=gtk3
 --without-xaw3d --with-modules --with-cairo
 --with-native-compilation=aot --with-xinput2 --with-tree-sitter
 --with-json
 'CFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include
 -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu
 -isystem/build/emacs/stage/usr/include -O2'
 'CPPFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include
 -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu
 -isystem/build/emacs/stage/usr/include'
 'LDFLAGS=-L/build/emacs/parts/emacs/install/lib
 -L/build/emacs/parts/emacs/install/usr/lib
 -L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu
 -L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu
 -L/build/emacs/stage/usr/lib''

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

Important settings:
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
  electric-pair-mode: t
  display-line-numbers-mode: t
  erc-ring-mode: t
  erc-notifications-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-list-mode: t
  erc-irccontrols-mode: t
  erc-keep-place-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  erc-scrolltobottom-mode: t
  erc-imenu-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-bufbar-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-autojoin-mode: t
  recentf-mode: t
  pixel-scroll-precision-mode: t
  minibuffer-depth-indicate-mode: t
  global-whitespace-mode: t
  global-goto-address-mode: t
  goto-address-mode: t
  global-auto-revert-mode: t
  fido-vertical-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  fido-mode: t
  erc-networks-mode: t
  desktop-save-mode: t
  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
  prettify-symbols-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#69270: 29.1; transient.el: Using `transient-define-prefix' with a lambda command results in warning
  2024-02-19 10:45 bug#69270: 29.1; transient.el: Using `transient-define-prefix' with a lambda command results in warning Fadi Moukayed
@ 2024-02-19 13:05 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-02-19 13:05 UTC (permalink / raw)
  To: Fadi Moukayed, jonas; +Cc: 69270

> From: Fadi Moukayed <smfadi@gmail.com>
> Date: Mon, 19 Feb 2024 11:45:25 +0100
> 
> Mentioned on the #emacs channel (libera).
> 
> As per https://www.gnu.org/software/emacs/manual/html_mono/transient.html#Suffix-Specifications
> – it is mentioned that "COMMAND can also be a lambda expression."
> 
> However, evaluating the form (even on an Emacs instance started with "emacs -Q")
> 
>   (transient-define-prefix my-test-transient () ["Heading" ("a"
> "choice a" (lambda () (interactive)))])
> 
> Results in the following warning being printed on the *Messages* buffer:
> 
>   Warning: (lambda nil \...) quoted with ' rather than with #'
> 
> Attempting to hashquote the lambda as in:
> 
>   (transient-define-prefix my-test-transient () ["Heading" ("a"
> "choice a" (lambda () (interactive)))])
> 
> ... as suggested by some on #emacs results in an error when evaluating.
> 
> At this point, I am not sure if this is an error in documentation of
> transient.el, or an error in the macro definition of the
> `transient-define-prefix' macro itself, or if the warning is
> superfluous and whether it should be ignored. As I'm unsure whether
> this is a bug or not, I'm erring on the side of safety and reporting
> it to bring it to attention.

Jonas, could you please look into this?

Thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-19 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 10:45 bug#69270: 29.1; transient.el: Using `transient-define-prefix' with a lambda command results in warning Fadi Moukayed
2024-02-19 13:05 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).