From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#66998: 29.1; Regression for recursive keyboard macros + minibuffers in (I think) Emacs 28 Date: Wed, 8 Nov 2023 12:53:13 +0000 Message-ID: References: <83msvo1kwn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16441"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66998@debbugs.gnu.org, Morgon Kanter To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 08 13:54:52 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 1r0i54-0003z6-LT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Nov 2023 13:54:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0i4i-0000Xk-RW; Wed, 08 Nov 2023 07:54:29 -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 1r0i4f-0000Wh-Hf for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 07:54:25 -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 1r0i4d-0002CK-CT for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 07:54:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0i5F-0005aC-JI for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 07:55:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Nov 2023 12:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66998 X-GNU-PR-Package: emacs Original-Received: via spool by 66998-submit@debbugs.gnu.org id=B66998.169944804521385 (code B ref 66998); Wed, 08 Nov 2023 12:55:01 +0000 Original-Received: (at 66998) by debbugs.gnu.org; 8 Nov 2023 12:54:05 +0000 Original-Received: from localhost ([127.0.0.1]:44187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0i4K-0005Yr-Vk for submit@debbugs.gnu.org; Wed, 08 Nov 2023 07:54:05 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:12670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0i4G-0005YG-Gy for 66998@debbugs.gnu.org; Wed, 08 Nov 2023 07:54:03 -0500 Original-Received: (qmail 62127 invoked by uid 3782); 8 Nov 2023 13:53:14 +0100 Original-Received: from acm.muc.de (p4fe1584b.dip0.t-ipconnect.de [79.225.88.75]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 08 Nov 2023 13:53:14 +0100 Original-Received: (qmail 19838 invoked by uid 1000); 8 Nov 2023 12:53:13 -0000 Content-Disposition: inline In-Reply-To: <83msvo1kwn.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:273983 Archived-At: Hello, Eli. On Wed, Nov 08, 2023 at 14:36:56 +0200, Eli Zaretskii wrote: > > From: Morgon Kanter > > Date: Tue, 7 Nov 2023 22:29:22 -0500 > > I believe there is a regression, but possibly intentional, caused by this patch: > > https://github.com/emacs-mirror/emacs/commit/203e61ff837128b397eb313a5bb1b703f0eae0ec > > This affects minibuffers created when (kbd-macro-query t) is called as > > part of the hook that runs when the (read-from-minibuffer) function is > > called. You get the error message "Not in most nested command loop". For > > example, this code here: > > https://www.emacswiki.org/emacs/KeyboardMacros#h5o-5 > > Or, pasting the code in question: > > (defun my-macro-query (arg) > > "Prompt for input using minibuffer during kbd macro execution. > > With prefix argument, allows you to select what prompt string to use. > > If the input is non-empty, it is inserted at point." > > (interactive "P") > > (let* ((prompt (if arg (read-from-minibuffer "PROMPT: ") "Input: ")) > > (input (minibuffer-with-setup-hook (lambda () (kbd-macro-query t)) > > (read-from-minibuffer prompt)))) > > (unless (string= "" input) (insert input)))) > > (global-set-key (kbd "C-x Q") 'my-macro-query) > > If you attempt to start a keyboard macro via F3, then attempt to read a > > minibuffer with the above code via C-x Q, upon pressing ENTER to close > > the minibuffer, you get the following error message: > > "Not in most nested command loop" > > You won't be able to close out the minibuffer, the only way I found to > > proceed was to C-] or multiple escapes, which canceled the keyboard > > macro creation. As a result, it appears we can't use the above method to > > read and set variables during keyboard macro creation. I'm not sure if > > this is intentional or not, or if there's a replacement for the above or > > not. But it appears to be a regression from before that series of patches. > Alan, can you please look into this? Will do. -- Alan Mackenzie (Nuremberg, Germany).