From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Make byte-compile-error-on-warn a safe variable for file compilation Date: Fri, 5 Jan 2018 07:05:12 -0500 Message-ID: References: <87wp0yhsgu.fsf@cochranmail.com> <87vaggrfqo.fsf@cochranmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1515153822 3509 195.159.176.226 (5 Jan 2018 12:03:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Jan 2018 12:03:42 +0000 (UTC) Cc: Emacs developers To: Robert Cochran Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 05 13:03:38 2018 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 1eXQia-00085K-It for ged-emacs-devel@m.gmane.org; Fri, 05 Jan 2018 13:03:24 +0100 Original-Received: from localhost ([::1]:36228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXQkY-0006tj-1Q for ged-emacs-devel@m.gmane.org; Fri, 05 Jan 2018 07:05:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXQkO-0006tT-9A for emacs-devel@gnu.org; Fri, 05 Jan 2018 07:05:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXQkM-0006vQ-N5 for emacs-devel@gnu.org; Fri, 05 Jan 2018 07:05:16 -0500 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:38810) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXQkM-0006tv-BS for emacs-devel@gnu.org; Fri, 05 Jan 2018 07:05:14 -0500 Original-Received: by mail-wm0-x22a.google.com with SMTP id 64so2072273wme.3 for ; Fri, 05 Jan 2018 04:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xh/gb/mABXXpiFcaA7iHNdEh/sd6313qMEHVHwPvDM4=; b=vgE/39gsvrMhynvDNP9K0FLmTaotNhAge534Hj7okZ4S72Ml0sE48ylF5Jwe/1md34 79sSIgcogYhW4zTpviudOgh0uterhapLxmWa70sMrriKaUqmvJTeftH60NWLcFM00a8y L8ngYbpiN//fbtGlZfJlvN8AT9KYOmXN91z6NbKx9yYvHI5rj9VSE2StNEo2Pecj47hu O3S7BOVE840KFnehZb3Zabt13uSMQne0kkVsQfbTjEu4ysw9ZsTdIKougKH0bSHmbhtl orPUH7h3xDQF0BoF7lXUMnov/BMKKdT6TJYyvZ84fFYKPHZR/btaQ/nZX+gCH/v1SMF5 hayg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xh/gb/mABXXpiFcaA7iHNdEh/sd6313qMEHVHwPvDM4=; b=NRhdyO3nbZFmdXa6sWx6Sn+0iUhIWDg2q81DbfDhhikEIRpdcy9BKBVbnOcgStGZyV 5hVGo3PagA0Eii0sh1FCxc+bKMAqTpkAj4IpVCsyHGrDFUz7ceGeUUWlWLrNbsLqieMY Lz+cKjUtjG0dsWpa06PE0lEAiEIPhUHuPNJtuGq3Ilf8Je0N3XQpkaShKDP8sTfe4MIp CM+Ka+gHUIie8FIlH1KPe6CDgYYGj/628tRFndFZO1Q1G1otd9ccEpUyrvc6qx9ud5V0 QqYHXOF469DBUnsWbK163QZI+yaUwwMcbL7xaYPrCe/c5+TvmjC+wQPvO7VKB3a32btZ Hv6Q== X-Gm-Message-State: AKGB3mLtINenoEohFdkk3659wWBF6c6HEECiQWsCSxr8QtmrLRl2+KdG GQqBO8oeySMuOVm+uMRqNUwswwFPZ+jdPVNKxYX+Kw== X-Google-Smtp-Source: ACJfBosYkSoPU6IT0L0PAKbVwzJdGBrJbCMZShUWDCNLiGaAvLYZ/0sYpeqLMP1k8O4arRpw+Lq71QV92p5DhyRETP0= X-Received: by 10.28.8.135 with SMTP id 129mr2347670wmi.2.1515153912777; Fri, 05 Jan 2018 04:05:12 -0800 (PST) Original-Received: by 10.223.145.129 with HTTP; Fri, 5 Jan 2018 04:05:12 -0800 (PST) In-Reply-To: <87vaggrfqo.fsf@cochranmail.com> X-Google-Sender-Auth: 7tTYSkNPgea9RCTSSXEk9eE-z5A X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22a 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:221612 Archived-At: On Fri, Jan 5, 2018 at 1:17 AM, Robert Cochran wrote: > I somehow came to the conclusion that the way I did it was the simplest > and cleanest to me. I noticed that `safe-local-variable-values' is nil > by default and I took that as a hint (rightly or wrongly) to not touch > the value directly. I was also aiming to prevent easily tampering with > the variable, again, however right or wrong that particular decision > seems to you. Okay, I think preventing easy tampering (by the user) is not a useful goal. > On that topic, since `safe-local-variable-values' is nil by default, > where is it exactly that you would recommend I add this variable? A few > quick greps didn't give me any clear ideas. See `(elisp) File Local Variables': You can specify safe values for a variable with a `safe-local-variable' property. The property has to be a function of one argument; any value is safe if the function returns non-`nil' given that value. Many commonly-encountered file variables have `safe-local-variable' properties; these include `fill-column', `fill-prefix', and `indent-tabs-mode'. For boolean-valued variables that are safe, use `booleanp' as the property value. >> Solving Bug#4837 would be helpful for this, as currently there is no >> practical way to fix/suppress the obsolete warnings in the code that >> remains to support the obsolete option. >> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=4837 > > Yeah, I was thinking about that. In private discussion with friends, it > was mentioned that it could be a `declare' option - something like > (declare no-warn-obsolete) - but that's not very satifying for anything > other than defuns. That would cover too much code as well.