[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delayed warnings
From: |
Juanma Barranquero |
Subject: |
Re: Delayed warnings |
Date: |
Thu, 28 Apr 2011 02:59:56 +0200 |
On Thu, Apr 28, 2011 at 02:40, Stefan Monnier <address@hidden> wrote:
> I'm thinking about messages which would be displayed once
> after almost every command (because redisplay will bump into the same
> error after each command).
OK, but that makes the logic a bit more complex because the squashing
is carried from one run of `delayed-warnings-function' to the next.
How do you propose to detect that? By scanning the *Warnings* buffer?
(Though, to be fair, redisplay warnings could use their own buffer
*Redisplay Warnings*...)
> This can't be applied generally to all
> messages (it would be incorrect to silence the 2nd/3rd occurrences of
> a message if the message is really linked to the particular command
> executed which happens to be the same several times)
Even so, perhaps some strategy like the current message consolidation
("such&such [10 times]") could be used.
> so the squashable
> messages would need to be flagged.
In my design, the contents of `delayed-warnings-list' are arglists for
`display-warning': (TYPE MESSAGE [LEVEL [BUFER-NAME]]). So simple ways
to flag them would be:
- Use TYPE = redisplay for all redisplay warnings, and make
`display-delayed-warnings' know about it, or
- Add a variable `delayed-warnings-squashable-types', a list of TYPEs
that can be squashed, or
- As suggested above, send the redisplay warnings to their own buffer
via the BUFFER-NAME arg.
Juanma