GNU bug report logs - #81168
32.0.50; M-~ (not-modified) in save-some-buffers errors in terminal frames

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Aaron Zeng <azeng@HIDDEN>; dated Mon, 1 Jun 2026 19:15:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 81168 <at> debbugs.gnu.org:


Received: (at 81168) by debbugs.gnu.org; 4 Jun 2026 14:46:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 04 10:46:39 2026
Received: from localhost ([127.0.0.1]:35933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wV9LC-0004v9-Gj
	for submit <at> debbugs.gnu.org; Thu, 04 Jun 2026 10:46:39 -0400
Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]:45067)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1wV9LA-0004un-QB
 for 81168 <at> debbugs.gnu.org; Thu, 04 Jun 2026 10:46:37 -0400
Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43])
 by mailfout.stl.internal (Postfix) with ESMTP id 12E691D000E5;
 Thu,  4 Jun 2026 10:46:31 -0400 (EDT)
Received: from phl-frontend-04 ([10.202.2.163])
 by phl-compute-03.internal (MEProxy); Thu, 04 Jun 2026 10:46:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=fm3; t=1780584390; x=
 1780670790; bh=/M7kaYxLMxEaIvNNSvUE5YVf0wNbRS2+rTcby+bD0Ow=; b=g
 +6Y7QCE+lmnMOxsr/Frt/tXlk83BzEFWfqxYj+BXnkcYU+CRDsZ1wrXy2ILjXiIQ
 1Ci8frAkng2wJgnEBSqvy/m2bwTFZEuDXJ0WCAMWNN+V7ofMedFD6Gas9GHrcFbi
 5fTzW/Sv5kqHlz2mpLh2yKruFnTMfMeJG4FSG19HbgfScolwkSxDwcLsMV539UFM
 GMpEZ6TYFqpUGo7IFJVfVAaCthAjap25JAWEJTNQRtEGLxeUMJGvVRnExOELIqpo
 yCuj1C03rFooSS3vO1nqPcoNMy1ocVZ6NFmmunCHuk61Cp3rwN//R53AVTFeje9o
 sUFJ75BGXf1/x5SibT/1Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1780584390; x=1780670790; bh=/M7kaYxLMxEaIvNNSvUE5YVf0wNbRS2+rTc
 by+bD0Ow=; b=E+DmpPJkzBn7lPun9NNM8O+j3P4sJaF6URlBKw2tKifdjKL89wm
 XiXavAsETfccTWzsBRh5oPgzxZSZalz4y+Nm7xta/X/PpEwXz8izSgSPfy50HtRO
 LUlNqL+7BfyOVT3Zunv+aGm747cWSmk/3mvhXStaiJM3q02uiestHGcA6hCS426H
 Uu0fAgTP4E0b/djDdG6/TaK185S4gAFEMIimsokaaA0pX7b//8YZHgSohXknCnEJ
 MFA9aqltT2OqoK4x9ZFUC407bhFueKaHKf55v+KKTOmwxUWiVe1T2RGCPANne0U/
 V3KoUvKHeP0ELO9DNPjQzg3oG8aze47Y3Rg==
X-ME-Sender: <xms:xo8hajuRTmW3e5Euf7rzEBKFbG_QXI5obWebTL_M9NqEgmHM7SI_QQ>
 <xme:xo8hal8C9Ep1EERlppaPSiO64fcNCpdgjNx190xc9RfituN94vawGeuavYrGW4R3I
 GMgUtElB_B5LIXCelh2oJkuz2Z3_WyEnVH-ERvhPOwoGAzhIRyGPLg>
X-ME-Received: <xmr:xo8ham0ZsOqzdJzlOsH60ssqvinC6J6hv4bOF2ZcD1nSff8UznkXwoY1hEmN4OyuIdu4AMFQCkqp>
X-ME-Proxy-Cause: dmFkZTGAwvQcavy1/qXtRoCo4zC6/fkhhL5xiv8q4pQj4BBzWeaRfLxMUIEb9NY/9YKtsv
 gjQp88oN1E81HEKL/JOTsZUrzMuIo/mEzDlXHjKgpdyLcZAGibKzH9+myaGjo42TZRLAxc
 ub3ONk1ZhxP+CA7UkT3YZMdIqO0ZcjeKmjuVwWmjpoKOGzrp7VL07OZTiq+E2HkHFLhh73
 xzSpzl+Wc9v1+in4CzSsDnQVx1rzKtMt+76qo2o8WPR4k29Rm34TYUVlxHXChFeutCoy8/
 qTivvPWQvuHJD81hu15gXaC2U6/h8614zOd7mXy/rlQyTpTsioJX5kMlUUzd1/KgimqWlI
 kOPXFX93PNfXGfsVTow95ZX7l2ftef7xVZndI0w4FKAk05zBqvK/Cyzu5bXOdc/K+xiBDw
 iEUvAJmzXk74tMhH0nbN9B9q2y0XaNrdUuEcPX+KsTzC80U3lftR5asOqlfjtRex1jMGCB
 jctVRHnRkuaFoGHomyU7w+n/krldagTyGA92hNVAM+TNCPIUCVMP6Sq1gUZ/vLGgvQ5bzS
 TsRaPxaNNbUjKAv4440+sgLiw05hEDHi7ljg35lVvp1Vj+lrrCvG+R6w2Fw0na5Kj4bgCR
 GyyyqVYTdeu3V8HFmBTLbqTIhVxPZXCmRQmZm1dHpXr09Lr78vQhpExHqwyw
