From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66998: 29.1; Regression for recursive keyboard macros + minibuffers in (I think) Emacs 28 Date: Wed, 08 Nov 2023 14:36:56 +0200 Message-ID: <83msvo1kwn.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10400"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66998@debbugs.gnu.org To: Morgon Kanter , Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 08 13:37:34 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 1r0hoM-0002U7-I2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Nov 2023 13:37:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0hoE-0004ET-EV; Wed, 08 Nov 2023 07:37:26 -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 1r0hoC-0004CL-AP for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 07:37:24 -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 1r0hoC-0007HF-2G for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 07:37:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0hoo-00055m-Hn for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 07:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Nov 2023 12:38:02 +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.169944707319558 (code B ref 66998); Wed, 08 Nov 2023 12:38:02 +0000 Original-Received: (at 66998) by debbugs.gnu.org; 8 Nov 2023 12:37:53 +0000 Original-Received: from localhost ([127.0.0.1]:44179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0hoe-00055O-UJ for submit@debbugs.gnu.org; Wed, 08 Nov 2023 07:37:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0hod-00055C-BL for 66998@debbugs.gnu.org; Wed, 08 Nov 2023 07:37:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0hnu-0007Fe-VZ; Wed, 08 Nov 2023 07:37:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Fs4biMNtyW+pp0KCRtKNDDfUTGzKjS4rBKRyxqlE9Rs=; b=pnwgTNbjTaM7 IVd53AH8Rn+LJrc51JUExJIethpv+0pAqbCLIAHxnI1HPDqeqWNlCWR834lyOqRRDAG5JmbtY7Pwh 5THJXOEZPvHKq82XvoIlulDS2fHltubZuJNGRLtawReFXhdThR/vek1u2EKVfZ3XTuHWaFThF89qA 9lAfpFFsNvAeQYFI0bXPR7ukGHEOglv8KPaeHZTmekrE8UoADNCMZXgOufX/X3cZN4BRMkabSaPj/ 6LfJF8wKp2w9yOnnyKmtBJErjHHwSJW9YnXFZAaAm978Y6vDc2jbCCQtTMsfCnKngQroLEahWwHXj cRUT2J2FERuFPeLwy1djzQ==; In-Reply-To: (message from Morgon Kanter on Tue, 7 Nov 2023 22:29:22 -0500) 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:273982 Archived-At: > 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?