unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Delayed warnings
Date: Mon, 21 Mar 2011 19:06:41 +0100	[thread overview]
Message-ID: <4D8793B1.2040701@gmx.at> (raw)
In-Reply-To: <AANLkTinJ2+uTTNQkyG4K747i+ZMnqQxs9NQNdWrz1=TQ@mail.gmail.com>

 > 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



  reply	other threads:[~2011-03-21 18:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-20  5:44 Delayed warnings Juanma Barranquero
2011-03-21  8:01 ` martin rudalics
2011-03-21 12:01   ` Juanma Barranquero
2011-03-21 13:17     ` martin rudalics
2011-03-21 13:43       ` Eli Zaretskii
2011-03-21 18:06         ` martin rudalics
2011-03-21 14:48       ` Juanma Barranquero
2011-03-21 18:06         ` martin rudalics [this message]
2011-03-21 20:19           ` Juanma Barranquero
2011-03-21 22:05             ` Stefan Monnier
2011-03-22  7:59               ` martin rudalics
2011-03-22 11:59               ` Juanma Barranquero
2011-03-23 13:50               ` Jeff Sparkes
2011-03-25 13:10               ` Juanma Barranquero
2011-04-27  0:55                 ` Juanma Barranquero
2011-04-27  3:05                   ` Eli Zaretskii
2011-04-27 11:27                     ` Juanma Barranquero
2011-04-27 17:32                   ` Stefan Monnier
2011-04-27 22:11                     ` Juanma Barranquero
2011-04-28  0:40                       ` Stefan Monnier
2011-04-28  0:59                         ` Juanma Barranquero
2011-04-28 15:26                           ` Stefan Monnier
2011-04-28 16:22                             ` Juanma Barranquero
2011-04-28 18:39                               ` Stefan Monnier
2011-05-08 17:58                               ` Chong Yidong
2011-05-08 18:43                                 ` Juanma Barranquero
2011-05-09 14:15                                   ` Stefan Monnier
2011-05-09 18:28                                   ` Richard Stallman
2011-03-22  7:58             ` martin rudalics
2011-03-22 12:04               ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D8793B1.2040701@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).