[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obsolescence warnings

From: Stefan Monnier
Subject: Re: Obsolescence warnings
Date: Wed, 11 Jan 2017 09:33:57 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

> (message-with-properties
>  '(face font-lock-warning-face)
>  "obsolete: %S" 'obsolete-thing)

> We can then tell people to look for easily visible "obsolete" in
> *Messages*, and they can do that at their own convenience, or we
> can programmatically collect such blurbs for a more concentrated
> presentation, later.

I think this is the easy part.  The harder parts are:
- perform the obsolescence checks (we don't do that currently for faces,
  and we don't do it for (setq <obsolete-var> <val>) in the user's
  ~/.emacs either).
- perform those checks efficiently.
- display them in an effective and friendly way.

For the last part, for example, I use locally

       (advice-add obsolete-name :before
                   (lambda (&rest _)
                     (message "Warning: %s is obsolete!" obsolete-name))
                   '((name . obsolescence-warning)))

in `make-obsolete`.  It kinda works.  But for some obsolete functions, it
leads occasionally to a deluge of messages which can be not just
annoying but can also hide the useful info.  So it's not friendly.

In other cases, the obsolescence message is actually never shown because
it's immediately replaced with another message.  Another problem with it
is that it doesn't tell me where that obsoleted function was called, so
I then have to chase down the source: you can't expect an end user to do
that, so his bug-report will often be rather useless.
So it's not really effective either.

I guess we could live with something like that where we only activate it
in the master branch (i.e. version numbers of the form NN.50.OO), but
even then people will get annoyed and will want to turn it off.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]