From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!! Date: Tue, 14 Jul 2009 07:05:20 -0700 (PDT) Message-ID: <43507.130.55.118.19.1247580320.squirrel@webmail.lanl.gov> References: <20090712144137.GB2524@muc.de> <87hbxhony6.fsf@stupidchicken.com> <20090712180623.GA1009@muc.de> <87k52dycha.fsf@stupidchicken.com> <4A5C2C96.4080802@swipnet.se> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1247580358 14044 80.91.229.12 (14 Jul 2009 14:05:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jul 2009 14:05:58 +0000 (UTC) Cc: Alan Mackenzie , Chong Yidong , Stefan Monnier , emacs-devel@gnu.org To: Jan =?iso-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 14 16:05:50 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQidg-0000s3-PA for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2009 16:05:49 +0200 Original-Received: from localhost ([127.0.0.1]:58986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQidg-0003Oo-5I for ged-emacs-devel@m.gmane.org; Tue, 14 Jul 2009 10:05:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQida-0003Ll-1l for emacs-devel@gnu.org; Tue, 14 Jul 2009 10:05:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQidU-0003KL-Rx for emacs-devel@gnu.org; Tue, 14 Jul 2009 10:05:41 -0400 Original-Received: from [199.232.76.173] (port=39963 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQidU-0003KG-OQ for emacs-devel@gnu.org; Tue, 14 Jul 2009 10:05:36 -0400 Original-Received: from proofpoint2.lanl.gov ([204.121.3.26]:38409) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQidU-0002p5-2X for emacs-devel@gnu.org; Tue, 14 Jul 2009 10:05:36 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id n6EE5OEi001064; Tue, 14 Jul 2009 08:05:24 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 6724716115C; Tue, 14 Jul 2009 08:05:20 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 5384A16115B; Tue, 14 Jul 2009 08:05:20 -0600 (MDT) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id 4EBDA1518033; Tue, 14 Jul 2009 08:05:20 -0600 (MDT) Original-Received: from 130.55.118.19 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Tue, 14 Jul 2009 07:05:20 -0700 (PDT) In-Reply-To: <4A5C2C96.4080802@swipnet.se> User-Agent: SquirrelMail/1.4.8-5.7.lanl5.newsieve X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5, 1.2.40, 4.0.166 definitions=2009-07-14_11:2009-07-03, 2009-07-14, 2009-07-14 signatures=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112448 Archived-At: >> I don't think it's a feature that dir-locals.el takes precedence over >> mode-hooks (it's more of an accident that we consider sufficiently >> harmless not to fix it, especially since a fix would probably be >> difficult/inconvenient/buggy), but in this case it seems to provide just >> the behavior we want. I mean we do want to "impose" the GNU style in >> our files, no matter what the user usually prefers. >> >> What am I missing? > > That setting space-before-funcall in c-cleanup-list is a very > reasonable thing to do in the context of the GNU-style (why isn't it > on by default for GNU?), and in no way breaks the imposed style. But > the old ways of doing that in the Emacs source tree doesn't work > anymore, and there is nothing in NEWS, and AFAIK, no discussion about > it has taken place. It is just one of those frustrating > WTF-discoveries. That's the specific case that started this, yes. But I think the general point (that Stephen has made) bears another statement: the variable `c-file-style' controls both things that ought to be the decision of a project (like indentation and brace placement) and things that ought to be the decision of each individual user (like what sort of cleanup to do automatically). Once we realize that, the problem is obvious: that coupling of choices (that are properly made by different people) prevents _any_ order of precedence from being correct. There is the separate issue that .dir-locals.el is harder to notice than true file-local variables, and so confusion is likely when it does unexpected things (like this). The proposed addition to the output of C-h v would go a long way towards fixing that; my implementation suggestion is to have `hack-local-variables' make (buffer-local) lists `file-locals' and `dir-locals' of symbols that have been made local for the appropriate reason. (Of course, a later `setq' or `kill-local-variable' can render these lists inaccurate. The latter doesn't matter, since C-h v would see that it wasn't local anyway. The lists could contain their original local values as well to detect the former case.) Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.