X-ME-Proxy: <xmx:xo8haiAbSx6L0nIz0JfnBmjQ3YEo4kQhIm7R8ClIvYSCfTbpLsnrkA>
 <xmx:xo8haqeUEnh_TKxngVodzkkWqWJP8Gb2RCxnA9iWRkILgR5gq_6PQw>
 <xmx:xo8han6W3KQS9ZmV12x3n4JghmYFZN14e-MaNAgIozkvYJUhe3FpEg>
 <xmx:xo8halWiDKoX30k37RCGPgbMpOwHQzn438-8HK_9kY29uruMyBwO_g>
 <xmx:xo8hanCRe_0tRJBBXI1-uOOJ8-UAPkxDuh5qdLdB0AWb4xB6s__wyKJg>
Feedback-ID: i62564b17:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 4 Jun 2026 10:46:30 -0400 (EDT)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 784727E6FB4; Thu, 04 Jun 2026 15:46:29 +0100 (BST)
From: Sean Whitton <spwhitton@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Aaron Zeng <azeng@HIDDEN>
Subject: Re: bug#81168: 32.0.50; M-~ (not-modified) in save-some-buffers
 errors in terminal frames
In-Reply-To: <87zf1b7gwu.fsf@HIDDEN>
References: <q7m1peqcbut.fsf@HIDDEN> <87cxy97zht.fsf@HIDDEN>
 <CAB7SQMERm-qFCv+ma-ichTcpz8zGQhWiupVAPwesheT4t0pp7Q@HIDDEN>
 <87zf1b7gwu.fsf@HIDDEN>
Date: Thu, 04 Jun 2026 15:46:29 +0100
Message-ID: <87wlwenz22.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81168
Cc: sbaugh@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
 81168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov [03/Jun  7:00pm +03] wrote:
>>> So we need to rewrite 'map-y-or-n-p' and replace
>>> 'read-key' with 'read-key-sequence-vector' in the
>>> 'y-or-n-p-use-read-key' cond-branch.  And in the
>>> default cond-branch, replace 'last-command-event'
>>> with '(this-command-keys-vector)'.  Here is the patch
>>> that does this:
>>
>> Thanks, Juri.  I tested this patch locally and it seems to fix M-~ for
>> me in terminal frames
>> (and the other actions still work; and they all work in graphical frames).
>
> Thanks for confirming.
>
> Eli and Sean, should this be pushed to the release branch or master?

The change is relatively involved but I think the fix should go to the
release branch.  Could you just confirm you've tested all branches of
the function with changes?

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.

Message received at 81168 <at> debbugs.gnu.org:


Received: (at 81168) by debbugs.gnu.org; 3 Jun 2026 18:36:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 03 14:36:45 2026
Received: from localhost ([127.0.0.1]:45191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wUqSK-0007sR-Hf
	for submit <at> debbugs.gnu.org; Wed, 03 Jun 2026 14:36:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39754)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1wUqSH-0007s4-RZ
 for 81168 <at> debbugs.gnu.org; Wed, 03 Jun 2026 14:36:42 -0400
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 <eliz@HIDDEN>)
 id 1wUqSB-0007PN-Lz; Wed, 03 Jun 2026 14:36:36 -0400
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=5p8q2wz1pM9mbZlFHsSb24ecoB8hxqVZRbxssToX/jQ=; b=G0w6MCZGIuKs
 2ftfSTfzzjJ1M8ExkdTDh7lPmWGKrfbQ4l9R903X9DSAkdT74g0EsM9DMxOYzh+Abod7NbnGnaByy
 7RMQw1rvX5BMec157BZvwvpSs7cO5nyfpqvkH0XEemO4i+fJ85VZLzWRZlLX1vbW4dCi+GsA54Srg
 Dbdu6GlED07RY0qXAJzvU2QtMWfh41vVHNaNHSxBOSJ+bRv1+Oiesc40ou2nODSUJPAom6umwGjV+
 X+gXwvg0JcowBefLjlpqWRDxDewvRtlATUsYquOrwDyBGMzviMgqQQnq4nEkbWNXjdu4yHDAk1Nxt
 kBHDSljvcieGAtFtx2B93A==;
Date: Wed, 03 Jun 2026 21:36:33 +0300
Message-Id: <867bofv5ce.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87zf1b7gwu.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 03 Jun 2026 19:00:33 +0300)
Subject: Re: bug#81168: 32.0.50;
 M-~ (not-modified) in save-some-buffers errors in terminal frames
References: <q7m1peqcbut.fsf@HIDDEN> <87cxy97zht.fsf@HIDDEN>
 <CAB7SQMERm-qFCv+ma-ichTcpz8zGQhWiupVAPwesheT4t0pp7Q@HIDDEN>
 <87zf1b7gwu.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81168
Cc: sbaugh@HIDDEN, 81168 <at> debbugs.gnu.org, azeng@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: sbaugh@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
>  81168 <at> debbugs.gnu.org
> From: Juri Linkov <juri@HIDDEN>
> Date: Wed, 03 Jun 2026 19:00:33 +0300
> 
> >> So we need to rewrite 'map-y-or-n-p' and replace
> >> 'read-key' with 'read-key-sequence-vector' in the
> >> 'y-or-n-p-use-read-key' cond-branch.  And in the
> >> default cond-branch, replace 'last-command-event'
> >> with '(this-command-keys-vector)'.  Here is the patch
> >> that does this:
> >
> > Thanks, Juri.  I tested this patch locally and it seems to fix M-~ for
> > me in terminal frames
> > (and the other actions still work; and they all work in graphical frames).
> 
> Thanks for confirming.
> 
> Eli and Sean, should this be pushed to the release branch or master?

