From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Add file-locals and dir-locals Date: Wed, 05 Aug 2009 02:59:41 +0300 Organization: JURTA Message-ID: <877hxj6sgi.fsf@mail.jurta.org> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249430423 12363 80.91.229.12 (5 Aug 2009 00:00:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2009 00:00:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 05 02:00:16 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 1MYTvN-0007mK-3W for ged-emacs-devel@m.gmane.org; Wed, 05 Aug 2009 02:00:09 +0200 Original-Received: from localhost ([127.0.0.1]:55768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYTvL-0006Ua-Tp for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2009 20:00:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYTvG-0006UV-Lf for emacs-devel@gnu.org; Tue, 04 Aug 2009 20:00:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYTvB-0006Tx-WD for emacs-devel@gnu.org; Tue, 04 Aug 2009 20:00:02 -0400 Original-Received: from [199.232.76.173] (port=56702 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYTvB-0006Tu-Sj for emacs-devel@gnu.org; Tue, 04 Aug 2009 19:59:57 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:50451 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYTvB-0006Ll-9n for emacs-devel@gnu.org; Tue, 04 Aug 2009 19:59:57 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.70.102.cable.starman.ee [82.131.70.102]) by mx1.starman.ee (Postfix) with ESMTP id C17183F419B; Wed, 5 Aug 2009 02:59:50 +0300 (EEST) In-Reply-To: (Leo's message of "Wed, 22 Jul 2009 04:49:48 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) 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:113691 Archived-At: > 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 Please try these commands and tell what do you think. -- Juri Linkov http://www.jurta.org/emacs/