From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Blunderbuss ".dir-locals.el" raises everything in its path!! Date: Mon, 13 Jul 2009 08:19:49 +0000 Message-ID: <20090713081949.GC1803@muc.de> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247473106 14758 80.91.229.12 (13 Jul 2009 08:18:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 08:18:26 +0000 (UTC) Cc: Chong Yidong , Jan =?iso-8859-1?Q?Dj=E4rv?= , emacs-devel@gnu.org, Miles Bader To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 13 10:18:18 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 1MQGjp-0004gS-T3 for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2009 10:18:18 +0200 Original-Received: from localhost ([127.0.0.1]:43463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQGjn-0000zB-IL for ged-emacs-devel@m.gmane.org; Mon, 13 Jul 2009 04:18:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQGjY-0000ts-KQ for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:18:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQGjS-0000qB-DN for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:17:59 -0400 Original-Received: from [199.232.76.173] (port=38664 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQGjS-0000q2-3d for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:17:54 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:2040 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQGjR-0002Ec-Fw for emacs-devel@gnu.org; Mon, 13 Jul 2009 04:17:53 -0400 Original-Received: (qmail 97912 invoked by uid 3782); 13 Jul 2009 08:17:51 -0000 Original-Received: from acm.muc.de (pD9E504D6.dip.t-dialin.net [217.229.4.214]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 13 Jul 2009 10:17:48 +0200 Original-Received: (qmail 3021 invoked by uid 1000); 13 Jul 2009 08:19:49 -0000 Content-Disposition: inline In-Reply-To: <871volkspy.fsf@uwakimon.sk.tsukuba.ac.jp> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:112400 Archived-At: Morning, Stephen! On Mon, Jul 13, 2009 at 03:22:17PM +0900, Stephen J. Turnbull wrote: > Miles Bader writes: > > Chong Yidong writes: > > >> ! These settings can override those made by a user in his .emacs so > > >> ! you should be careful not to set variables which are a matter of > > >> ! personal choice. You should probably not set @code{c-file-syle} > > >> ! and @code{c-file-offsets} here (@pxref{File Styles,,,ccmode}). > > > But I think we have a basic disagreement here. A user should feel > > > free to set directory local variables that override his or her .emacs > > > settings---exactly like he or she should feel free to write file-local > > > variables. The manual has no purpose telling people what to do with > > > their own files. > I don't understand what you are saying. The manual has done that > forever! There is specific advice *not* to set auto-fill mode in > local variables, for example. > And there is good reason for that. Files are *not* "of the user". > Files are a means of communication. Sometimes indeed they are memos > to oneself in the future, but more often they are for communicating > with others. > The issue Alan is raising is precisely that *somebody else* is > overriding the user's settings. Thank you! That is EXACTLY what I'm raising. What's more, the overriding is surreptitious - it took Jan some time to find out what was going wrong. How do you turn off this .dir-locals.el thingy? I agree with Miles: > > 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... No. 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.) > Indeed. I think that needs to be sorted out here is Alan's intuition > that C style conventions are a matter of personal preference. Hey, that's not fair! c-cleanup-list is partly project conventions (in that it can implement formatting rules), partly personal preference (in that it enables electric action in a C buffer). For example, a project may specify the 'brace-else-brace' convention (see page "Clean-ups" in the CC Mode manual), but a hacker may not want this to be done electrically in his Emacs. -- Alan Mackenzie (Nuremberg, Germany).