From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Obsolescence warnings Date: Wed, 11 Jan 2017 09:33:57 -0500 Message-ID: References: <20161224023808.12868.71069@vcs.savannah.gnu.org> <20161224023808.9EE8D2201BC@vcs.savannah.gnu.org> <87h955r7wd.fsf@zigzag.favinet> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1484145329 21593 195.159.176.226 (11 Jan 2017 14:35:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jan 2017 14:35:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 11 15:35:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRJza-00047f-9Z for ged-emacs-devel@m.gmane.org; Wed, 11 Jan 2017 15:35:10 +0100 Original-Received: from localhost ([::1]:54649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRJze-0001aC-Td for ged-emacs-devel@m.gmane.org; Wed, 11 Jan 2017 09:35:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRJzY-0001Y1-Pz for emacs-devel@gnu.org; Wed, 11 Jan 2017 09:35:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRJzT-0000Vs-7V for emacs-devel@gnu.org; Wed, 11 Jan 2017 09:35:08 -0500 Original-Received: from [195.159.176.226] (port=58448 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRJzT-0000P7-0E for emacs-devel@gnu.org; Wed, 11 Jan 2017 09:35:03 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cRJyw-0000uk-5Z for emacs-devel@gnu.org; Wed, 11 Jan 2017 15:34:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:klJZD5Wu3qhdE2bRtnsGRqiYtyg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211194 Archived-At: > (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 ) 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