GNU bug report logs - #69306
30.0.50; defining menu-items with :enable enables them unconditionally

Previous Next

Package: emacs;

Reported by: StrawberryTea <look <at> strawberrytea.xyz>

Date: Wed, 21 Feb 2024 23:31:01 UTC

Severity: normal

Found in version 30.0.50

To reply to this bug, email your comments to 69306 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


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#69306; Package emacs. (Wed, 21 Feb 2024 23:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to StrawberryTea <look <at> strawberrytea.xyz>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 21 Feb 2024 23:31:02 GMT) Full text and rfc822 format available.

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

From: StrawberryTea <look <at> strawberrytea.xyz>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; defining menu-items with :enable enables them unconditionally
Date: Wed, 21 Feb 2024 17:26:02 -0600
Hi. I am not sure if I open a vanilla Emacs session and evaluate:
(defvar hello nil)
(setq hello nil)
(define-key global-map (kbd "C-M-S-f") '(menu-item "" delete-backward-char :enable hello))

and then press C-M-S-f, the delete-backward-char menu item will be
enabled, even though hello is nil.


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.0) of 2024-02-20 built on localhost
Repository revision: 167d9b9040333a5bff64325423750243c60edfa1
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: Gentoo Linux

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --datarootdir=/usr/share
 --disable-silent-rules --docdir=/usr/share/doc/emacs-30.0.9999
 --htmldir=/usr/share/doc/emacs-30.0.9999/html --libdir=/usr/lib64
 --program-suffix=-emacs-30-vcs --includedir=/usr/include/emacs-30-vcs
 --infodir=/usr/share/info/emacs-30-vcs --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --with-pdumper --enable-acl
 --enable-xattr --with-dbus --with-modules --with-gameuser=:gamestat
 --with-libgmp --with-gpm --with-native-compilation=aot --with-json
 --without-kerberos --without-kerberos5 --with-lcms2 --with-xml2
 --with-mailutils --without-selinux --with-sqlite3 --with-gnutls
 --with-libsystemd --with-threads --with-tree-sitter --without-wide-int
 --with-sound=oss --with-zlib --with-x --without-pgtk --without-ns
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --with-xpm --with-xft --with-cairo --with-harfbuzz --with-libotf
 --with-m17n-flt --with-x-toolkit=lucid --with-xaw3d --with-gif
 --with-jpeg --with-png --with-rsvg --with-tiff --with-webp
 --with-imagemagick --with-dumping=pdumper 'CFLAGS=-march=native -Ofast
 -fno-stack-protector -fno-finite-math-only -pipe -fno-lto
 -Wno-error=odr -Wno-error=lto-type-mismatch -Wno-error=strict-aliasing'
 'LDFLAGS=-Wl,--as-needed -Wl,-Ofast -Wl,--sort-common''

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

Important settings:
  value of $LANG: C.utf8
  locale-coding-system: utf-8-unix

Major mode: mu4e:main

Minor modes in effect:
  parrot-mode: t
  isearch-mb-mode: t
  midnight-mode: t
  pomm-mode-line-mode: t
  dap-tooltip-mode: t
  dap-ui-mode: t
  lsp-treemacs-sync-mode: t
  dap-mode: t
  treemacs-filewatch-mode: t
  treemacs-git-mode: t
  treemacs-fringe-indicator-mode: t
  pdf-occur-global-minor-mode: t
  org-ai-global-mode: t
  diff-hl-flydiff-mode: t
  async-bytecomp-package-mode: t
  mu4e-search-minor-mode: t
  mu4e-update-minor-mode: t
  mu4e-context-minor-mode: t
  mu4e-modeline-mode: t
  eat-eshell-visual-command-mode: t
  eat-eshell-mode: t
  auto-sudoedit-mode: t
  abridge-diff-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  winum-mode: t
  recentf-mode: t
  save-place-mode: t
  global-so-long-mode: t
  envrc-global-mode: t
  envrc-mode: t
  magit-wip-initial-backup-mode: t
  magit-wip-before-change-mode: t
  magit-wip-after-apply-mode: t
  magit-wip-after-save-mode: t
  magit-wip-mode: t
  global-git-commit-mode: t
  beacon-mode: t
  wakatime-ui-mode: t
  global-wakatime-mode: t
  wakatime-mode: t
  savehist-mode: t
  better-jumper-mode: t
  better-jumper-local-mode: t
  vertico-multiform-mode: t
  vertico-mouse-mode: t
  vertico-mode: t
  nerd-icons-completion-mode: t
  marginalia-mode: t
  corfu-history-mode: t
  corfu-popupinfo-mode: t
  global-corfu-mode: t
  corfu-mode: t
  evil-goggles-mode: t
  evil-snipe-override-mode: t
  evil-snipe-mode: t
  evil-owl-mode: t
  repeat-mode: t
  restore-point-mode: t
  kill-ring-deindent-mode: t
  aas-global-mode: t
  aas-mode: t
  beginend-global-mode: t
  gcmh-mode: t
  winner-mode: t
  undo-fu-session-global-mode: t
  undo-fu-mode: t
  global-flycheck-mode: t
  which-key-mode: t
  delete-selection-mode: t
  org-roam-db-autosync-mode: t
  smartparens-global-mode: t
  eros-mode: t
  projectile-mode: t
  fancy-compilation-mode: t
  ws-butler-global-mode: t
  editorconfig-mode: t
  global-yank-indent-mode: t
  exwm-mff-mode: t
  persp-mode: t
  minions-mode: t
  mlscroll-mode: t
  server-mode: t
  evil-mode: t
  evil-local-mode: t
  +popup-mode: t
  override-global-mode: t
  general-override-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  window-divider-mode: t
  undelete-frame-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: 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
  abbrev-mode: t

