From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#1305: All code that currently beeps should use visual bell instead Date: Sun, 18 Apr 2021 13:35:44 -0500 Message-ID: References: <87eef9qg81.fsf@gnus.org> <1869622e162377be79e9@heytings.org> <83bladw0dh.fsf@gnu.org> <87a6pxqdeg.fsf@gnus.org> <875z0lqcj4.fsf@gnus.org> <1869622e1602a39e56a6@heytings.org> <87a6pwvcrv.fsf@md5i.com> <1869622e165c625e097b@heytings.org> <874kg4vast.fsf@md5i.com> <1869622e166ad3c37a69@heytings.org> <87k0ozq3n8.fsf@gnus.org> <87blabpy54.fsf@gnus.org> <8735vnpqho.fsf@gnus.org> <83fszntt1u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30867"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mwd@md5i.com, larsi@gnus.org, 1305@debbugs.gnu.org, jasonspiro4@gmail.com, monnier@iro.umontreal.ca To: Gregory Heytings , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 18 20:36:12 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 1lYCHE-0007tP-Ca for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Apr 2021 20:36:12 +0200 Original-Received: from localhost ([::1]:42084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYCHD-0005Hj-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Apr 2021 14:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYCH4-0005Gr-F1 for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2021 14:36:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYCH4-0006SF-7D for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2021 14:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYCH4-0006MY-37 for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2021 14:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Apr 2021 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1305 X-GNU-PR-Package: emacs Original-Received: via spool by 1305-submit@debbugs.gnu.org id=B1305.161877095224443 (code B ref 1305); Sun, 18 Apr 2021 18:36:02 +0000 Original-Received: (at 1305) by debbugs.gnu.org; 18 Apr 2021 18:35:52 +0000 Original-Received: from localhost ([127.0.0.1]:47762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYCGu-0006MB-IS for submit@debbugs.gnu.org; Sun, 18 Apr 2021 14:35:52 -0400 Original-Received: from mail-pg1-f173.google.com ([209.85.215.173]:34438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYCGs-0006Lz-Vj for 1305@debbugs.gnu.org; Sun, 18 Apr 2021 14:35:51 -0400 Original-Received: by mail-pg1-f173.google.com with SMTP id z16so22683264pga.1 for <1305@debbugs.gnu.org>; Sun, 18 Apr 2021 11:35:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=W/0OBKaHSfIJ5rCgQKBd5RfsbAs5uBw5zSOub6hK9dA=; b=IZ3UenYgFdvunQ2a3DynONlbHQa5m7Ee/Wfnx5L0JGD8D5hZbIiAPru51G/LMLzKr/ KJswlPl7FXMWyllZo+80+cPmKiR3J08T6yfxzOeVLPW7JdTKe9Q0FxFufZfvpIVG8aWP WKbck9WgHqoi/i/GlYRYQdPs/ncMb0uyZz+btV4mLkogUNDhIq8Tb3VC9BHkC+HbRagw h+JqKJuNcpv81nYn/z+N4U01BcRvWzpVP+et51cuvLqBSNUxlnOoNB0ceQjDmXEL+EPH DBGwOCCKkleUdQcMRSlRBcyffI6sGFBOj5vNVpwas8pqh4MXViza5qMz2fTsIvPYLWFk KJIA== X-Gm-Message-State: AOAM531HbuRpDRC/eEeZHFR9vckJ2TdtXqdzQQMq6xj13XOBMzcXpxK7 S8WeaCQNuIJXER/9oIqj0elY7yF5SgQ27hmvRfU= X-Google-Smtp-Source: ABdhPJwKCg0sBwcYnR0Th/8mxSrkc9Jehz04SzGY7vJisCATMI0YCL+6oVW1X6bLaEIFxHh5c983lih4IR5ZMhRnEMg= X-Received: by 2002:a63:5b5c:: with SMTP id l28mr8226384pgm.363.1618770945121; Sun, 18 Apr 2021 11:35:45 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 18 Apr 2021 13:35:44 -0500 In-Reply-To: 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:204389 Archived-At: Gregory Heytings writes: >>> (sit-for 0.5) >> >> I think half a second is too long, a bell should be much shorter, like >> 0.1 sec or something. >> > > Hmmm... 0.5 seconds is the duration of typical audible bells. And with a > sit-for, it's at most 0.5 seconds, when the user presses a key the bell > signal disappears. That being said, I agree with you that 0.5 seconds is > perhaps a bit too long, so I changed it to 0.25 seconds. Eli is correct, 0.25 is far too long. 0.1 is much better. That is also closer to the duration of the current behavior for `visible-bell' on GNU/Linux (in fact, there is no reason not to use the exact same duration as before). In comparison with the old GNU/Linux behavior, your patch is basically as good or better. However, with your patch I have to wait until the flashing is over to read the text at the bottom. This was not the case previously. I think that would need to be fixed. My guess (without looking at the code) is that we would need to make sure that the bell function is called after the text is displayed rather than before. Perhaps this would require us to add a new hook or something. (If we do eventually decide to go this way, perhaps we could include a few variations, for example the idea of changing the mode-line text from Doom could be added as optional behaviour. I don't feel very strongly about this, but I thought it might be worth floating the idea. It's very easy to implement, and there is demonstrably at least some demand for it.)