It's in the code we installed recently, no?  If so, it should go to
the release branch, IMO.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.

Message received at 81168 <at> debbugs.gnu.org:


Received: (at 81168) by debbugs.gnu.org; 3 Jun 2026 16:13:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 03 12:13:42 2026
Received: from localhost ([127.0.0.1]:43508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wUoDt-0002Yp-OD
	for submit <at> debbugs.gnu.org; Wed, 03 Jun 2026 12:13:42 -0400
Received: from mout-p-102.mailbox.org ([80.241.56.152]:35754)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wUoDo-0002Y7-PT
 for 81168 <at> debbugs.gnu.org; Wed, 03 Jun 2026 12:13:37 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4gVt6J2TJcz9vDG;
 Wed,  3 Jun 2026 18:13:28 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1780503208;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=zeX7GuC+umJilwqzKcONRlVT6J2GgrNG4KqVgxr3h9U=;
 b=HJXNlf1xeBzCpvDmgBzIXvVVx3z1MGkszGGDF4H/gWMl/NABXsLttwcqi7XC1FBM9PM5pC
 KXdTDfU6itFPhRL6SyZO7rbYXQMPx5O9OnxXVGgl3tUrFFcz4JzutKPn0KtlygFZVBKo2z
 QXM/mmOaJ1CaWoaEZG+NhnQtYkVx142btDsxmmoeWu7b1uGl6AhyLsxMoIYhjU57PR+O7c
 GSeF/RsLtWsE1XYtyhvED9HsUYG7hkbli2p2Tb+8oHffvive2TKaGK1UCRbpNd9RUqb6tM
 6f37VTypWh+L13zX7bmjFhPoq13yDy7y1W1NJ0iv3BLvo6F+9wybHT76f3qFzA==
From: Juri Linkov <juri@HIDDEN>
To: Aaron Zeng <azeng@HIDDEN>
Subject: Re: bug#81168: 32.0.50; M-~ (not-modified) in save-some-buffers
 errors in terminal frames
In-Reply-To: <CAB7SQMERm-qFCv+ma-ichTcpz8zGQhWiupVAPwesheT4t0pp7Q@HIDDEN>
Organization: LINKOV.NET
References: <q7m1peqcbut.fsf@HIDDEN> <87cxy97zht.fsf@HIDDEN>
 <CAB7SQMERm-qFCv+ma-ichTcpz8zGQhWiupVAPwesheT4t0pp7Q@HIDDEN>
Date: Wed, 03 Jun 2026 19:00:33 +0300
Message-ID: <87zf1b7gwu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81168
Cc: sbaugh@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
 81168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> So we need to rewrite 'map-y-or-n-p' and replace
>> 'read-key' with 'read-key-sequence-vector' in the
>> 'y-or-n-p-use-read-key' cond-branch.  And in the
>> default cond-branch, replace 'last-command-event'
>> with '(this-command-keys-vector)'.  Here is the patch
>> that does this:
>
> Thanks, Juri.  I tested this patch locally and it seems to fix M-~ for
> me in terminal frames
> (and the other actions still work; and they all work in graphical frames).

Thanks for confirming.

Eli and Sean, should this be pushed to the release branch or master?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.

Message received at 81168 <at> debbugs.gnu.org:


Received: (at 81168) by debbugs.gnu.org; 3 Jun 2026 03:03:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 02 23:03:02 2026
Received: from localhost ([127.0.0.1]:35583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wUbsk-00021K-5l
	for submit <at> debbugs.gnu.org; Tue, 02 Jun 2026 23:03:02 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26435)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1wUbsh-00020i-MJ
 for 81168 <at> debbugs.gnu.org; Tue, 02 Jun 2026 23:03:00 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 46B22100065;
 Tue, 02 Jun 2026 23:02:53 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1780455772;
 bh=zPZg8xSbqDhMhOLvyLm9JRS4QfbFPLeR+WdCMF9J9b0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=XNtxR5TKyTDUCksOob+jg0IVPqi8Ub5BmxI7nzMQur10g/Sleo2QNd5brXhpwH4q6
 +jqY5RNwWxt0XmsZkEvwPUBRM8ccu+g68c6PqsYZ5hQRxXvh+gMUjBd3avXaV7h1c5
 zxq2yOZxm2VMfBqpR+H6bgwG9+kY2IgPT0Xd0ooi0+x0z5fzZ1R9jnWhU8FOUkOET1
 QhE2YFd0uenWXZWLEQF0tqzljx75re/t1WN/Ol8qjCqih7B0Hv4J5rvA+DTJyHSRMv
 xh7CLmT6YqT4xxL9/yW0FtQvJFDj7xszy1Ct3zhq0A1Fm4YzKCgNSg+AUjyr8Fh1rk
 FKZ383AjV+ycw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 5E25810005C;
 Tue, 02 Jun 2026 23:02:52 -0400 (EDT)
Received: from pastel (unknown [104.247.237.64])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E04FC120775;
 Tue,  2 Jun 2026 23:02:51 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#81168: 32.0.50; M-~ (not-modified) in save-some-buffers
 errors in terminal frames
In-Reply-To: <87cxy97zht.fsf@HIDDEN>
Message-ID: <jwvy0gw1g61.fsf-monnier+emacs@HIDDEN>
References: <q7m1peqcbut.fsf@HIDDEN> <87cxy97zht.fsf@HIDDEN>
Date: Tue, 02 Jun 2026 23:02:50 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.000 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 81168
Cc: sbaugh@HIDDEN, Aaron Zeng <azeng@HIDDEN>,
 81168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Actually, it never worked, and I see the same problem even in Emacs 30.
> This is because on a tty, M-~ is not a single key, but [ESC ~].

Hmm... indeed.  If `read-key-sequence` can be used instead of
`read-key`, that's fine, but maybe in the long run we may want to try
and teach `read-key` have to deal with such a `M-~` key in a tty.


=== Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.

Message received at 81168 <at> debbugs.gnu.org:


Received: (at 81168) by debbugs.gnu.org; 2 Jun 2026 18:54:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 02 14:54:27 2026
Received: from localhost ([127.0.0.1]:59841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wUUFv-0007FW-2M
	for submit <at> debbugs.gnu.org; Tue, 02 Jun 2026 14:54:27 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:49305)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <azeng@HIDDEN>)
 id 1wUUFr-0007F6-MR
 for 81168 <at> debbugs.gnu.org; Tue, 02 Jun 2026 14:54:24 -0400
