From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#67836: 29.1.90; map-y-or-n-p doesn't terminate when run in a kmacro in batch mode Date: Fri, 15 Dec 2023 10:38:47 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36496"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier To: 67836@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 15 16:40:27 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rEAId-0009EP-4v for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Dec 2023 16:40:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEAIJ-0000Uu-Tm; Fri, 15 Dec 2023 10:40:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEAIG-0000Ua-Ph for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 10:40:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEAIE-0007jl-RY for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 10:40:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEAIE-0005Cx-ID for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 10:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2023 15:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67836 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170265474519945 (code B ref -1); Fri, 15 Dec 2023 15:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Dec 2023 15:39:05 +0000 Original-Received: from localhost ([127.0.0.1]:53370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEAHI-0005Bc-Bj for submit@debbugs.gnu.org; Fri, 15 Dec 2023 10:39:05 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:49820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEAHF-0005B3-Sg for submit@debbugs.gnu.org; Fri, 15 Dec 2023 10:39:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEAH4-0000AJ-JX for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 10:38:50 -0500 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEAH2-0007a1-Fu for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 10:38:50 -0500 Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276274 Archived-At: 1. Create a file "broken.el" containing: (defun broken () (map-y-or-n-p "" #'ignore '(1))) (execute-kbd-macro (read-kbd-macro "M-: (broken) RET")) 2. emacs -Q -l ./broken.el 3. Emacs properly executes the keyboard macro and errors. 4. emacs -Q --batch -l ./broken.el 5. Notice Emacs infinite loops, printing the map-y-or-n-p prompt repeatedly. map-y-or-n-p in a keyboard macro terminates in non-batch Emacs because it calls (ding), which terminates the currently running keyboard macro. However, (ding) doesn't terminate keyboard macros in batch mode. This seems to just be an oversight. A patch to fix this by making (ding) always terminate keyboard macros will follow. (BTW, when not running in a keyboard macro, map-y-or-n-p will error in batch Emacs, but only because of a separate bug where it runs (listp last-nonmenu-event) to decide whether to use menus, which returns true since last-nonmenu-event is nil. I may fix this separately.) In GNU Emacs 29.1.90 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2023-11-20 built on igm-qws-u22796a Repository revision: dd8669b14b8a2b9a6d214a9d142dd8ac604f83d2 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Rocky Linux 8.9 (Green Obsidian) Configured using: 'configure --config-cache --with-x-toolkit=lucid --with-gif=ifavailable' Configured features: CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: global-undo-tree-mode: t bug-reference-prog-mode: t delete-selection-mode: t global-so-long-mode: t pixel-scroll-precision-mode: t jane-fe-minor-mode: t jane-fe-jenga-minor-mode: t editorconfig-mode: t which-function-mode: t global-git-commit-mode: t magit-auto-revert-mode: t auto-revert-mode: t shell-dirtrack-mode: t server-mode: t windmove-mode: t savehist-mode: t save-place-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Features: (shadow emacsbug make-mode finder lisp-mnt autoinsert etags org-agenda pcmpl-gnu canlock nndraft nnmh nnfolder term ehelp cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs flow-fill shr-color qp smiley gnus-cite gnus-async gnus-bcklg gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-ml gnus-msg disp-table nndoc gnus-cache gnus-dup mm-archive debbugs-gnu debbugs-compat debbugs soap-client rng-xsd rng-dt rng-util xsd-regexp two-column evil-tests evil-test-helpers evil evil-integration undo-tree evil-maps evil-commands evil-jumps evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core evil-common cl evil-digraphs elp evil-vars latexenc fileloop textsec uni-scripts idna-mapping uni-confusable textsec-check mail-extr wdired doctor xscheme scheme apropos tramp-adb tramp-archive tramp-cmds tramp-container tramp-ftp tramp-gvfs tramp-sh tramp-cache time-stamp emoji-labels emoji multisession sqlite comp comp-cstr info-look flyspell ispell pcmpl-unix emacs-news-mode reposition mode-local hippie-exp vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc-dir cus-start sql log-view vc-fe vc-hg vc magit-imenu git-rebase vc-git vc-dispatcher face-remap hl-line display-line-numbers tabify man misc dired-aux rect sort sh-script treesit thai-util thai-word ucs-normalize mule-util completion dabbrev external-completion org-element org-persist org-id org-refile avl-tree generator oc-basic ol-eww eww xdg 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 kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi jane-aide cl-print misearch multi-isearch pulse bug-reference shortdoc help-fns radix-tree executable url-http-ntlm ntlm hmac-md5 hex-util md4 network-stream url-cache url-http url-gw nsm codeium find-dired goto-addr let-alist delsel so-long jane-fe-read-feature pixel-scroll cua-base tramp tramp-loaddefs trampver tramp-integration tramp-compat parse-time iso8601 ffap jane-merlin merlin-imenu merlin-xref merlin-cap merlin jane-async-merlin jane-completion grep jane-common site-start jane-customization jane-comint org-protocol jane-fe-project xref files-x jane-fe-menu ecaml_plugin view gopcaml magit-bookmark bookmark image+ advice image-file image-converter editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch whitespace jane-auto-modes vba-mode markdown-mode color jane jane-yasnippet jane-micro-features ert ewoc debug backtrace jane-diff unified-test-mode shell-file core core-buffer core-error jane-sexp jane-python jane-ocaml jane-tuareg-theme tuareg tuareg-compat tuareg-opam skeleton flymake-proc flymake warnings thingatpt smie caml-types caml-help caml-emacs find-file compile jane-cr jane-codeium jane-align jane-deprecated jane-smerge gnu-elpa-keyring-update jane-ocp-indent ocp-indent jane-eglot yasnippet-autoloads swiper-autoloads htmlize-autoloads eglot-autoloads editorconfig-autoloads codeium-autoloads jane-autoloads jane-util ob-shell page-ext dired-x magit-extras project magit-submodule magit-obsolete 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 which-func imenu magit-diff smerge-mode diff diff-mode git-commit log-edit message sendmail yank-media puny dired dired-loaddefs 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 pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor shell server magit-mode transient edmacro kmacro magit-git magit-section magit-utils crm dash gnus nnheader gnus-util text-property-search mail-utils range mm-util mail-prsvr cl-extra help-mode windmove org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities time-date noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol rx org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs format-spec gdb-mi bindat gud easy-mmode comint ansi-osc ansi-color ring vundo modus-vivendi-theme modus-themes pcase savehist saveplace cus-edit pp cus-load icons wid-edit adaptive-wrap-autoloads csv-mode-autoloads cyberpunk-theme-autoloads evil-autoloads exwm-autoloads helm-autoloads helm-core-autoloads async-autoloads ivy-autoloads magit-autoloads git-commit-autoloads finder-inf magit-section-autoloads dash-autoloads popup-autoloads url-http-ntlm-autoloads url-auth vc-hgcmd-autoloads vundo-autoloads info with-editor-autoloads xelb-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 password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 3200047 267481) (symbols 48 76910 1) (strings 32 371340 77106) (string-bytes 1 16177813) (vectors 16 163678) (vector-slots 8 3169215 359463) (floats 8 850 969) (intervals 56 550774 4661) (buffers 976 591))