From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kelly Dean Newsgroups: gmane.emacs.devel Subject: Proposal for debugging/testing option Date: Fri, 20 Feb 2015 20:27:17 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424464159 15230 80.91.229.3 (20 Feb 2015 20:29:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Feb 2015 20:29:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 20 21:29:04 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YOuC7-0002zW-AZ for ged-emacs-devel@m.gmane.org; Fri, 20 Feb 2015 21:29:03 +0100 Original-Received: from localhost ([::1]:34121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOuC6-0000aa-M1 for ged-emacs-devel@m.gmane.org; Fri, 20 Feb 2015 15:29:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOuBt-0000aH-4e for emacs-devel@gnu.org; Fri, 20 Feb 2015 15:28:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOuBp-0005sT-QY for emacs-devel@gnu.org; Fri, 20 Feb 2015 15:28:49 -0500 Original-Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:58163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOuBp-0005rz-K3 for emacs-devel@gnu.org; Fri, 20 Feb 2015 15:28:45 -0500 Original-Received: from mfilter31-d.gandi.net (mfilter31-d.gandi.net [217.70.178.162]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id C83BE41C054; Fri, 20 Feb 2015 21:28:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter31-d.gandi.net Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter31-d.gandi.net (mfilter31-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 9yDAS2E-sUmO; Fri, 20 Feb 2015 21:28:39 +0100 (CET) X-Originating-IP: 66.220.3.179 Original-Received: from localhost (gm179.geneticmail.com [66.220.3.179]) (Authenticated sender: kelly@prtime.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 5E2F141C053; Fri, 20 Feb 2015 21:28:36 +0100 (CET) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4b98:c:538::197 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183333 Archived-At: Stefan Monnier wrote: > Based on my experience with emitting messages in similar oddball cases > (i.e. making a variable buffer-local while it's globally let-bound), my > guess is that it would catch a few very rare oddball cases indeed, but: > 1- those oddball cases end up harmless. > 2- there's no easy "fix" for those cases (because the let-binding and the > makunbound happen in completely unrelated code which usually aren't > used at the same time and what *really* should happen is at best > unclear, or is otherwise exactly what happens with the current > semantics you don't like). Would it be ok to add an option to barf in those cases instead of just emitting warning messages? Even if users won't use the option, it would be appropriate during development and testing. I.e. barf-if-probable-bug, with the possible values t, 'warn, and nil. With 'warn as the default. Then, in the rare cases where it really is not a bug, the barf option can be let-bound to nil (i.e. a runtime analog of the with-no-warnings wrapper), which both suppresses the warning messages for known-correct usage and explicitly indicates in the code that the case has been reviewed and determined to not be a bug.