Received: from mail-lf1-f72.google.com ([209.85.167.72])
 by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128)
 (Exim 4.99.2) id 1wUUFl-00000008mlT-1FH2 for 81168 <at> debbugs.gnu.org;
 Tue, 02 Jun 2026 14:54:17 -0400
Received: by mail-lf1-f72.google.com with SMTP id
 2adb3069b0e04-5aa61a298a6so2759450e87.1
 for <81168 <at> debbugs.gnu.org>; Tue, 02 Jun 2026 11:54:17 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1780426456; cv=none;
 d=google.com; s=arc-20240605;
 b=BlMWZRAMAfGNhvGEId4W0O4mDDSs8+2Us+K3dvUF2dZEh3VlYQGn+vDp5YVqnfv2DN
 Avk3AJRgSQUpAxC9VnhbiJhKJ8z77HLfXPygifKpb+yG7rD31HA8QrFHMS0J9ACYGd03
 LOZCvKFjepptPL+HVgxfek8ge6llstzZFLGo4NkDnEKiBCyfE5olYmCE9vxNw1yQiGvT
 SEAqqrWl3CnNp7OslR7m2VXWuMtvIc25OQ/Fiyyr75rh6kr7qaFefMCN2IjcMCXoRLLy
 jAOJeHDvx7b0g2sFJp087VOVWC0B77G5aeePkSLdwTtLkLyoMjbzA5oJbXXywQzo2fFP
 uiHg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
 s=arc-20240605; 
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:dkim-signature;
 bh=daeFICMkYoljBJ8AsvVsryrNa6NiwXzNIlAVrLhq56k=;
 fh=xqylomc/rjIdeLUZ456XXz6YD5Mq1lALCnq8KxRzpHs=;
 b=LQl9iqsBCvaI1DLvd72KkNRFnxd1SplmlO15XmlY+pLgNtZK5DErjXEkdxJC6Bdp7M
 8XOPdtyOKBfDZtuqEbL65oqqOQwvav5vrGjBRPZCrlPh6f+2wRkvD52UI3uCBj0WphC5
 GoIx0gbuY/fckqMDmQCOqQJuukUfyUIMH0YZiNlZ8IkQ9QipG/6lcQhxPH7BdU7i7T6I
 RuP/tTr7qgiXqiUzMtkW50UIz7VaTgPMGAb/kLhqrWzC1dgpZElVF83uF/gwThECeh7P
 x/4r8uw72iZOdVHeu49iK9/R3OT5aWR8ICmdOSnL1/b2gfoE7WVIZFSmSrMHUSFRJUDX
 VMjw==; darn=debbugs.gnu.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=janestreet.com; s=google; t=1780426456; x=1781031256; darn=debbugs.gnu.org; 
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=daeFICMkYoljBJ8AsvVsryrNa6NiwXzNIlAVrLhq56k=;
 b=cnTcmzp9AUnClxYYepyFfPy6UFogNOtBtq/EdmsAJ0Y+kU4CVjmhZyz5TyGy8dYQUl
 m8Ujf3rQqHYXOFaukeCWDTJvjSXRxjXyFTn6kjyQU60ZTga5JOfoighheGSAe6J188rN
 eq31aYolAbdTKnnN6jXACb6Y0QYPOGvBxDnKs=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1780426457;
 bh=daeFICMkYoljBJ8AsvVsryrNa6NiwXzNIlAVrLhq56k=;
 h=References:In-Reply-To:From:Date:Subject:To:Cc;
 b=thGDr3eT6zQW4hlwKIbWMYIMg8Wk8wYS/pZlYl7BP0oFcy1qM5RLiozSC9Aa+Mson
 24rcGSH32akonk6SRAoDFyYbYn6eKtxO/CbtvneUSkCIDk/iOVQ1PYImO+X5z0qVbV
 lLE30+n9NE59xGD1dtOURm9zYqRZVxriltuPkhGMGNjV92pbOw+SW8M2mvV2awJy2r
 ucUj6KyE8J3rmIB300usDNH+Pf5qoDtuXe0WMBrBqS0lK1NRpBYQd6kkxFvncfq+2q
 OEJlOe1zWaoObNBkzFLpbM5ILnGwmjO3khQHJ+Mks3uQdcHq1r09vhSC/GYr4VeWGC
 HVm16L2Kmm7Qg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20251104; t=1780426456; x=1781031256;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=daeFICMkYoljBJ8AsvVsryrNa6NiwXzNIlAVrLhq56k=;
 b=SHvtMCUMve9aNXwfKmtigjof2phtIbtj/CYBOTZbz+rtgbzoaBwkVdaB87zw3imK0l
 xVimCOQsUz0WpGZMdafGi8AnaViyMo16JTuFEKExd12gQz5VSeW/paccZzNCJvnwrQ0y
 sAfgeWmTIJIZz/RZk5ccPitjYHnICgvKixEbxSfXekQ5CQx6dW6sYARRwqsbfW8r6RFN
 g8/f+Ddi1N6fINEVKIQ28CXOH+62a+TqfZDdGM7UQNOusnMCUA+SVX6GbdwcxjBx/nE3
 PtUroxenMWTXPp6LGH9VCb7CQn1FTR7CZPCIAWN0FpUvti6F8TkqG+pzSBXxEAdnbuC4
 fhdA==