Load-path shadows:
/home/st/.config/emacs/.local/straight/build-30.0.50/ivy/elpa hides /home/st/.config/emacs/.local/straight/build-30.0.50/lispy/elpa
/home/st/.config/emacs/.local/straight/build-30.0.50/ef-themes/theme-loaddefs hides /home/st/.config/emacs/.local/straight/build-30.0.50/standard-themes/theme-loaddefs
/home/st/.config/emacs/.local/straight/build-30.0.50/ef-themes/theme-loaddefs hides /home/st/.config/emacs/.local/straight/build-30.0.50/modus-themes/theme-loaddefs
/home/st/.config/emacs/.local/straight/build-30.0.50/cmake-mode/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/site-lisp/ratpoison hides /usr/share/emacs/site-lisp/ratpoison/ratpoison
/home/st/.config/emacs/.local/straight/build-30.0.50/bind-key/bind-key hides /usr/share/emacs/30.0.50/lisp/bind-key
/home/st/.config/emacs/.local/straight/build-30.0.50/jsonrpc/jsonrpc hides /usr/share/emacs/30.0.50/lisp/jsonrpc
/home/st/.config/emacs/.local/straight/build-30.0.50/ef-themes/theme-loaddefs hides /usr/share/emacs/30.0.50/lisp/theme-loaddefs
/home/st/.config/emacs/.local/straight/build-30.0.50/transient/transient hides /usr/share/emacs/30.0.50/lisp/transient
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package-bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-bind-key
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package-core hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-core
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package-delight hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-delight
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package-diminish hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-diminish
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package-ensure hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-ensure
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package-jump hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-jump
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package-lint hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-lint
/home/st/.config/emacs/.local/straight/build-30.0.50/use-package/use-package hides /usr/share/emacs/30.0.50/lisp/use-package/use-package
/home/st/.config/emacs/.local/straight/build-30.0.50/project/project hides /usr/share/emacs/30.0.50/lisp/progmodes/project
/home/st/.config/emacs/.local/straight/build-30.0.50/xref/xref hides /usr/share/emacs/30.0.50/lisp/progmodes/xref
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-C hides /usr/share/emacs/30.0.50/lisp/org/ob-C
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-awk hides /usr/share/emacs/30.0.50/lisp/org/ob-awk
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-calc hides /usr/share/emacs/30.0.50/lisp/org/ob-calc
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-clojure hides /usr/share/emacs/30.0.50/lisp/org/ob-clojure
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-core hides /usr/share/emacs/30.0.50/lisp/org/ob-core
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-ditaa hides /usr/share/emacs/30.0.50/lisp/org/ob-ditaa
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-dot hides /usr/share/emacs/30.0.50/lisp/org/ob-dot
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-emacs-lisp hides /usr/share/emacs/30.0.50/lisp/org/ob-emacs-lisp
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-eshell hides /usr/share/emacs/30.0.50/lisp/org/ob-eshell
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-exp hides /usr/share/emacs/30.0.50/lisp/org/ob-exp
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-forth hides /usr/share/emacs/30.0.50/lisp/org/ob-forth
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-gnuplot hides /usr/share/emacs/30.0.50/lisp/org/ob-gnuplot
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-haskell hides /usr/share/emacs/30.0.50/lisp/org/ob-haskell
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-julia hides /usr/share/emacs/30.0.50/lisp/org/ob-julia
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-lilypond hides /usr/share/emacs/30.0.50/lisp/org/ob-lilypond
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-lisp hides /usr/share/emacs/30.0.50/lisp/org/ob-lisp
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-lob hides /usr/share/emacs/30.0.50/lisp/org/ob-lob
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-makefile hides /usr/share/emacs/30.0.50/lisp/org/ob-makefile
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-octave hides /usr/share/emacs/30.0.50/lisp/org/ob-octave
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-perl hides /usr/share/emacs/30.0.50/lisp/org/ob-perl
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-plantuml hides /usr/share/emacs/30.0.50/lisp/org/ob-plantuml
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-processing hides /usr/share/emacs/30.0.50/lisp/org/ob-processing
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-python hides /usr/share/emacs/30.0.50/lisp/org/ob-python
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-ref hides /usr/share/emacs/30.0.50/lisp/org/ob-ref
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-ruby hides /usr/share/emacs/30.0.50/lisp/org/ob-ruby
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-R hides /usr/share/emacs/30.0.50/lisp/org/ob-R
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-comint hides /usr/share/emacs/30.0.50/lisp/org/ob-comint
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-css hides /usr/share/emacs/30.0.50/lisp/org/ob-css
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-eval hides /usr/share/emacs/30.0.50/lisp/org/ob-eval
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-fortran hides /usr/share/emacs/30.0.50/lisp/org/ob-fortran
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-groovy hides /usr/share/emacs/30.0.50/lisp/org/ob-groovy
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-java hides /usr/share/emacs/30.0.50/lisp/org/ob-java
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-latex hides /usr/share/emacs/30.0.50/lisp/org/ob-latex
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-lua hides /usr/share/emacs/30.0.50/lisp/org/ob-lua
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-matlab hides /usr/share/emacs/30.0.50/lisp/org/ob-matlab
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-maxima hides /usr/share/emacs/30.0.50/lisp/org/ob-maxima
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-ocaml hides /usr/share/emacs/30.0.50/lisp/org/ob-ocaml
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-org hides /usr/share/emacs/30.0.50/lisp/org/ob-org
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-js hides /usr/share/emacs/30.0.50/lisp/org/ob-js
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-sass hides /usr/share/emacs/30.0.50/lisp/org/ob-sass
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-scheme hides /usr/share/emacs/30.0.50/lisp/org/ob-scheme
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-screen hides /usr/share/emacs/30.0.50/lisp/org/ob-screen
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-sed hides /usr/share/emacs/30.0.50/lisp/org/ob-sed
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-shell hides /usr/share/emacs/30.0.50/lisp/org/ob-shell
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-sql hides /usr/share/emacs/30.0.50/lisp/org/ob-sql
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-sqlite hides /usr/share/emacs/30.0.50/lisp/org/ob-sqlite
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-table hides /usr/share/emacs/30.0.50/lisp/org/ob-table
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob-tangle hides /usr/share/emacs/30.0.50/lisp/org/ob-tangle
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ob hides /usr/share/emacs/30.0.50/lisp/org/ob
/home/st/.config/emacs/.local/straight/build-30.0.50/org/oc-basic hides /usr/share/emacs/30.0.50/lisp/org/oc-basic
/home/st/.config/emacs/.local/straight/build-30.0.50/org/oc-biblatex hides /usr/share/emacs/30.0.50/lisp/org/oc-biblatex
/home/st/.config/emacs/.local/straight/build-30.0.50/org/oc-bibtex hides /usr/share/emacs/30.0.50/lisp/org/oc-bibtex
/home/st/.config/emacs/.local/straight/build-30.0.50/org/oc-csl hides /usr/share/emacs/30.0.50/lisp/org/oc-csl
/home/st/.config/emacs/.local/straight/build-30.0.50/org/oc-natbib hides /usr/share/emacs/30.0.50/lisp/org/oc-natbib
/home/st/.config/emacs/.local/straight/build-30.0.50/org/oc hides /usr/share/emacs/30.0.50/lisp/org/oc
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-bbdb hides /usr/share/emacs/30.0.50/lisp/org/ol-bbdb
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-bibtex hides /usr/share/emacs/30.0.50/lisp/org/ol-bibtex
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-docview hides /usr/share/emacs/30.0.50/lisp/org/ol-docview
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-doi hides /usr/share/emacs/30.0.50/lisp/org/ol-doi
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-eshell hides /usr/share/emacs/30.0.50/lisp/org/ol-eshell
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-eww hides /usr/share/emacs/30.0.50/lisp/org/ol-eww
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-gnus hides /usr/share/emacs/30.0.50/lisp/org/ol-gnus
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-info hides /usr/share/emacs/30.0.50/lisp/org/ol-info
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-irc hides /usr/share/emacs/30.0.50/lisp/org/ol-irc
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-man hides /usr/share/emacs/30.0.50/lisp/org/ol-man
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-mhe hides /usr/share/emacs/30.0.50/lisp/org/ol-mhe
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-rmail hides /usr/share/emacs/30.0.50/lisp/org/ol-rmail
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol-w3m hides /usr/share/emacs/30.0.50/lisp/org/ol-w3m
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ol hides /usr/share/emacs/30.0.50/lisp/org/ol
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-agenda hides /usr/share/emacs/30.0.50/lisp/org/org-agenda
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-archive hides /usr/share/emacs/30.0.50/lisp/org/org-archive
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-attach-git hides /usr/share/emacs/30.0.50/lisp/org/org-attach-git
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-attach hides /usr/share/emacs/30.0.50/lisp/org/org-attach
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-capture hides /usr/share/emacs/30.0.50/lisp/org/org-capture
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-clock hides /usr/share/emacs/30.0.50/lisp/org/org-clock
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-colview hides /usr/share/emacs/30.0.50/lisp/org/org-colview
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-compat hides /usr/share/emacs/30.0.50/lisp/org/org-compat
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-crypt hides /usr/share/emacs/30.0.50/lisp/org/org-crypt
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-ctags hides /usr/share/emacs/30.0.50/lisp/org/org-ctags
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-cycle hides /usr/share/emacs/30.0.50/lisp/org/org-cycle
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-datetree hides /usr/share/emacs/30.0.50/lisp/org/org-datetree
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-duration hides /usr/share/emacs/30.0.50/lisp/org/org-duration
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-element hides /usr/share/emacs/30.0.50/lisp/org/org-element
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-entities hides /usr/share/emacs/30.0.50/lisp/org/org-entities
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-faces hides /usr/share/emacs/30.0.50/lisp/org/org-faces
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-feed hides /usr/share/emacs/30.0.50/lisp/org/org-feed
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-fold-core hides /usr/share/emacs/30.0.50/lisp/org/org-fold-core
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-fold hides /usr/share/emacs/30.0.50/lisp/org/org-fold
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-footnote hides /usr/share/emacs/30.0.50/lisp/org/org-footnote
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-goto hides /usr/share/emacs/30.0.50/lisp/org/org-goto
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-habit hides /usr/share/emacs/30.0.50/lisp/org/org-habit
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-id hides /usr/share/emacs/30.0.50/lisp/org/org-id
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-indent hides /usr/share/emacs/30.0.50/lisp/org/org-indent
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-inlinetask hides /usr/share/emacs/30.0.50/lisp/org/org-inlinetask
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-keys hides /usr/share/emacs/30.0.50/lisp/org/org-keys
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-lint hides /usr/share/emacs/30.0.50/lisp/org/org-lint
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-list hides /usr/share/emacs/30.0.50/lisp/org/org-list
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-macro hides /usr/share/emacs/30.0.50/lisp/org/org-macro
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-macs hides /usr/share/emacs/30.0.50/lisp/org/org-macs
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-mobile hides /usr/share/emacs/30.0.50/lisp/org/org-mobile
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-mouse hides /usr/share/emacs/30.0.50/lisp/org/org-mouse
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-num hides /usr/share/emacs/30.0.50/lisp/org/org-num
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-pcomplete hides /usr/share/emacs/30.0.50/lisp/org/org-pcomplete
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-persist hides /usr/share/emacs/30.0.50/lisp/org/org-persist
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-plot hides /usr/share/emacs/30.0.50/lisp/org/org-plot
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-protocol hides /usr/share/emacs/30.0.50/lisp/org/org-protocol
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-refile hides /usr/share/emacs/30.0.50/lisp/org/org-refile
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-src hides /usr/share/emacs/30.0.50/lisp/org/org-src
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-table hides /usr/share/emacs/30.0.50/lisp/org/org-table
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-tempo hides /usr/share/emacs/30.0.50/lisp/org/org-tempo
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-timer hides /usr/share/emacs/30.0.50/lisp/org/org-timer
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-version hides /usr/share/emacs/30.0.50/lisp/org/org-version
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org hides /usr/share/emacs/30.0.50/lisp/org/org
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-ascii hides /usr/share/emacs/30.0.50/lisp/org/ox-ascii
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-beamer hides /usr/share/emacs/30.0.50/lisp/org/ox-beamer
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-html hides /usr/share/emacs/30.0.50/lisp/org/ox-html
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-icalendar hides /usr/share/emacs/30.0.50/lisp/org/ox-icalendar
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-koma-letter hides /usr/share/emacs/30.0.50/lisp/org/ox-koma-letter
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-latex hides /usr/share/emacs/30.0.50/lisp/org/ox-latex
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-man hides /usr/share/emacs/30.0.50/lisp/org/ox-man
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-md hides /usr/share/emacs/30.0.50/lisp/org/ox-md
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-odt hides /usr/share/emacs/30.0.50/lisp/org/ox-odt
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-org hides /usr/share/emacs/30.0.50/lisp/org/ox-org
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-publish hides /usr/share/emacs/30.0.50/lisp/org/ox-publish
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox-texinfo hides /usr/share/emacs/30.0.50/lisp/org/ox-texinfo
/home/st/.config/emacs/.local/straight/build-30.0.50/org/ox hides /usr/share/emacs/30.0.50/lisp/org/ox
/home/st/.config/emacs/.local/straight/build-30.0.50/org/org-loaddefs hides /usr/share/emacs/30.0.50/lisp/org/org-loaddefs
/home/st/.config/emacs/.local/straight/build-30.0.50/soap-client/soap-client hides /usr/share/emacs/30.0.50/lisp/net/soap-client
/home/st/.config/emacs/.local/straight/build-30.0.50/soap-client/soap-inspect hides /usr/share/emacs/30.0.50/lisp/net/soap-inspect
/home/st/.config/emacs/.local/straight/build-30.0.50/compat/compat hides /usr/share/emacs/30.0.50/lisp/emacs-lisp/compat
/home/st/.config/emacs/.local/straight/build-30.0.50/eldoc/eldoc hides /usr/share/emacs/30.0.50/lisp/emacs-lisp/eldoc
/home/st/.config/emacs/.local/straight/build-30.0.50/seq/seq hides /usr/share/emacs/30.0.50/lisp/emacs-lisp/seq

