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: files.el: Patch to make project-settings optional/customizable Date: Sun, 23 Nov 2008 12:45:59 +0200 Organization: JURTA Message-ID: <87ljvayb18.fsf@jurta.org> References: <5f0ff9220811130629t505badf9kb1bcc380df89a08f@mail.gmail.com> <200811131619.mADGJukm010206@mothra.ics.uci.edu> <87prkz4kgh.fsf@cyd.mit.edu> <200811131728.mADHSH2M010654@mothra.ics.uci.edu> <871vxflbxb.fsf@cyd.mit.edu> <200811131848.mADImPMQ011099@mothra.ics.uci.edu> <200811181636.mAIGa9Lx000571@mothra.ics.uci.edu> <87prks6693.fsf@jurta.org> <87iqqjcp3j.fsf@jurta.org> <87zljrh93w.fsf@jurta.org> <200811221940.mAMJeMpj020419@mothra.ics.uci.edu> <87ej13h73g.fsf@jurta.org> <200811222020.mAMKKBcY020496@mothra.ics.uci.edu> <87zljrm7yh.fsf@catnip.gol.com> <200811230810.mAN8A6fp022636@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227437967 26889 80.91.229.12 (23 Nov 2008 10:59:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Nov 2008 10:59:27 +0000 (UTC) Cc: Tom Tromey , "T.V. Raman" , emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 23 12:00:28 2008 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 1L4ChX-0001ku-7R for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2008 12:00:27 +0100 Original-Received: from localhost ([127.0.0.1]:56781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4CgO-0004Ta-6J for ged-emacs-devel@m.gmane.org; Sun, 23 Nov 2008 05:59:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4CgI-0004TM-Rs for emacs-devel@gnu.org; Sun, 23 Nov 2008 05:59:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4CgH-0004T8-3H for emacs-devel@gnu.org; Sun, 23 Nov 2008 05:59:10 -0500 Original-Received: from [199.232.76.173] (port=58485 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4CgG-0004T5-Tk for emacs-devel@gnu.org; Sun, 23 Nov 2008 05:59:08 -0500 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]:49537) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L4CgG-0007N6-Ku for emacs-devel@gnu.org; Sun, 23 Nov 2008 05:59:08 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1L4CgC-0006bd-TY; Sun, 23 Nov 2008 12:59:05 +0200 In-Reply-To: <200811230810.mAN8A6fp022636@mothra.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 23 Nov 2008 00:10:06 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: 565941832c2f675ae953af64aa3a5396 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 5806 [Nov 22 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:106019 Archived-At: > So there are 2 uses .dir-locals.el 3 lines apart in the same 24 lines function. > The defconst adds 4 lines. It's hard to keep a straight face and claim > that the defconst is a good idea. > (and the 2 uses could be reduced to a single one if we make > locate-dominating-file return an expanded file name -- which seems to be > a good idea anyway). > > It's kind of painful that this discussion is still going on, it should > have never occurred in the first place... I can't believe we have this kind of discussion :( All packages with similar functionality have defcustom for the file name. dir-locals.el: (defcustom dir-locals-file-name ".emacs-locals" "File name used by Dir-Locals mode to specify local variables. This should specify local variables in the normal way. When Dir-Locals minor mode is active, these will be inherited by files found in a directory tree containing such a file at its root. This may also be a function of no arguments which returns the name to use, allowing arbitrary per-directory customization of the per-directory customization file on the basis of `default-directory'." :group 'dir-locals :type '(choice file function)) dirvars.el: (defcustom dirvars-file-name ".emacs-dirvars" "File base name that is loaded by dirvars." :type 'string) dir-locals.el was created in 2005 and dirvars.el in 2002. For several years they provided customization without problems. Our discussion reached the need to make this file name constant. I'm ok with this conclusion. So I created defconst because it explicitly says that the file name should not be modified by the user, unlike if it was hidden in the function dir-locals-find-file where users will be the temptation to redefine the whole function without understanding that the file name have to be constant. PS: Reading the docstring of dir-locals-file-name in dir-locals.el seems to indicate that users trying to switch from dir-locals.el to similar functionality implemented now in files.el will be annoyed by its limitations but I'll leave this for another discussion where we will argue with the users of these packages. -- Juri Linkov http://www.jurta.org/emacs/