From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!! Date: Mon, 13 Jul 2009 17:45:31 +0900 Message-ID: References: <20090712144137.GB2524@muc.de> <87hbxhony6.fsf@stupidchicken.com> <20090712180623.GA1009@muc.de> <87k52dycha.fsf@stupidchicken.com> <20090712212103.GB1009@muc.de> <8763dx6wi9.fsf@stupidchicken.com> <871volkspy.fsf@uwakimon.sk.tsukuba.ac.jp> <20090713081949.GC1803@muc.de> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247474777 19345 80.91.229.12 (13 Jul 2009 08:46:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 08:46:17 +0000 (UTC) Cc: "Stephen J. Turnbull" , Jan =?iso-8859-1?Q?Dj=E4rv?= , Chong Yidong , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 13 10:46:07 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 1MQHAj-00062e-2n for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2009 10:46:05 +0200 Original-Received: from localhost ([127.0.0.1]:54063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQHAi-0000Ss-Cr for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2009 04:46:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQHAa-0000Q0-N6 for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:45:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQHAV-0000KW-63 for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:45:55 -0400 Original-Received: from [199.232.76.173] (port=50878 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQHAV-0000KR-0e for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:45:51 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:39839) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQHAM-0000PC-At; Mon, 13 Jul 2009 04:45:42 -0400 Original-Received: from tyo201.gate.nec.co.jp ([202.32.8.193]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQHAG-0006gd-Ax; Mon, 13 Jul 2009 04:45:36 -0400 Original-Received: from relay11.aps.necel.com ([10.29.19.46]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id n6D8jVVW023077; Mon, 13 Jul 2009 17:45:31 +0900 (JST) Original-Received: from relay21.aps.necel.com ([10.29.19.24] [10.29.19.24]) by relay11.aps.necel.com with ESMTP; Mon, 13 Jul 2009 17:45:31 +0900 Original-Received: from dhlpc061 ([10.114.114.32] [10.114.114.32]) by relay21.aps.necel.com with ESMTP; Mon, 13 Jul 2009 17:45:31 +0900 Original-Received: by dhlpc061 (Postfix, from userid 31295) id 31F6A52E226; Mon, 13 Jul 2009 17:45:31 +0900 (JST) System-Type: x86_64-unknown-linux-gnu Blat: Foop In-Reply-To: <20090713081949.GC1803@muc.de> (Alan Mackenzie's message of "Mon, 13 Jul 2009 08:19:49 +0000") Original-Lines: 35 X-Detected-Operating-System: by mx20.gnu.org: Solaris 8 (1) 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:112404 Archived-At: Alan Mackenzie writes: >> > It also seems downright bizarre to tell people not to set >> > c-file-style in .dir-settings.el -- my sense is that most developers >> > would agree that if a project has C style conventions, they should >> > override the user's personal preferences... > > They should act as a project wide default, which a user can > occasionally vary as he sees fit. The problem is not that > .dir-locals.el exists, but that it takes precedence over a user's > c-mode-hook, or a top-level (setq c-cleanup-list) in .emacs. Jan > complained that he was left with no way to set c-cleanup-list. (M-: > (setq ....) doesn't count as "a way" here.) Certainly if users were very careful about writing their hooks, and knew about the situation, they could write code in their hooks like "(when (no-project-setting 'c-file-style) ...do-my-generic-settings...)". _If_ they did that, then your suggestion of always giving hooks precedence could work. But of course, they _don't_, and even if they could, they almost certainly wouldn't (because people are generally a bit lazy and do the simplest thing that seems to work at first). For those settings for which there's general agreement that project settings should override personal general preferences (indentation style, tabs-or-none, etc), then, the current arrangement does the right thing in most cases. Of course it would be nice to have _some_ way a user could force the issue, some hook run after dir-settings are process, should he feel extremely strongly about some issue. Hmm, could one not use `hack-local-variables-hook' to do this? -Miles -- Bore, n. A person who talks when you wish him to listen.