From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 17:55:43 -0500 Message-ID: References: <83msubo2vw.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30327"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Spencer Baugh , 67836@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 15 23:56:29 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 1rEH6a-0007do-Tm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Dec 2023 23:56:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEH6C-0004n8-SA; Fri, 15 Dec 2023 17:56:04 -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 1rEH6B-0004mu-6R for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 17:56:03 -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 1rEH6A-0005UH-SP for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 17:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEH6A-0007dp-GC for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 17:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2023 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67836 X-GNU-PR-Package: emacs Original-Received: via spool by 67836-submit@debbugs.gnu.org id=B67836.170268095429351 (code B ref 67836); Fri, 15 Dec 2023 22:56:02 +0000 Original-Received: (at 67836) by debbugs.gnu.org; 15 Dec 2023 22:55:54 +0000 Original-Received: from localhost ([127.0.0.1]:53723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEH61-0007dJ-U5 for submit@debbugs.gnu.org; Fri, 15 Dec 2023 17:55:54 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEH5z-0007d2-B6 for 67836@debbugs.gnu.org; Fri, 15 Dec 2023 17:55:52 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5A47310009E; Fri, 15 Dec 2023 17:55:45 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1702680944; bh=Vq9yGjzLNIonr8713Nqw2IqU0i2Q7KZpBW/vuO2REDA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dAxY7yvjDBpzPnDtwMB2jcURqIeCMG01EQCwU//T/GHPAJG2SmRtd5qlpBEmnmYwm 7kfE5RabX507uEfsLBB59NWiR556T+EM44cCTarbvg5uL53CwJCSm2JbsuCwBROHnY SdILFVAN1e9w4jtqunBh1X06R11POUwshw4TlWRhuP5kxzU/m0pVuarj+pLY9tMcnd E6eVjsMmNkP1hxeISHbZITm9Kh3egk3oXWc+9DZcSahBW+JXdevfgUyovEmlMYMuQs yX3BdjJbWo9bo0R71+duhSvTz11KGh7YYW8oKNwQHZ2vv5UxlLMn60SLXrrtcJ52Qx RTViYUBqpYtzA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 67A3510001D; Fri, 15 Dec 2023 17:55:44 -0500 (EST) Original-Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3DD08120D88; Fri, 15 Dec 2023 17:55:44 -0500 (EST) In-Reply-To: <83msubo2vw.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Dec 2023 18:18:43 +0200") 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:276292 Archived-At: > Thanks, but let's please find a fix that doesn't make the tail wag the > dog. I don't want to make a change in bitch_at_user, which will > affect every possible use of it in batch mode, something that we have > been doing for eons. I suspect keyboard macros have not been used very much in batch mode over the last 32 years. >> ding's docstring states that it terminates keyboard macros. But, due >> to what seems to be an oversight, it does not do that while executing >> in batch mode. > As the code clearly shows, it isn't an oversight. AFAICT the current logic of code can be traced back to: commit 4588ec205730239596486e8ad4d18d541917199a Author: Jim Blandy Date: Wed Jul 3 12:10:07 1991 +0000 Initial revision diff --git a/src/dispnew.c b/src/dispnew.c --- /dev/null +++ b/src/dispnew.c @@ -0,0 +1813,9 @@ +{ + if (noninteractive) + putchar (07); + else if (!INTERACTIVE) /* Stop executing a keyboard macro. */ + error ("Keyboard macro terminated by a command ringing the bell"); + else + ring_bell (); + fflush (stdout); +} I'm not sure this code can be said to show clearly that it's not an oversight. I read it to say that the author did not consider the intersection of noninteractive and !INTERACTIVE -- Stefan