Features:
(evil-collection-help shadow mail-extr vc-backup emacsbug tramp-cmds
parrot parrot-progress parrot-rotate apheleia apheleia-rcs
apheleia-formatters apheleia-utils apheleia-log
apheleia-formatter-context tabify evil-collection-evil-mc evil-mc
evil-mc-command-execute evil-mc-command-record evil-mc-cursor-make
evil-mc-region evil-mc-cursor-state evil-mc-undo evil-mc-vars
evil-mc-known-commands evil-mc-common evil-collection-indent misearch
multi-isearch isearch-mb anzu backline yasnippet-capf midnight
evil-collection-debbugs debbugs soap-client rng-xsd xsd-regexp pomm
alert gntp evil-collection-leetcode leetcode log4e graphql mm-url
elisp-demos info-colors evil-collection-helpful helpful cc-langs cc-vars
cc-defs trace cl-print info-look evil-collection-info info
evil-collection-elisp-refs elisp-refs password-generator lorem-ipsum
zone-nyan esxml zone-rainbow zone-matrix snow flames-of-freedom
fireplace klondike dunnet bubbles evil-collection-tetris tetris
speed-type evil-collection-snake snake gamegrid neato-graph-bar
evil-collection-daemons daemons evil-collection-disk-usage disk-usage
pulseaudio-control evil-collection-trashed trashed helm-rage helm-utils
helm-linux-disks linux-disk helm-system-packages consult-gh lsp-ui
lsp-ui-flycheck lsp-ui-doc evil-collection-lsp-ui-imenu lsp-ui-imenu
lsp-ui-peek lsp-ui-sideline lsp-ui-util dap-mouse dap-ui lsp-treemacs
lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib gdb-mi gud bui
bui-list bui-info bui-entry bui-core bui-history bui-button bui-utils
lsp-lens dap-mode dap-tasks dap-launch lsp-docker dap-overlays lsp-mode
lsp-protocol spinner network-stream treemacs-magit treemacs-persp
treemacs-projectile treemacs-evil treemacs-nerd-icons treemacs
treemacs-header-line treemacs-compatibility treemacs-mode
treemacs-bookmarks treemacs-tags treemacs-interface treemacs-persistence
treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering
treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom
treemacs-visuals treemacs-fringe-indicator treemacs-faces treemacs-icons
treemacs-scope treemacs-themes treemacs-core-utils pfuture
treemacs-logging treemacs-customization treemacs-macros pdf-occur
evil-collection-tablist tablist tablist-filter semantic/wisent/comp
semantic/wisent semantic/wisent/wisent pdf-isearch pdf-misc
evil-collection-pdf pdf-history pdf-tools saveplace-pdf-view pdf-view
pdf-cache pdf-info pdf-util pdf-macs image-mode exif gnus-srvr
chatgpt-shell shell-maker goto-addr ielm greader evil-collection-view
view greader-espeak whisper org-ai org-ai-oobabooga websocket org-ai-sd
org-ai-talk org-ai-on-project org-ai-useful org-ai-openai-image
org-ai-openai org-ai-block helm-emms helm-adaptive diff-hl-flydiff
emms-setup emms-mpris emms-librefm-stream emms-librefm-scrobbler
emms-playlist-limit emms-i18n emms-history emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon
emms-browser sort emms-volume emms-volume-sndioctl emms-volume-mixerctl
emms-volume-pulse emms-volume-amixer emms-playlist-sort emms-player-xine
emms-player-mpd emms-playing-time emms-lyrics emms-url
emms-player-simple emms-streams emms-show-all emms-tag-editor
emms-tag-tracktag emms-mark emms-mode-line emms-info-tinytag
emms-info-metaflac emms-info-opusinfo emms-info-ogginfo
emms-info-mp3info emms-playlist-mode emms-source-playlist
emms-source-file locate emms-info-exiftool emms-info-native
emms-info-native-spc emms-info-native-mp3 emms-info-native-ogg
emms-info-native-opus emms-info-native-flac emms-info-native-vorbis
bindat emms-last-played emms-score emms-cache emms-info emms-later-do
evil-collection-emms emms emms-compat tramp-cache time-stamp
vertico-directory mb-depth vertico-repeat tramp-archive tramp-gvfs
helm-external helm-net helm-help evil-collection-mpc mpc elfeed-tube-mpv
mpv tq org-timer org-clock elfeed-tube elfeed-tube-utils aio elfeed-org
evil-collection-elfeed elfeed-show elfeed-search elfeed-csv elfeed
elfeed-curl elfeed-log elfeed-db elfeed-lib url-queue xml-query empv
iimage consult-flycheck evil-collection-consult consult helm
helm-global-bindings helm-easymenu helm-core async-bytecomp helm-source
helm-multi-match helm-lib org-msg ox-odt rng-loc rng-uri rng-parse
rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok
nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox
htmlize gnus-icalendar icalendar diary-lib diary-loaddefs gnus-dired
evil-collection-mu4e mu4e mu4e-org mu4e-notification notifications
mu4e-main mu4e-view mu4e-headers mu4e-compose mu4e-draft mu4e-actions
smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message
flow-fill mu4e-contacts mu4e-update mu4e-folders mu4e-context
mu4e-query-items mu4e-server mu4e-modeline mu4e-vars mu4e-helpers
mu4e-window mu4e-obsolete evil-collection-vterm vterm magit-bookmark
evil-collection-bookmark bookmark vterm-module em-rebind em-elecslash
em-alias em-term em-script em-ls em-hist em-glob em-extpipe em-cmpl
em-basic em-banner em-smart em-tramp eshell-did-you-mean esh-help
evil-collection-man man em-unix eshell-z em-dirs evil-collection-eshell
em-prompt eshell esh-mode esh-var eat term/xterm xterm
evil-collection-term term ehelp esh-cmd esh-ext esh-opt esh-proc esh-io
esh-arg theme-magic esh-module esh-groups ewal esh-util cal-julian
circadian solar cal-dst auto-sudoedit tramp-sh zone tramp trampver
tramp-message org-agenda tramp-integration abridge-diff
evil-collection-magit-todos magit-todos async code-review
code-review-actions code-review-comment code-review-section
code-review-bitbucket code-review-faces emojify evil-collection-apropos
apropos evil-collection-tar-mode tar-mode evil-collection-arc-mode
arc-mode archive-mode ht code-review-gitlab code-review-utils
evil-collection-forge forge-list hl-line forge-commands forge-semi
forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab
forge-github forge-notify forge-revnote forge-pullreq forge-issue
forge-topic yaml bug-reference forge-post smartparens-markdown
evil-collection-markdown-mode markdown-mode edit-indirect forge-repo
forge forge-core forge-db code-review-parse-hunk code-review-github
code-review-db uuidgen calc-misc calc-ext calc calc-loaddefs calc-macs a
code-review-interfaces deferred ghub-graphql treepy gsexp ghub url-http
url-gw nsm url-auth closql magit-autoloads evil-collection-magit
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
files-x magit-repos magit-apply tramp-compat tramp-loaddefs
doom-snippets doom-snippets-lib yasnippet nerd-icons-corfu dabbrev
cape-char winum face-remap mule-util evil-collection-vc-git vc-git
evil-collection-diff-hl diff-hl evil-collection-log-view log-view
evil-collection-vc-dir vc-dir ewoc vc vc-dispatcher auto-minor-mode
disp-table whitespace flycheck-cask git-auto-commit-mode
highlight-quoted rainbow-delimiters outline-minor-faces recentf
tree-widget saveplace evil-collection-so-long so-long envrc inheritenv
magit-wip magit-log which-func magit-diff smerge-mode diff
evil-collection-diff-mode diff-mode git-commit evil-collection-log-edit
log-edit pcvs-util add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor shell magit-mode transient
magit-git magit-base crm beacon wakatime-ui wakatime-mode savehist
better-jumper vertico-multiform vertico-mouse evil-collection-vertico
vertico orderless nerd-icons-completion marginalia corfu-history
corfu-popupinfo evil-collection-corfu corfu evil-goggles evil-easymotion
evil-snipe evil-owl repeat restore-point indent-aux aas
evil-collection-beginend beginend gcmh winner undo-fu-session undo-fu
flycheck-posframe posframe evil-collection-flymake flymake
flycheck-package package-lint evil-collection-finder finder finder-inf
evil-collection-flycheck flycheck embrace lispyville hercules
evil-collection-which-key which-key lispy delsel lispy-inline avy etags
fileloop evil-collection-xref xref evil-collection-edebug edebug
evil-collection-debug debug backtrace help-fns radix-tree lispy-tags
zoutline semantic/db semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet
evil-collection-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff
ediff-help ediff-init ediff-util iedit iedit-lib the-org-mode-expansions
evil-collection-org evil-collection-org-roam org-roam-migrate
org-roam-log org-roam-mode org-roam-capture org-roam-id org-roam-node
org-roam-db emacsql-sqlite-builtin sqlite org-roam-utils org-roam-compat
org-roam org-capture org-attach emacsql-sqlite emacsql-sqlite-common
emacsql emacsql-compiler evil-collection-magit-section magit-section
cursor-sensor smartparens-org org-yt org-element org-persist xdg org-id
org-refile avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table
ob-exp org-macro org-src smartparens-config smartparens-text smartparens
loadhist evil-collection-sh-script sh-script smie treesit executable
ob-comint org-pcomplete pcomplete org-list org-footnote org-faces
org-entities noutline outline org-element-ast inline ob-emacs-lisp
org-table ol org-keys oc org-loaddefs evil-collection-calendar cal-menu
calendar cal-loaddefs spam spam-stat gnus-uu yenc gnus-msg gnus-registry
registry eieio-base nice-citation gnus-cite gnus-art mm-uu mml2015
mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku
url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601
gnus-spec gnus-int gnus-range gnus-win message sendmail yank-media puny
evil-collection-dired dired dired-loaddefs rfc822 mml mml-sec
evil-collection-epa epa epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader evil-collection-gnus gnus nnheader gnus-util
mail-utils range mm-util mail-prsvr eros nameless pcre2el rxt re-builder
breadcrumb pulse color evil-collection-imenu imenu vi-tilde-fringe
highlight-numbers parent-mode display-line-numbers cape hl-todo
hide-mode-line eldoc-box copilot copilot-balancer f projectile project
evil-collection-grep grep ibuffer-vc ibuf-ext evil-collection-ibuffer
ibuffer ibuffer-loaddefs dash s jsonrpc evil-collection-elisp-mode
elisp-mode lisp-mnt find-func jka-compr fancy-compilation
evil-collection-compile compile text-property-search
evil-collection-comint comint ansi-osc ws-butler editorconfig
evil-collection-package-menu evil-collection-custom cus-edit cus-start
cus-load wid-edit evil-collection annalist doom-packages ansi-color
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 password-cache json map url-vars
editorconfig-core editorconfig-core-handle editorconfig-fnmatch
yank-indent exwm-mff hydra lv autorevert filenotify time-date 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 persp-mode minions
compat dtrt-indent modus-operandi-tinted-theme modus-themes
define-repeat-map expand-region-improved expand-region
text-mode-expansions er-basic-expansions expand-region-core
expand-region-custom mlscroll exwm-firefox-evil exwm-firefox-core
exwm-evil exwm-evil-core exwm-config ido exwm-systemtray xcb-systemtray
xcb-xembed exwm-randr xcb-randr exwm exwm-input xcb-keysyms xcb-xkb
exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types
xcb-debug eieio eieio-core server mu4e-config html2text smartparens-lua
let-alist ob-core org-cycle org-fold org-fold-core org-compat ob-eval
org-version org-macs format-spec ibuf-macs evil evil-integration
evil-maps evil-commands reveal evil-jumps evil-command-window evil-types
evil-search evil-macros evil-repeat evil-states evil-core advice
evil-common thingatpt rect evil-vars ring derived edmacro kmacro
byte-opt use-package-bind-key bind-key easy-mmode comp comp-cstr
warnings icons comp-run comp-common doom-editor doom-projects doom-ui
doom-keybinds pp cl-extra help-mode use-package-core bytecomp
byte-compile general realgud-recursive-autoloads tex-site rx site-gentoo
doom-start :system doom-modules cl-seq doom doom-lib cl-macs cl-loaddefs
cl-lib gv harfbuzz jansson dynamic-modules pcase subr-x rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type 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 font-render-setting cairo
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
native-compile emacs)

