From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Dickey Newsgroups: gmane.emacs.bugs Subject: bug#66128: 28.2; visible-bell breaks setterm --inversescreen on Date: Sun, 24 Sep 2023 20:07:03 -0400 Message-ID: References: <87zg1gk3eu.fsf@neko.mail-host-address-is-not-set> <83sf789l3w.fsf@gnu.org> <87h6nmvu61.fsf@neko.mail-host-address-is-not-set> <83cyy95tzm.fsf@gnu.org> Reply-To: dickey@his.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EvFqkQdx3DOGVAUt" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66128@debbugs.gnu.org, Thomas Dickey , Tomas Hlavaty To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 02:08:10 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 1qkZ8z-0005xh-Ja for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 02:08:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkZ8h-0001VC-5D; Sun, 24 Sep 2023 20:07:51 -0400 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 1qkZ8g-0001V4-5u for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 20:07:50 -0400 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 1qkZ8f-0004Iq-Tz for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 20:07:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkZ8r-0001da-OU for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 20:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Dickey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2023 00:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66128 X-GNU-PR-Package: emacs Original-Received: via spool by 66128-submit@debbugs.gnu.org id=B66128.16956004486243 (code B ref 66128); Mon, 25 Sep 2023 00:08:01 +0000 Original-Received: (at 66128) by debbugs.gnu.org; 25 Sep 2023 00:07:28 +0000 Original-Received: from localhost ([127.0.0.1]:43763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkZ8K-0001cd-03 for submit@debbugs.gnu.org; Sun, 24 Sep 2023 20:07:28 -0400 Original-Received: from smtp-1a.his.com ([216.194.253.2]:43672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkZ8E-0001cQ-B4 for 66128@debbugs.gnu.org; Sun, 24 Sep 2023 20:07:26 -0400 Original-Received: from cuda501.his.com (cuda501.his.com [18.191.10.220]) by smtp-1a.his.com (Postfix) with ESMTPS id 60D7E1DF for <66128@debbugs.gnu.org>; Sun, 24 Sep 2023 20:07:09 -0400 (EDT) X-ASG-Debug-ID: 1695600428-1f26af277cce800001-jgZTGW Original-Received: from smtp-4a.his.com (smtp-4a.his.com [216.194.253.31]) by cuda501.his.com with ESMTP id RpMdoxmivi9Ass4z (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 24 Sep 2023 20:07:08 -0400 (EDT) X-Barracuda-Envelope-From: tom@invisible-island.net X-Barracuda-RBL-Trusted-Forwarder: 216.194.253.31 Original-Received: from zproxy101.his.com (zproxy101.his.com [18.218.2.49]) by smtp-4a.his.com (Postfix) with ESMTPS id 3A4D42F; Sun, 24 Sep 2023 20:07:08 -0400 (EDT) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id 0AA2717AEA8; Sun, 24 Sep 2023 20:07:08 -0400 (EDT) X-Barracuda-RBL-Trusted-Forwarder: 18.218.2.49 Original-Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavis, port 10032) with ESMTP id Do7GQn5LOQkJ; Sun, 24 Sep 2023 20:07:07 -0400 (EDT) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy101.his.com (Postfix) with ESMTP id DE24B17AEAA; Sun, 24 Sep 2023 20:07:07 -0400 (EDT) X-Virus-Scanned: amavis at zproxy101.his.com Original-Received: from zproxy101.his.com ([127.0.0.1]) by localhost (zproxy101.his.com [127.0.0.1]) (amavis, port 10026) with ESMTP id naucRwynMYKY; Sun, 24 Sep 2023 20:07:07 -0400 (EDT) Original-Received: from prl-debianold-64.jexium-island.net (static-96-255-221-90.washdc.fios.verizon.net [96.255.221.90]) by zproxy101.his.com (Postfix) with ESMTPSA id BFE9717AEA8; Sun, 24 Sep 2023 20:07:07 -0400 (EDT) Original-Received: from tom by prl-debianold-64.jexium-island.net with local (Exim 4.94.2) (envelope-from ) id 1qkZ7v-0018KT-Nm; Sun, 24 Sep 2023 20:07:03 -0400 X-Barracuda-RBL-IP: 96.255.221.90 X-Barracuda-Effective-Source-IP: static-96-255-221-90.washdc.fios.verizon.net[96.255.221.90] X-Barracuda-Apparent-Source-IP: 96.255.221.90 X-ASG-Orig-Subj: Re: bug#66128: 28.2; visible-bell breaks setterm --inversescreen on Content-Disposition: inline In-Reply-To: <83cyy95tzm.fsf@gnu.org> X-Barracuda-Connect: smtp-4a.his.com[216.194.253.31] X-Barracuda-Start-Time: 1695600428 X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384 X-Barracuda-URL: https://spam.his.com:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at his.com X-Barracuda-Scan-Msg-Size: 2831 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=5.0 KILL_LEVEL=7.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.114558 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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:271285 Archived-At: --EvFqkQdx3DOGVAUt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 23, 2023 at 08:38:53AM +0300, Eli Zaretskii wrote: > > From: Tomas Hlavaty > > Cc: 66128@debbugs.gnu.org > > Date: Fri, 22 Sep 2023 22:18:14 +0200 > >=20 > > On Thu 21 Sep 2023 at 08:00, Eli Zaretskii wrote: > > > Emacs just sends to the terminal the sequence defined by the "vb" > > > termcap capability. Is that not correct when the screen colors are > > > inverted? > >=20 > > I do not know. > >=20 > > > Is this perhaps the problem of the terminal? > >=20 > > No, I get the same behaviour in xfce4-terminal and kitty, so this does > > not seem to be specific problem with the linux console. > >=20 > > I think I wrote it in the bug report too, under an X based terminal: > >=20 > > $ emacs -nw -Q --eval '(setq visible-bell t)' > >=20 > > then press PgUp. > >=20 > > > Btw, we always use the termcap's "vb", even when terminfo is > > > available; should we use the terminfo's "flash" instead? > >=20 > > I do not know. >=20 > Thomas, could you perhaps help us out here? This is about sending the > "visible bell" sequence to a terminal after "setterm --inversescreen on". > The original report is: >=20 > $ setterm --inversescreen on setterm doesn't have any special way of manipulating the terminal - it uses the same escape sequences that emacs would > $ emacs -Q --eval '(setq visible-bell t)' >=20 > Then in Emacs do something that causes a bell, like try moving beyond > the buffer's end. This causes the Emacs background to become white, > i.e. the visible-bell somehow countermands the inversescreen state. >=20 > Can you think of any reason for this behavior? Do terminals honor https://github.com/util-linux/util-linux/blob/master/term-utils/setterm.c https://github.com/util-linux/util-linux/blob/1e0ad14b3ac08d855cda6de346a65= f9b834e00db/term-utils/setterm.c#L1005 /* -inversescreen [on|off]. */ if (ctl->opt_inversescreen) fputs(ctl->opt_invsc_on ? "\033[?5h" : "\033[?5l", stdout); man console_codes ESC [ ? 5 h DECSCNM (default off): Set reverse-video mode. but visual-bell can be the same thing The "vb" termcap capability is found with "man 5 terminfo" flash_screen flash vb visible bell (may not move cursor) to be "flash" in terminfo, and "infocmp linux" shows flash=3D\E[?5h$<200/>\E[?5l, which is to say, turn reverse-video on wait 200 milliseconds turn reverse-video off > inversescreen when they perform the visible-bell function? Emacs just > sends the sequence reported by the "vb" termcap capability of the > terminal when the visible-bell is triggered. >=20 > Thanks. --=20 Thomas E. Dickey https://invisible-island.net --EvFqkQdx3DOGVAUt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmUQzyQACgkQzCr0RyFn vgPdNwv/bubMqztTKYiVhC+6sCNj2na3b8Qej1ndO4U1JFynwpkl2qgBJf5tg7Z/ eA2n4wEgZO15KMotbTgL0gEunLpkXMIYdTcMqL67tDE5RSsUHOkHeS1Mc1YapUX7 wIvAKng6paeTlG/mj9Tbkq/ttU5oJMFuQby8LeqVDw+CcsMHfEqXkRxrFfaTKXOH Ufgz9FQ8ZbsaYG0oo1QalxIDxT7gNAhxUi4L6O0HpjyHsPEekYOxwpphgG1YlJL/ w8Gr0E4wcU5ZkZWfkTo4jk/O02ZmYbcuZdjPqRhXkfnoeKA/sCy9RIoT4dBrDPgP PopHSpfv3dio95JKelbvrVbp6yOuqPXS+AKHwkxkg2zO/cpZ4Co8ANka7EzUXWxH ec3YdzEL2ZhiR0uJYG/WJZDpuf4Vo6lQ2kT8C9848o4bVsaY0vcNamZFzL5nqadN j1An/ZzJV2K1QqTMh11eZB1YPokI1ZPSUoqVmwW9aprpJ3NA3uFAdsBNCb+zAJ8g cpzEDMJi =IbZf -----END PGP SIGNATURE----- --EvFqkQdx3DOGVAUt--