From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#48603: 27.2; [PATCH] Quit minibuffers without aborting kmacros Date: Tue, 07 Sep 2021 17:11:11 +0200 Message-ID: <875yvcl8ts.fsf@miha-pc> References: <86eedx7c0u.fsf@miha-pc> <877djmegh8.fsf@gnus.org> <86r1hu4hws.fsf@miha-pc> <877dhlf9ex.fsf@gnus.org> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35701"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48603@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 07 17:15:40 2021 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 1mNcp1-00099W-SR for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Sep 2021 17:15:39 +0200 Original-Received: from localhost ([::1]:47816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNcp0-0005RM-Lm for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Sep 2021 11:15:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNcic-0001YX-Hp for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 11:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNcic-0006vN-8c for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 11:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNcic-0006OW-3P for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 11:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Sep 2021 15:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48603 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48603-submit@debbugs.gnu.org id=B48603.163102729124499 (code B ref 48603); Tue, 07 Sep 2021 15:09:02 +0000 Original-Received: (at 48603) by debbugs.gnu.org; 7 Sep 2021 15:08:11 +0000 Original-Received: from localhost ([127.0.0.1]:57327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNchm-0006N5-S9 for submit@debbugs.gnu.org; Tue, 07 Sep 2021 11:08:11 -0400 Original-Received: from kamnitnik.top ([209.250.245.214]:39946 helo=mail.kamnitnik.top) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNchl-0006Mw-4q for 48603@debbugs.gnu.org; Tue, 07 Sep 2021 11:08:09 -0400 Original-Received: from localhost (unknown [IPv6:2a00:ee2:e04:9300:e18:5d33:4bd1:d3a4]) by mail.kamnitnik.top (Postfix) with ESMTPSA id A79BCBCF6B; Tue, 7 Sep 2021 15:08:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1631027287; bh=O0wWKBpdmErwOY+5FSN+j42lpsw+D97CIewy0wTo7Sk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RqX9kDOzzF5wALWq79lDHs3EaJKin7kh5PmGZPW4UhMUQepWt2oon5YLlMXi89mo8 J6xzI03HtCGTN/lqqno6UeDGoFCH88UBlS26mzm/F1XcGb+/bVzJWbVL9LU8MxsvHr RKFpG7JjoEuM2XbNmqFemVm9DgvfCfnlWqV7clH62M/sUMURLZkAyPH4eDb2we2eEP FBlWB/KS46eyoLor9EmiJJlvPdU3Ivv+deFLdgKMUWFZxQPepxxG1T7yAEb/mbMvLJ FYAGSWrevOrzou7j1G3f1aKg4hz3f9cpvWU/X2o4IVjwdYGZEs8leuu7hevAGmjSh/ fxGoXbM78tKgA== In-Reply-To: <877dhlf9ex.fsf@gnus.org> 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" Xref: news.gmane.io gmane.emacs.bugs:213695 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > writes: > >> Good idea, attaching a revised patch (which also adds two NEWS entries.) > > Sorry; I forgot all about this. I've now re-read and tested the patch, > and it seems to work fine for me, so I've pushed it to Emacs 28. After some testing, I found out that we can't record kmacros that end with C-g in the minibuffer. For example, trying to record a kmacro like "C-n M-x C-g" will actually record only "C-n". Please consider the attached patch to fix this. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Allow-kmacros-to-end-with-C-g-in-minibuffer.patch Content-Transfer-Encoding: quoted-printable From=201fc801cde2cd0a7c557fdb3d4e1593eaa85518f8 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Miha=3D20Rihtar=3DC5=3DA1i=3DC4=3D8D?=3D Date: Tue, 7 Sep 2021 16:55:22 +0200 Subject: [PATCH] Allow kmacros to end with C-g in minibuffer * src/keyboard.c (cmd_error): If a command causes a minibuffer-quit condition, record its key in a keyboard macro. =2D-- src/keyboard.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index f6139b30e7..a32c3e7b2b 100644 =2D-- a/src/keyboard.c +++ b/src/keyboard.c @@ -951,6 +951,10 @@ cmd_error (Lisp_Object data) Vexecuting_kbd_macro =3D Qnil; executing_kbd_macro =3D Qnil; } + else if (!NILP (KVAR (current_kboard, defining_kbd_macro))) + /* A command that signals a minibuffer-quit condition should be + installed in kbd macro. */ + finalize_kbd_macro_chars (); =20 specbind (Qstandard_output, Qt); specbind (Qstandard_input, Qt); =2D-=20 2.33.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmE3gQ8THG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP7z3D/9L/spW6bdChI/pYlZQbbJZ46nkp4TL aniJZg1tjI5Gp4H7dqaa33UsjsFqJfDasl7yFvj7Do9CbdhM3Chiw8S3lYTdmI1u 6PQTOxCqnACxiJBs6zzBXxdDb0Cw40RJDvWebBSd+9GX2M8LYQQCm8DU2NzjrFYh dM6qaY7EUauN1uPBdGKrQvi8PTONEkGmBh7Gm/wozc7/75wUEf1G/cMr6ESMQTNu 2Nggh7fdArssd79yobDXKXC9e35I7scCCkPev3QDgYhGb59hJotCbMUMDNm0ULq2 qkIXTVHvhgYzY2Z9qkGN9sgrNFFjII1DeswmPL72bPf/VbGkyUnLkgFVeM5ktTr5 bT8p3EjdfWAV+B3NYARjCSzo0dN8dC/ShMvonMAVkpbHHGSenWMUpLrn5MrqXCQ+ z0+pDhK74F3yPYz4PTk8LLTfhTzXm2EfpUJ5H29gIK8QmWnohWcTvz4dY7n5EAoT N6LvH+JN1cqVELmWmOgQrb4nKHvYVCLJUCq4qNFYahhgNRaXi9qS1/P/krmE3YmQ IherfUsb6a0t7Cqkd+2N/oAi4szRHr/lprGX3oEiSXsQ4AN5zPC9mFkB8MPPNoFf AA+9vQlGG7M1qBg8UydR/R87eiA0QWOQOrSzDXa/p8bKKvVHhioM0PMH9ldONN3N arfzaYBghrs2PA== =70bo -----END PGP SIGNATURE----- --==-=-=--