From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Relics of removed dir-locals-file-2 feature in pretest Date: Mon, 27 Nov 2017 18:14:57 +0200 Message-ID: <83r2sj66m6.fsf@gnu.org> References: <833757cqy7.fsf@gnu.org> <83tvxmbat5.fsf@gnu.org> <83lgiyb801.fsf@gnu.org> <83d149at4o.fsf@gnu.org> <831skobvvw.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1511799333 28196 195.159.176.226 (27 Nov 2017 16:15:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Nov 2017 16:15:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kaushal Modi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 27 17:15:26 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJM3u-0006Ca-PY for ged-emacs-devel@m.gmane.org; Mon, 27 Nov 2017 17:15:14 +0100 Original-Received: from localhost ([::1]:33495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJM42-0001KG-1m for ged-emacs-devel@m.gmane.org; Mon, 27 Nov 2017 11:15:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJM3s-0001IE-Ic for emacs-devel@gnu.org; Mon, 27 Nov 2017 11:15:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJM3o-0008Ak-ET for emacs-devel@gnu.org; Mon, 27 Nov 2017 11:15:12 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJM3o-0008Ac-Au; Mon, 27 Nov 2017 11:15:08 -0500 Original-Received: from [176.228.60.248] (port=2103 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eJM3n-0006uO-OC; Mon, 27 Nov 2017 11:15:08 -0500 In-reply-to: (message from Kaushal Modi on Mon, 27 Nov 2017 14:57:26 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220486 Archived-At: > From: Kaushal Modi > Date: Mon, 27 Nov 2017 14:57:26 +0000 > Cc: emacs-devel@gnu.org > > Let's say a user reads the NEWS and finds: > > > * A second dir-local file (.dir-locals-2.el) is now accepted. > > See the variable 'dir-locals-file-2' for more information. > > They do C-h v dir-locals-file-2 and read: > > > This essentially a second file that can be used like `dir-locals-file', .. > > That is incorrect! dir-locals-file-2 *cannot* be used like `dir-locals-file'! That variable is just declared but not > used anywhere (why is it that only I think that that's a problem). A user can The "second file" is .dir-locals-2.el, i.e. the value. > Reading further in that docstring: > > > See Info node `(elisp)Directory Local Variables' for details. > > That node has no reference to dir-locals-file-2 variable or a mention of the feature that .dir-locals-2.el can be > used to override .dir-local.el. So maybe we need to add that to the manual. > Also in the doc-string of dir-locals-file: > > > See also `dir-locals-file-2', whose values override this one's. > > No, it *does not*! dir-locals-file-2 is not used in any code. But its (constant) value does override, doesn't it? > Thank you for volunteering, but I'm not yet sure we should do that. > > Please consider making this change. Which change? You are arguing about multiple issues, and I'm confused about what change do you have in mind, exactly. > From your earlier email (I missed replying to this part): > > > We could remove the defconst, but just removing it is not enough, > > because that would also remove its doc string. > > Why is that bad? Because iut's the only place where .dir-locals-2.el is documented. > That variable is anyways not used.. so what's the point of keeping docstring of an unused > variable. The doc string documents a feature. If you remove the doc string and do nothing else, where will that feature be documented? > Why not just mention that a user can just add "-2" to (file-name-sans-extension dir-locals-file), and that file can > be used to override dir-locals-file. Mention that in the dir-locals-file docstring and the (elisp)Directory Local > Variables node. That might work. As I said, just removing the defconst is not enough. > The documentation is broken. It is incorrect, misleading. Then let's fix the documentation. > And I am not just complaining, I am willing to provide a patch that removes that defconst and updates the > dir-local-file doc-string and the manual to make this feature better discoverable. So why is that is problem? I didn't say it was a problem, you misunderstood what I said. Feel free to submit such a patch, and thanks in advance.