From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Delayed warnings Date: Mon, 21 Mar 2011 19:06:41 +0100 Message-ID: <4D8793B1.2040701@gmx.at> References: <4D8705CA.1020300@gmx.at> <4D874FF3.9010606@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1300730872 31543 80.91.229.12 (21 Mar 2011 18:07:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2011 18:07:52 +0000 (UTC) Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 19:07:46 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1jW4-0008GF-NW for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2011 19:07:44 +0100 Original-Received: from localhost ([127.0.0.1]:37127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1jW4-0005qJ-1U for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2011 14:07:44 -0400 Original-Received: from [140.186.70.92] (port=36880 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1jV8-0004ym-Os for emacs-devel@gnu.org; Mon, 21 Mar 2011 14:06:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1jV7-00016i-Lj for emacs-devel@gnu.org; Mon, 21 Mar 2011 14:06:46 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:44510) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q1jV7-00016c-9W for emacs-devel@gnu.org; Mon, 21 Mar 2011 14:06:45 -0400 Original-Received: (qmail invoked by alias); 21 Mar 2011 18:06:43 -0000 Original-Received: from 62-47-55-101.adsl.highway.telekom.at (EHLO [62.47.55.101]) [62.47.55.101] by mail.gmx.net (mp012) with SMTP; 21 Mar 2011 19:06:43 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1++XsISbgm+ps2MaC2SrMq7zqZehi/RBS2PVwTFCl Mv4lI7JuD5mjUJ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.165.64.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137491 Archived-At: > Of course there's a hierarchy of "errors": those that the user cannot > do anything about (and should go to *Messages*), those that the user > *must* attend to (and should either interrupt the user or bring Emacs > to a halt), and warnings that inform the user about what he should > do/know, but can be ignored. > > I'm mostly concerned about the third kind, specially when they happen > in low-level code, because they are difficult to make (from C) both > visible and, user wishing, easily ignorable. Sending them to > *Messages* is not enough, unless we're going to (pop-to-buffer > "*Messages*") and that's basically duplicating `display-warning' :-) I thought you had something in mind like `display-warning' tailored for the case that `display-warning' isn't callable for some reason. >> What I wanted is a mechanism that handles (and optionally ignores) all >> sorts of errors/warnings which currently can't be issued prominently >> because Emacs is in an inconsistent state. > > Which kind of design have you in mind? A `display-delayed-warnings' function run after `post-command-hook' more or less from where `deferred-action-function' was or is called. That function would display all (appropriately filtered) warnings that have accumulated in the `delayed-warnings' list since the last time it was called and reset the list to nil. Ideally, `display-delayed-warnings' would call `display-warning' for each element of `delayed-warnings'. Warnings from asynchronous processes or functions run by timers are a different issue. martin