[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delayed warnings
From: |
Eli Zaretskii |
Subject: |
Re: Delayed warnings |
Date: |
Wed, 27 Apr 2011 06:05:22 +0300 |
> From: Juanma Barranquero <address@hidden>
> Date: Wed, 27 Apr 2011 02:55:57 +0200
> Cc: martin rudalics <address@hidden>, Emacs developers <address@hidden>
>
> - delayed-warnings-list: the list where desired warnigns are added.
> - delayed-warnings-function: the function to show warnings and reset
> `delayed-warning-list'. Defaults to `display-delayed-warnings'.
> - delayed-warnings-filter: a function that sould be called from
> `delayed-warnings-function' to filter out unwanted messages.
>
> plus one function:
>
> - display-delayed-warnings: Default value of
> `delayed-warnings-function'. It calls `display-warning' on the
> warnings (after filtering them with `delayed-warnings-filter'), then
> resets the warnings list to nil.
>
> I think this is conveniently flexible, and allows the user to filter
> out unwanted warnings with ease:
>
> (lexical-let* ((unwanted '("unwanted warning 1" "unwanted warning 2" ...))
> (unwanted-re (regexp-opt unwanted)))
> (defun my-delayed-warnings-filter (warning)
> (let ((text (cadr warning)))
> (and (string-match-p unwanted-re text)
> (message "%s: %s" (car warning) text)))))
Is it possible to also arrange from critical parts of the C code, such
as display engine, to automatically display any delayed warnings when
redisplay is done?
- Re: Delayed warnings, Juanma Barranquero, 2011/04/26
- Re: Delayed warnings,
Eli Zaretskii <=
- Re: Delayed warnings, Stefan Monnier, 2011/04/27
- Re: Delayed warnings, Juanma Barranquero, 2011/04/27
- Re: Delayed warnings, Stefan Monnier, 2011/04/27
- Re: Delayed warnings, Juanma Barranquero, 2011/04/27
- Re: Delayed warnings, Stefan Monnier, 2011/04/28
- Re: Delayed warnings, Juanma Barranquero, 2011/04/28
- Re: Delayed warnings, Stefan Monnier, 2011/04/28