X-Gm-Message-State: AOJu0Yxuo5GT36hMVpeccHC4xeaTewvGFLQStbVe/sQjjPIUBRgzQ4N/
 WeqqKyRDkFHAs0XrpuwyaFC4YdAWJQJf07a5kmUW48ftEwwp0n351+lUjVDMdxrp47bUxfSCPWc
 YnHA0zJwKveF7EcuXqa9I2gC8Ay7ELBhDhwFNxTaXz4LQByn6Uj871Ms1xjqnjQckjsMxihkg4L
 HQ9e48B2org1JiZ6Ju4kozHy9nMUtO
X-Gm-Gg: Acq92OGz5l4FBKSvgLYMKpOYoT9Bo4NQQnoyeQIqko3/ACv3I8nGjlBOPaf9k1p4ptX
 ZkKYnA4qXFxZip1ajQZoz6/bQ47xXP7wnJlkir99aiTZxH7xhxepXY5syd15P8cxn+sfpIKuOpo
 F+LNFkoqD2vbVdskQvfj88s5+7Rz418DDMymgBgYtGWGsGfzxQsAbOlWrManxnQ7PFlp27FZX8/
 MJR05p5cZp0nKMbhB98xq6XtCOAfQmI7mMXB/Z/1K8S5oyg7xe1bqLy1x27YXlqeai0V7E8fYnn
 BUCqzkxT8euBkpNHR2XDllBe0kXMvP3sccZdnR9K5C/ZJVeAFVnXER8ngsZ+lIeMBiJxeg==
X-Received: by 2002:a05:6512:8019:20b0:5aa:659b:2a96 with SMTP id
 2adb3069b0e04-5aa7c0dc773mr63379e87.23.1780426456267; 
 Tue, 02 Jun 2026 11:54:16 -0700 (PDT)
X-Received: by 2002:a05:6512:8019:20b0:5aa:659b:2a96 with SMTP id
 2adb3069b0e04-5aa7c0dc773mr63373e87.23.1780426455888; Tue, 02 Jun 2026
 11:54:15 -0700 (PDT)
MIME-Version: 1.0
References: <q7m1peqcbut.fsf@HIDDEN> <87cxy97zht.fsf@HIDDEN>
In-Reply-To: <87cxy97zht.fsf@HIDDEN>
From: Aaron Zeng <azeng@HIDDEN>
Date: Tue, 2 Jun 2026 14:53:38 -0400
X-Gm-Features: AVHnY4KQnN4DTDvoqADQTgvpFYluNpwbRSAsddos-6eWjTa1YG_lrRjQPLA8UWA
Message-ID: <CAB7SQMERm-qFCv+ma-ichTcpz8zGQhWiupVAPwesheT4t0pp7Q@HIDDEN>
Subject: Re: bug#81168: 32.0.50; M-~ (not-modified) in save-some-buffers
 errors in terminal frames
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 81168
Cc: sbaugh@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
 81168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

