From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Add file-locals and dir-locals Date: Sat, 8 Aug 2009 01:18:29 -0700 (PDT) Message-ID: <200908080818.n788ITt9001661@godzilla.ics.uci.edu> References: <20090712144137.GB2524@muc.de> <87hbxhony6.fsf@stupidchicken.com> <20090712180623.GA1009@muc.de> <4A5A2BE1.3050206@harpegolden.net> <87ab34p0o4.fsf_-_@mail.jurta.org> <4A602EF9.9070306@gmx.at> <87d47z3584.fsf@mail.jurta.org> <4A61D293.6020105@gmx.at> <87ocrhk53y.fsf@mail.jurta.org> <4A62F78A.7030201@gmx.at> <87tz187dac.fsf@mail.jurta.org> <87k521o6kh.fsf@mail.jurta.org> <877hxj6sgi.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249719659 2648 80.91.229.12 (8 Aug 2009 08:20:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Aug 2009 08:20:59 +0000 (UTC) Cc: Leo , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 08 10:20:51 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 1MZhAW-00045j-QS for ged-emacs-devel@m.gmane.org; Sat, 08 Aug 2009 10:20:49 +0200 Original-Received: from localhost ([127.0.0.1]:45323 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZhAW-0006HW-7a for ged-emacs-devel@m.gmane.org; Sat, 08 Aug 2009 04:20:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZhAF-0006CY-Vl for emacs-devel@gnu.org; Sat, 08 Aug 2009 04:20:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZhAA-0006Am-Qx for emacs-devel@gnu.org; Sat, 08 Aug 2009 04:20:31 -0400 Original-Received: from [199.232.76.173] (port=36278 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZhAA-0006AZ-Cb for emacs-devel@gnu.org; Sat, 08 Aug 2009 04:20:26 -0400 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:61726) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MZhA9-0001bi-Hy for emacs-devel@gnu.org; Sat, 08 Aug 2009 04:20:25 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n788ITWa018843; Sat, 8 Aug 2009 01:18:29 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n788ITt9001661; Sat, 8 Aug 2009 01:18:29 -0700 (PDT) In-Reply-To: <877hxj6sgi.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 05 Aug 2009 02:59:41 +0300") Original-Lines: 40 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n788ITWa018843 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:113795 Archived-At: Juri Linkov writes: > > I forgot to mention in the last post that there is also directory-local > > variables, which I think should also be supported. But we can get > > support for file local variables first and worry about that later. > > This was implemented already. > > > I'd prefer the default to add to the end of a buffer, because file local > > variables at the end of a file is more difficult to get right manually. > > > > With one C-u, add to the header > > > > With two C-u, add to .dir-locals.el > > This requires from the user leaning and remembering > how many C-u to type. > > > Another approach is to give the user a list to select: > > > > 1. head 2. foot 3. dir > > This is not convenient to use. > > Meanwhile I implemented new commands `add-file-local-variable-prop-line' > and `delete-file-local-variable-prop-line'. The suffix `-prop-line' > is by analogy with the pair of functions `hack-local-variables' and > `hack-local-variables-prop-line'. > > As not frequently used commands, it's not difficult for the user to > select the necessary command using completions for M-x: > > M-x add-file-local-variable RET > M-x add-file-local-variable-prop-line RET > M-x add-dir-local-variable RET These are nice and useful, but do they need to be in files.el? files.el is in the dumped image, and these functions are not going to be used all the often, so putting them in a separate file seems more in line with the way they will be used. WDYT?