From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Why we SHOULDN'T add a separate mode for .dir-locals.el Date: Sat, 19 Oct 2019 12:28:23 +0000 Message-ID: <20191019122823.GA7911@ACM> References: <2058328b-aee5-8cb1-2659-a793e1354517@mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="119604"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Andreas Schwab , =?iso-8859-1?Q?Cl=E9ment?= Pit-Claudel , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 19 14:30:59 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 1iLnsp-000UuO-Ef for ged-emacs-devel@m.gmane.org; Sat, 19 Oct 2019 14:30:59 +0200 Original-Received: from localhost ([::1]:54058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLnsn-0005Ko-Rz for ged-emacs-devel@m.gmane.org; Sat, 19 Oct 2019 08:30:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33784) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLnqV-0005GB-Np for emacs-devel@gnu.org; Sat, 19 Oct 2019 08:28:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLnqU-0002QO-Id for emacs-devel@gnu.org; Sat, 19 Oct 2019 08:28:35 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:38770 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1iLnqU-0002Ou-9U for emacs-devel@gnu.org; Sat, 19 Oct 2019 08:28:34 -0400 Original-Received: (qmail 74072 invoked by uid 3782); 19 Oct 2019 12:28:31 -0000 Original-Received: from acm.muc.de (p2E5D550D.dip0.t-ipconnect.de [46.93.85.13]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 19 Oct 2019 14:28:28 +0200 Original-Received: (qmail 7985 invoked by uid 1000); 19 Oct 2019 12:28:23 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:241225 Archived-At: Hello, Stefan. On Thu, Oct 17, 2019 at 09:40:32 -0400, Stefan Monnier wrote: > >> .dir-locals.el files are currently opened in emacs-lisp-mode, but they are > >> not proper Emacs Lisp files; > > In which way are they not proper? > They use the Sexp syntax of Elisp, but other than that, they're not > Elisp in the sense that they don't contain Elisp expressions. So what? There's nothing against one major mode being appropriate for several "types" of file, for whatever meaning of type. > I think it makes a lot of sense to make them use a different major-mode. I disagree entirely. The talk has been about cutting things out of Emacs Lisp Mode to make a new mode. So, the question arises, what should be cut out? Answer; NOTHING! I want all the facilities of Emacs Lisp Mode whilst editing a .dir-locals.el, not to have some overlord determine for me what I don't really want. > Not just for flymake. They could also use different font-lock rules, > they could benefit fromad-hoc key-bindings to add/remove settings, ... I think you're just making hypothetical arguments for a new mode, here. What specifically is wrong with Emacs Lisp Mode's font locking for .dir-locals.el? As for the add-hoc key bindings, the normal way to do that is with a minor mode, surely? What particular settings were you thinking about, anyway? ######################################################################### So, the situation we find ourselves in is that we want all of Emacs Lisp Mode to be operational whilst editing .dir-locals.el. We don't really want anything extra (or if we do, a minor mode is the way to do it). This is the prime criterion for having a single major mode for .dir-locals.el and foo.el. ######################################################################### It seems there's some sort of a problem (which I don't fully understand) in the relationship between Emacs Lisp Mode, dir-locals.el and flymake.el. Since a separate major mode for dir-locals.el isn't sensible, some other appropriate way of solving that problem. > Stefan -- Alan Mackenzie (Nuremberg, Germany).