Memory information:
((conses 16 2863434 1894835) (symbols 48 148148 67) (strings 32 431770 83326)
 (string-bytes 1 15453565) (vectors 16 160167) (vector-slots 8 2531637 364216)
 (floats 8 2804 12456) (intervals 56 15408 3072) (buffers 984 41))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69306; Package emacs. (Thu, 22 Feb 2024 06:42:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: StrawberryTea <look <at> strawberrytea.xyz>
Cc: 69306 <at> debbugs.gnu.org
Subject: Re: bug#69306: 30.0.50;
 defining menu-items with :enable enables them unconditionally
Date: Thu, 22 Feb 2024 08:41:15 +0200
> From: StrawberryTea <look <at> strawberrytea.xyz>
> Date: Wed, 21 Feb 2024 17:26:02 -0600
> 
> Hi. I am not sure if I open a vanilla Emacs session and evaluate:
> (defvar hello nil)
> (setq hello nil)
> (define-key global-map (kbd "C-M-S-f") '(menu-item "" delete-backward-char :enable hello))
> 
> and then press C-M-S-f, the delete-backward-char menu item will be
> enabled, even though hello is nil.

Enabled where?  After evaluating the above, I don't see your menu item
anywhere (since it is not added to any existing menu, I guess?), so
I'm not sure what you are describing here.  Is some step missing from
the recipe?  Can you show a full recipe starting from "emacs -Q"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69306; Package emacs. (Thu, 22 Feb 2024 21:25:01 GMT) Full text and rfc822 format available.

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

From: StrawberryTea <look <at> strawberrytea.xyz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69306 <at> debbugs.gnu.org
Subject: Re: bug#69306: 30.0.50; defining menu-items with :enable enables
 them unconditionally
Date: Thu, 22 Feb 2024 15:19:26 -0600
[Message part 1 (text/plain, inline)]
Basically, I am trying to define a conditional keybinding. The real-world
example I’m working with is:

(when-let ((cmds-del (and (modulep! :completion corfu +tng)
                          ’(menu-item “Reset completion” corfu-reset
                            :enable (and (> corfu–index -1)
                                         (eq corfu-preview-current ’insert)))))
           (cmds-ret ’(menu-item “Insert completion” corfu-insert
                       :filter (lambda (cmd)
                                 (if (eq corfu–index -1)
                                     (corfu-quit)
                                   cmd)))))
  (map! :when (modulep! :completion corfu)
        :after corfu
        :map corfu-map
        [backspace] cmds-del
        “DEL” cmds-del
        :ig [return] cmds-ret
        :ig “RET” cmds-ret))

Here, the :filter and :enable properties are used to conditionally enable their
respective keybindings. The :filter property works as expected, but the :enable
property does not. The backspace keybinding is always enabled, even when the
:enable property is evaluates to nil.

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: StrawberryTea <look <at> strawberrytea.xyz>
>> Date: Wed, 21 Feb 2024 17:26:02 -0600
>>
>> Hi. I am not sure if I open a vanilla Emacs session and evaluate:
>> (defvar hello nil)
>> (setq hello nil)
>> (define-key global-map (kbd “C-M-S-f”) ’(menu-item “” delete-backward-char :enable hello))
>>
>> and then press C-M-S-f, the delete-backward-char menu item will be
>> enabled, even though hello is nil.
>
> Enabled where?  After evaluating the above, I don’t see your menu item
> anywhere (since it is not added to any existing menu, I guess?), so
> I’m not sure what you are describing here.  Is some step missing from
> the recipe?  Can you show a full recipe starting from “emacs -Q”?

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69306; Package emacs. (Fri, 23 Feb 2024 07:41:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: StrawberryTea <look <at> strawberrytea.xyz>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 69306 <at> debbugs.gnu.org
Subject: Re: bug#69306: 30.0.50; defining menu-items with :enable enables
 them unconditionally
Date: Fri, 23 Feb 2024 09:23:45 +0200
> From: StrawberryTea <look <at> strawberrytea.xyz>
> Cc: 69306 <at> debbugs.gnu.org
> Date: Thu, 22 Feb 2024 15:19:26 -0600
> 
> Basically, I am trying to define a conditional keybinding. The real-world
> example I’m working with is:
> 
> (when-let ((cmds-del (and (modulep! :completion corfu +tng)
>                           ’(menu-item “Reset completion” corfu-reset
>                             :enable (and (> corfu–index -1)
>                                          (eq corfu-preview-current ’insert)))))
>            (cmds-ret ’(menu-item “Insert completion” corfu-insert
>                        :filter (lambda (cmd)
>                                  (if (eq corfu–index -1)
>                                      (corfu-quit)
>                                    cmd)))))
>   (map! :when (modulep! :completion corfu)
>         :after corfu
>         :map corfu-map
>         [backspace] cmds-del
>         “DEL” cmds-del
>         :ig [return] cmds-ret
>         :ig “RET” cmds-ret))
> 
> Here, the :filter and :enable properties are used to conditionally enable their
> respective keybindings. The :filter property works as expected, but the :enable
> property does not. The backspace keybinding is always enabled, even when the
> :enable property is evaluates to nil.

If you expect that the key binding will be disabled via :enable, then
I don't think this is supported except in menus (and tool bars and tab
bars): the value is evaluated by the menu-related code, when it
actually displays the menu, and in your case there's no menu.  The
:filter attribute is interpreted differently, so it just happens to
work.  But that's sheer luck, I'd say.

Adding Stefan in case he has comments.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69306; Package emacs. (Fri, 23 Feb 2024 12:33:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69306 <at> debbugs.gnu.org, StrawberryTea <look <at> strawberrytea.xyz>
Subject: Re: bug#69306: 30.0.50; defining menu-items with :enable enables
 them unconditionally
Date: Fri, 23 Feb 2024 07:23:19 -0500
> If you expect that the key binding will be disabled via :enable, then
> I don't think this is supported except in menus (and tool bars and tab
> bars): the value is evaluated by the menu-related code, when it
> actually displays the menu, and in your case there's no menu.  The
> :filter attribute is interpreted differently, so it just happens to
> work.  But that's sheer luck, I'd say.

Indeed, the `:enable` thingy controls only whether the entry is present
in the (a) menu, whereas the `:filter` is obeyed by the keymap lookup code.

We could treat this as a feature request to make the keymap lookup code
obey `:enable` as well.  I remember thinking about doing it.  I can't
remember whether that would be easy to do but I can't think of a good
reason why it wouldn't be.


        Stefan





This bug report was last modified 71 days ago.

Previous Next


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