all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Obsolescence warnings
Date: Wed, 11 Jan 2017 09:33:57 -0500	[thread overview]
Message-ID: <jwvmvexwuba.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 87h955r7wd.fsf@zigzag.favinet

> (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.


        Stefan




      reply	other threads:[~2017-01-11 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20161224023808.12868.71069@vcs.savannah.gnu.org>
     [not found] ` <20161224023808.9EE8D2201BC@vcs.savannah.gnu.org>
2016-12-24  5:02   ` Obsolescence warnings (was: [Emacs-diffs] master 9227b5c: last-chance: new utility lib for dangling deterrence) Stefan Monnier
2017-01-11 14:25     ` Obsolescence warnings Thien-Thi Nguyen
2017-01-11 14:33       ` Stefan Monnier [this message]

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

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

  git send-email \
    --in-reply-to=jwvmvexwuba.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.