On Tue, Jun 2, 2026 at 11:18=E2=80=AFAM Juri Linkov <juri@HIDDEN> wrote=
:
>
> > From emacs -nw -Q:
> >
> > Visit some arbitrary file and modify the buffer.  Then, press:
> >
> > C-x s M-~
> >
> > In terminal frames, this signals the following error:
> >
> > Debugger entered--Lisp error: (error "Can=E2=80=99t use in a kmacro in =
batch mode")
> >   error("Can't use in a kmacro in batch mode")
> >   map-y-or-n-p(... (134217854 ... "skip this buffer and mark it unmodif=
ied" ...
> >   save-some-buffers(nil)
> >   funcall-interactively(save-some-buffers nil)
> >   call-interactively(save-some-buffers nil nil)
> >   command-execute(save-some-buffers)
> >
> > In graphical frames, the command appears to work as intended (exits the
> > map-y-or-n-p, and marks the buffer visiting the file as not-modified
> > without saving it).
> >
> > I tested this also in the emacs-31 branch and saw the same issue there.
>
> Actually, it never worked, and I see the same problem even in Emacs 30.
>
> This is because on a tty, M-~ is not a single key, but [ESC ~].
> Currently only a single key can be found in the map.
>
> So we need to rewrite 'map-y-or-n-p' and replace
> 'read-key' with 'read-key-sequence-vector' in the
> 'y-or-n-p-use-read-key' cond-branch.  And in the
> default cond-branch, replace 'last-command-event'
> with '(this-command-keys-vector)'.  Here is the patch
> that does this:

Thanks, Juri.  I tested this patch locally and it seems to fix M-~ for
me in terminal frames
(and the other actions still work; and they all work in graphical frames).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.

Message received at 81168 <at> debbugs.gnu.org:


Received: (at 81168) by debbugs.gnu.org; 2 Jun 2026 15:19:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 02 11:19:00 2026
Received: from localhost ([127.0.0.1]:57982 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wUQtP-0007DS-Va
	for submit <at> debbugs.gnu.org; Tue, 02 Jun 2026 11:19:00 -0400
Received: from mout-p-201.mailbox.org ([80.241.56.171]:43210)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wUQtM-0007Cz-AH
 for 81168 <at> debbugs.gnu.org; Tue, 02 Jun 2026 11:18:57 -0400
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4gVDxf1RYdz9vBB;
 Tue,  2 Jun 2026 17:18:46 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1780413526;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=LUuUWkIw5uwetuEq7G2JcpP3Wc1+aHQxWW5LBmgKIAY=;
 b=aLJtVWwlfhMO9ufcjXeiTkL2YI8a7W5Mg1k3D4z7oZxa9+pGoRUQNLD+OcJfa7U5fOVWfG
 6ZoZBrGjEajJ1jczN9bEUZ1NOkTGWfgiEWrPTsKWK4AUYTOSkc7F2LdD3ygJQp0zqAQ/S3
 JoDSz32h+UHPp21pKqYmJidjKQ11khMN6us9H/7bWMph3uWpMMcqUkNTAzdEXhpXRVxSoG
 uDKURMDtMW/IkTOIsEc8PYIdFN3eq1vZe/SFB99V46BUDACKzvVHAYeZGvkdq+s/It6IGW
 vbB5kSxMt8QqKYJaQdOFYAH7lNvOQJ1kcUo4IQu7MbDkyLRAhf7R0k9MYbQLqg==
Authentication-Results: outgoing_mbo_mout; dkim=none;
 spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
 2001:67c:2050:b231:465::102 as permitted sender)
 smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Aaron Zeng <azeng@HIDDEN>
Subject: Re: bug#81168: 32.0.50; M-~ (not-modified) in save-some-buffers
 errors in terminal frames
In-Reply-To: <q7m1peqcbut.fsf@HIDDEN>
Organization: LINKOV.NET
References: <q7m1peqcbut.fsf@HIDDEN>
Date: Tue, 02 Jun 2026 18:17:54 +0300
Message-ID: <87cxy97zht.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: 4gVDxf1RYdz9vBB
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 81168
Cc: sbaugh@HIDDEN, Stefan Monnier <monnier@HIDDEN>,
 81168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

> From emacs -nw -Q:
>
> Visit some arbitrary file and modify the buffer.  Then, press:
>
> C-x s M-~
>
> In terminal frames, this signals the following error:
>
> Debugger entered--Lisp error: (error "Can’t use in a kmacro in batch mode")
>   error("Can't use in a kmacro in batch mode")
>   map-y-or-n-p(... (134217854 ... "skip this buffer and mark it unmodified" ...
>   save-some-buffers(nil)
>   funcall-interactively(save-some-buffers nil)
>   call-interactively(save-some-buffers nil nil)
>   command-execute(save-some-buffers)
>
> In graphical frames, the command appears to work as intended (exits the
> map-y-or-n-p, and marks the buffer visiting the file as not-modified
> without saving it).
>
> I tested this also in the emacs-31 branch and saw the same issue there.

Actually, it never worked, and I see the same problem even in Emacs 30.

This is because on a tty, M-~ is not a single key, but [ESC ~].
Currently only a single key can be found in the map.

So we need to rewrite 'map-y-or-n-p' and replace
'read-key' with 'read-key-sequence-vector' in the
'y-or-n-p-use-read-key' cond-branch.  And in the
default cond-branch, replace 'last-command-event'
with '(this-command-keys-vector)'.  Here is the patch
that does this:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=map-y-or-n-p-use-key-sequence.patch

diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el
index 7522d465d61..bdf35d02873 100644
--- a/lisp/emacs-lisp/map-ynp.el
+++ b/lisp/emacs-lisp/map-ynp.el
@@ -174,14 +174,16 @@ map-y-or-n-p
 				   'quit)))
 		    (y-or-n-p-use-read-key
 		     ;; Prompt in the echo area using `read-key'.
-		     (let ((cursor-in-echo-area (not no-cursor-in-echo-area)))
-                       (message "%s" (substitute-command-keys
+		     (let ((cursor-in-echo-area (not no-cursor-in-echo-area))
+                           (full-prompt
+                            (substitute-command-keys
                              (format
                               (apply #'propertize
                                      "%s(\\`y', \\`n', \\`!', \\`.', \\`q', %sor \\`%s') "
                                      minibuffer-prompt-properties)
                               prompt user-keys
-                                      (help-key))))
+                              (help-key)))))
+                       (message "%s" full-prompt)
 		       (if minibuffer-auto-raise
 			   (raise-frame (window-frame (minibuffer-window))))
                        (unwind-protect
@@ -196,8 +198,8 @@ map-y-or-n-p
                              ;; Do NOT use read-event here.  That
                              ;; function does not consult
                              ;; input-decode-map (bug#75886).
-		             (setq char (read-key))
-                             (when (eq char ?\C-g)
+		             (setq char (read-key-sequence-vector full-prompt))
+                             (when (equal char [?\C-g])
                                (signal 'quit nil)))
                          (when (fboundp 'set-text-conversion-style)
                            (set-text-conversion-style text-conversion-style)))
@@ -207,10 +209,10 @@ map-y-or-n-p
                                        "%s(\\`y', \\`n', \\`!', \\`.', \\`q', %sor \\`%s') %s"
                                        prompt user-keys
                                        (help-key)
-                                       (if (equal char -1)
+                                       (if (equal char [-1])
                                            "[end-of-keyboard-macro]"
-                                         (single-key-description char))))))
-		     (setq def (lookup-key map (vector char))))
+                                         (key-description char))))))
+		     (setq def (lookup-key map char)))
                     (t
                      ;; Read from the minibuffer.
                      (let* ((full-prompt
@@ -224,7 +226,7 @@ map-y-or-n-p
                             (cmd-char
                              (lambda ()
                                (interactive)
-                               (setq char last-command-event)
+                               (setq char (this-command-keys-vector))
                                (exit-minibuffer)))
                             (cmd-help
                              (lambda ()
@@ -250,8 +252,8 @@ map-y-or-n-p
                        (read-from-minibuffer
                         full-prompt nil remap nil
                         (or y-or-n-p-history-variable t))
-                       (message "%s%s" full-prompt (single-key-description char)))
-                     (setq def (lookup-key map (vector char)))))
+                       (message "%s%s" full-prompt (key-description char)))
+                     (setq def (lookup-key map char))))
                    (cond ((eq def 'exit)
 			  (setq next (lambda () nil)))
 			 ((eq def 'act)
@@ -318,8 +320,7 @@ map-y-or-n-p
 			      (setq actions (1+ actions))
 			    ;; Regurgitated; try again.
 			    (funcall try-again)))
-			 ((and (consp char)
-			       (eq (car char) 'switch-frame))
+			 ((eq char '[switch-frame])
 			  ;; switch-frame event.  Put it off until we're done.
 			  (setq delayed-switch-frame char)
 			  (funcall try-again))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.

Message received at 81168 <at> debbugs.gnu.org:


Received: (at 81168) by debbugs.gnu.org; 1 Jun 2026 19:27:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 01 15:27:29 2026
Received: from localhost ([127.0.0.1]:46451 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wU8II-0003ST-Id
	for submit <at> debbugs.gnu.org; Mon, 01 Jun 2026 15:27:29 -0400
Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]:48660)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1wU8IB-0003Qh-25
 for 81168 <at> debbugs.gnu.org; Mon, 01 Jun 2026 15:27:21 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4gTkVg3RG7z9vGK;
 Mon,  1 Jun 2026 21:27:07 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; 
 t=1780342027;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=n/RSlt5XA0uytQPK13xJR4d06yMgyGQ2bopqYFN/noI=;
 b=surzk5rprtWgOPQmDXqJoJrmihj3NrNh3YQTvRM9dbSth4JzHyilhtmSbT0HxF8JHD8L60
 woTGkF5KTjmOCfwFXJ95WN89LFPBDObM6Mu6Cu959vXtuk8OPtc1OPWEKi4+1wB9KjdlCg
 8INUpm1J9H4On4dR9LNYmrGcTQh40GGFIFjsAMxZRh0F0VBz+QjYbvMqKGPRvISRxnmTW2
 xDY6EaqtwdssHY8TTYZjalQ9wUM4zHvy1uYAY4qiEMw863D8U/ZjsgBoEFigXsLsTT18Ll
 TgZL3+6cEtGbJyOpVMh25v8bZDPUhI50qAqaRuukEM15w5dMSOm83UA/2EYgkg==
From: Juri Linkov <juri@HIDDEN>
To: Aaron Zeng <azeng@HIDDEN>
Subject: Re: bug#81168: 32.0.50; M-~ (not-modified) in save-some-buffers
 errors in terminal frames
In-Reply-To: <q7m1peqcbut.fsf@HIDDEN>
Organization: LINKOV.NET
References: <q7m1peqcbut.fsf@HIDDEN>
Date: Mon, 01 Jun 2026 22:25:34 +0300
Message-ID: <871peqdpw1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 81168
Cc: sbaugh@HIDDEN, 81168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> C-x s M-~
>
> In terminal frames, this signals the following error:
>
> Debugger entered--Lisp error: (error "Can’t use in a kmacro in batch mode")
>   error("Can't use in a kmacro in batch mode")
>   map-y-or-n-p(#f(compiled-function ...

Thanks for the bug report, I confirm it.
This is because we recently added:

  ((eq def nil) ;; Special case for bug#67836
   (error "Can't use in a kmacro in batch mode"))

So we need to find another fix.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Jun 2026 19:14:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 01 15:14:30 2026
Received: from localhost ([127.0.0.1]:46310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1wU85k-0002So-Tu
	for submit <at> debbugs.gnu.org; Mon, 01 Jun 2026 15:14:30 -0400
Received: from lists1p.gnu.org ([2001:470:142::17]:58206)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <azeng@HIDDEN>)
 id 1wU85h-0002S4-Cs
 for submit <at> debbugs.gnu.org; Mon, 01 Jun 2026 15:14:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <azeng@HIDDEN>)
 id 1wU85O-0005Ra-HM
 for bug-gnu-emacs@HIDDEN; Mon, 01 Jun 2026 15:14:06 -0400
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 <azeng@HIDDEN>)
 id 1wU85L-0003F3-SH
 for bug-gnu-emacs@HIDDEN; Mon, 01 Jun 2026 15:14:05 -0400
From: Aaron Zeng <azeng@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 32.0.50; M-~ (not-modified) in save-some-buffers errors in terminal
 frames
Date: Mon, 01 Jun 2026 15:14:02 -0400
Message-ID: <q7m1peqcbut.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1780341242;
 bh=KUeaBZxL+mTgtWG36WWUlf8E3mzrN5olL/+vkF2xIiQ=;
 h=From:To:Subject:Date;
 b=C4y0nxebV4P+MSZj58T+rZBRE9Yos18RlugYwfBdeL4I9zHjC7J1Hl8WnArZC/apw
 z5lQ9iy6sqMKomMYHnC+UvETHF+80byBlaLnHl7zVmp27U7xk1GGacK51ty9lW9mU4
 g4f4GZwa+xGz6E5PRtRm/F6SiuWLqnCZRjDu3/8bNuXO03IW9uaUFcYbLnsYbRENFu
 121GkIr23sUGaf1UWPxry4WNeyZ1AK44Tvm680ldkdOLOCyEEb50suAecWpl0dv2Vg
 nve8zMzqkn0Uy5WokLGd/yacp2LuN7iYaI6KQkZXLaTYfXd6dFSoOZt6vABwq0rdff
 fa8m7n05VYH5Q==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=azeng@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -70
X-Spam_score: -7.1
X-Spam_bar: -------
X-Spam_report: (-7.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5,
 RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

X-Debbugs-Cc: juri@HIDDEN, sbaugh@HIDDEN

From emacs -nw -Q:

Visit some arbitrary file and modify the buffer.  Then, press:

C-x s M-~

In terminal frames, this signals the following error:

Debugger entered--Lisp error: (error "Can=E2=80=99t use in a kmacro in batc=
h mode")
  error("Can't use in a kmacro in batch mode")
  map-y-or-n-p(#f(compiled-function (buffer) #<bytecode 0x4c797a29c041cf5>)=
 #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_139> (#<buffer C=
hangeLog.1>) ("buffer" "buffers" "save") ((134217854 #f(compiled-function (=
buf) #<bytecode -0x1e06868431b8e2ff>) "skip this buffer and mark it unmodif=
ied") (18 #f(compiled-function (buf) #<bytecode -0x169cac223503009b>) "view=
 this buffer") (6 #f(compiled-function (buf) #<bytecode 0x11c2c83e1d4d6f60>=
) "view this buffer and quit") (100 #f(compiled-function (buf) #<bytecode 0=
xd463e33fb1f4dbb>) "view changes in this buffer")))
  save-some-buffers(nil)
  funcall-interactively(save-some-buffers nil)
  call-interactively(save-some-buffers nil nil)
  command-execute(save-some-buffers)

In graphical frames, the command appears to work as intended (exits the
map-y-or-n-p, and marks the buffer visiting the file as not-modified
without saving it).

I tested this also in the emacs-31 branch and saw the same issue there.

Thanks,
Aaron Zeng


In GNU Emacs 32.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2026-06-01 built on
 igm-qws-u12685a
Repository revision: bfa4d6dd400f18832aa19df3cdd41bfd763c85f7
Repository branch: master
System Description: Rocky Linux 8.10 (Green Obsidian)

Configured using:
 'configure --with-x-toolkit=3Dlucid --without-gpm --without-gconf
 --without-selinux --without-imagemagick --with-modules --with-gif=3Dno
 --with-cairo --with-rsvg --without-compress-install --with-tree-sitter
 --with-native-compilation=3Daot
 PKG_CONFIG_PATH=3D/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgc=
onfig/'

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSYSTEMD
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM
XINERAMA XINPUT2 XPM XRANDR LUCID ZLIB

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Change Log

Minor modes in effect:
  bug-reference-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug lisp-mnt message mailcap yank-media puny
rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader
sendmail mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-fns radix-tree byte-opt gv cl-print debug
backtrace find-func cus-start cus-load cl-extra help-mode vc-git
diff-mode track-changes easy-mmode files-x vc-dispatcher bug-reference
thingatpt add-log dired-aux dired dired-loaddefs time-date compile
text-property-search comint subr-x mule-util ansi-osc ansi-color ring
comp-run bytecomp byte-compile comp-common rx term/xterm xterm warnings
icons 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 touch-screen 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 move-toolbar make-network-process tty-child-frames
native-compile emacs)

Memory information:
((conses 16 126229 12328) (symbols 48 9732 0) (strings 32 36416 2737)
 (string-bytes 1 1427954) (vectors 16 16769)
 (vector-slots 8 180620 7232) (floats 8 59 53) (intervals 56 1158 0)
 (buffers 1064 14))




Acknowledgement sent to Aaron Zeng <azeng@HIDDEN>:
New bug report received and forwarded. Copy sent to juri@HIDDEN, sbaugh@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to juri@HIDDEN, sbaugh@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#81168; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 4 Jun 2026 15:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.