From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: status of dir-vars or dir-locals inclusion in emacs? Date: Mon, 03 Sep 2007 14:25:59 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1188844166 27346 80.91.229.12 (3 Sep 2007 18:29:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Sep 2007 18:29:26 +0000 (UTC) Cc: joakim@verona.se, emacs-devel@gnu.org To: tromey@redhat.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 03 20:29:25 2007 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 1ISGfl-00064k-2V for ged-emacs-devel@m.gmane.org; Mon, 03 Sep 2007 20:29:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISGfh-0001l9-6l for ged-emacs-devel@m.gmane.org; Mon, 03 Sep 2007 14:29:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ISGcp-0007zN-44 for emacs-devel@gnu.org; Mon, 03 Sep 2007 14:26:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ISGco-0007yX-Gd for emacs-devel@gnu.org; Mon, 03 Sep 2007 14:26:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISGco-0007yJ-AR for emacs-devel@gnu.org; Mon, 03 Sep 2007 14:26:14 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ISGco-00008K-0T for emacs-devel@gnu.org; Mon, 03 Sep 2007 14:26:14 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1ISGcZ-00066a-FI; Mon, 03 Sep 2007 14:25:59 -0400 In-reply-to: (message from Tom Tromey on Sat, 01 Sep 2007 16:40:22 -0600) X-Detected-Kernel: 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:77668 Archived-At: + The first approach is to put a special file in the root directory of +a project. When opening a local file, Emacs will search for this file +and, if the file exists, Emacs will apply local variable settings from +the file to the new buffer. (This search is skipped for remote +files.) 1. Please stick to the present tense all the time in documentation unless some other tense is mandatory. So please say "Emacs searches". Please look for other places in your text where this rule might apply. 2. It took me a couple of seconds to realize why the word "local" is there and what it means, since in this context "local" usually means "buffer-local". I suggest using only the word "remote" and avoiding use of "local" as its antonym. 3. Please avoid the passive voice, so please write "If the file is remote, Emacs doesn't do this search, because it would be too slow." + Emacs looks for files named @file{emacs-settings.el}, +@file{.emacs-settings.el}, or @file{.emacs-settings}, in that order. ...and looks for them in the current directory, its parent, and so on up the directory hierarchy. + When reading settings from a file like this, Emacs will +automatically filter out risky local variables. This makes it safe +for projects to check in appropriate Emacs settings to their version +control. Whether they use version control is irrelevant; you can make the text simpler by avoiding that tangent. + This example, although incomplete, defines some settings for GNU +GCC. 1. In what sense is it imcomplete? 2. "GNU GCC" is redundant. 3. In what sense are these settings "for GCC"? That is not clear. I first interpreted those words as meaning these settings affect use of GCC. Do you actually mean that they are used for the source code of GCC? 4. Why include (tab-width . 8)? That is the default? + The second approach to project-local settings is to explicitly +define a project class using @code{define-project-bindings}, and then +to tell Emacs which directory roots correspond to that class, using +@code{set-directory-project}. That needs to give a little more information or else refer to a place to find more. +** project.el is now part of Emacs. This provides for per-project +settings of local variables. + The file name is irrelevant -- please describe the feature, and the user-interfaces (briefly is enough).