From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Add a separate mode for .dir-locals.el Date: Fri, 18 Oct 2019 10:52:02 +0300 Message-ID: <83mudy8p99.fsf@gnu.org> References: <2058328b-aee5-8cb1-2659-a793e1354517@mit.edu> <87wod4m7sr.fsf@gnus.org> <835zkndcz4.fsf@gnu.org> <83ftjrbjhm.fsf@gnu.org> <83ftjr9sx4.fsf@gnu.org> <83eezb9s5b.fsf@gnu.org> <83bluf9qgb.fsf@gnu.org> <831rvb9m9d.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="4868"; mail-complaints-to="usenet@blaine.gmane.org" Cc: cpitclaudel@gmail.com, joaotavora@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 18 10:04:26 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iLNFK-00013s-0R for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2019 10:04:26 +0200 Original-Received: from localhost ([::1]:36200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLNFI-0005BW-DO for ged-emacs-devel@m.gmane.org; Fri, 18 Oct 2019 04:04:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60798) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLN3d-0001QI-F1 for emacs-devel@gnu.org; Fri, 18 Oct 2019 03:52:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iLN3c-0002AU-QK; Fri, 18 Oct 2019 03:52:20 -0400 Original-Received: from [176.228.60.248] (port=4877 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iLN3a-0000Hn-8S; Fri, 18 Oct 2019 03:52:19 -0400 In-reply-to: (message from Stefan Monnier on Thu, 17 Oct 2019 16:32:59 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:241189 Archived-At: > From: Stefan Monnier > Cc: joaotavora@gmail.com, cpitclaudel@gmail.com, emacs-devel@gnu.org > Date: Thu, 17 Oct 2019 16:32:59 -0400 > > > elisp-flymake-* at least have the advantage of having "flymake" in > > their names, so some relation is evident. > > Just because the original description of the problem talked about > flymake doesn't mean the problem is specific to flymake. Then maybe we should step back and describe the problem better. I already suggested that a few emails ago. Until now, the only problem that triggered this discussion was with Flymake. > > Differences that are important for an Emacs major mode? > > What differences are those? > > To quote the email to which you reply: > > ... other things we may want to fix such as the M-C-x binding which > makes no sense in .dir-locals.el, or the presence of "Byte-compile > this file" in the menu, ... The former might make sense, because .dir-locals.el can include 'eval' forms, right? If we care about the latter, it can be handled by being sensitive to 'no-byte-compile: t' instead. Or even compare with the file name, as bytecomp.el already does, as do other places. > These probably aren't that important, admittedly. Exactly. > But completion in .dir-locals.el doesn't work very well right now, > because the data has the form (VAR . VAL) but the completion > function presumes this is Elisp *code* where the head of a list > should be a function rather than a variable, so it will give you > bogus completions when trying to complete the variable names. We > couldn't cleanly fix this completion in a generic > emacs-lisp-data-mode, tho: we'd need something more specific like a > dir-locals-mode. > > > And why not make emacs-lisp-mode recognize these differences and > > support them accordingly? > > As I said "I don't care if we make it a separate major mode or not". > > Tho I was partly lying: I do think a separate major mode is a better > choice down the line (e.g. it makes it easier to use auto-mode-alist > and -*-...-*- to specify the behavior to use for .dir-locals.el, > ~/.emacs.d/bookmarks, ~/.emacs.d/tramp, ~/.emacs.d/ecomplterc, ...), but > that's a fairly minor detail compared to the fact that the issue goes > much further than "flymake in .dir-locals.el". This all sounds to me like "arguments from the future": we don't yet have any substantial reasons to define a major mode, but we are trying hard to think of any potential reason we might have in the future. If someone wants to work on such a comprehensive elisp-data-mode, with all the bells and whistles presented above, then by all means please do. When the job is done, let's look at the result and decide whether we want this in core, in ELPA, or not at all. But until that happens, all we have is this one minor problem, so the only urgent part is to solve that problem. And I consider adding a new major mode for that as uneconomical, inelegant, and potentially a maintenance burden (if, as I presume, the more general mode will never materialize). Please bear with me. We need to start pretesting Emacs 27 as soon as possible, and adding unnecessary new features is the wrong way of making this happen sooner rather than later. TIA