From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#40774: Error messages shouldn't be hidden when the user is idle Date: Thu, 20 Aug 2020 15:41:50 +0200 Message-ID: <874koxwi1t.fsf@gnus.org> References: <83blnje5ro.fsf@gnu.org> <838sine4si.fsf@gnu.org> <837dy7e3wr.fsf@gnu.org> <-ZmNQQ07JD7L0I5EpXolv4t1UhWBGc4SN0dkJml3cLbBjO6ucAMUzAqsI9Ca69xO_hzlMLfaLs6bY9vq8GAR24RUGu1LZqVoVkXhiJcFgtg=@protonmail.com> <835zdre31u.fsf@gnu.org> <87v9lpluez.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4258"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 40774@debbugs.gnu.org, ndame@protonmail.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 20 15:43:11 2020 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 1k8kqU-00010A-LJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 15:43:10 +0200 Original-Received: from localhost ([::1]:55018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8kqT-0006Eq-MS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Aug 2020 09:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8kqM-0006CL-AL for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 09:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8kqM-0003Yh-0f for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 09:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8kqL-0000rj-Sy for bug-gnu-emacs@gnu.org; Thu, 20 Aug 2020 09:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Aug 2020 13:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40774 X-GNU-PR-Package: emacs Original-Received: via spool by 40774-submit@debbugs.gnu.org id=B40774.15979309293263 (code B ref 40774); Thu, 20 Aug 2020 13:43:01 +0000 Original-Received: (at 40774) by debbugs.gnu.org; 20 Aug 2020 13:42:09 +0000 Original-Received: from localhost ([127.0.0.1]:42007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8kpV-0000qZ-4N for submit@debbugs.gnu.org; Thu, 20 Aug 2020 09:42:09 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:57660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8kpR-0000pe-M8 for 40774@debbugs.gnu.org; Thu, 20 Aug 2020 09:42:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GjTEvOge1gvgDhTGNf8jGZHl59Rv+YC6cUWSYiLbypU=; b=R440u3sO0PAE2mv8w+tFu5vNBa aCr8z6H/6Gwav0+zp2rc7osbSD8+NDA5OZ2/oPXOC8ysTeDXsdPSVoHb59Yp0tpjFW5tdumMvEOu7 DFC+eo29Q9u/2QGHcupwSvnx+M7KY9TVgVEObyIzIYWDI1GDYDOk7dFu+EdXDk0E5krg=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k8kpE-00040t-4i; Thu, 20 Aug 2020 15:41:54 +0200 X-Now-Playing: Various's _SHAPE Platform 2019_: "Maria W Horn - Intelocked Cycles II" In-Reply-To: <87v9lpluez.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 24 Apr 2020 01:16:36 +0300") 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:185690 Archived-At: Juri Linkov writes: > I see now what you mean. This can be easily implemented with the > following patch. So you can set `clear-message-function' to a function > that returns a non-nil, and the echo area won't be cleared. > > Such predicate function could contain a complex logic, but for testing > you could use just: > > (setq clear-message-function (lambda () t)) [...] > - safe_call (1, Vclear_message_function); > + preserve = safe_call (1, Vclear_message_function); > unbind_to (count, Qnil); > } > + > + if (NILP (preserve)) > + { > + echo_area_buffer[0] = Qnil; > + message_cleared_p = true; > + } It an interesting idea, but I don't think this would be a backwards-compatible implementation. Today, the return value of clear-message-function isn't used, so we have to assume that users of that variable returns... whatever. Giving it semantics now would lead to the message area being preserved unexpectedly. Or not, if somebody has used that function to semi-clear the echo area, and then return nil? So this would have to be implemented in a different way, unfortunately, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no