From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Add a separate mode for .dir-locals.el Date: Sat, 19 Oct 2019 17:13:54 +0100 Message-ID: References: <2058328b-aee5-8cb1-2659-a793e1354517@mit.edu> <835zkndcz4.fsf@gnu.org> <83ftjrbjhm.fsf@gnu.org> <83ftjr9sx4.fsf@gnu.org> <83eezb9s5b.fsf@gnu.org> <83bluf9qgb.fsf@gnu.org> <835zkn9o01.fsf@gnu.org> <83lfti8ovn.fsf@gnu.org> <83d0eu8c80.fsf@gnu.org> <83lfth6p0y.fsf@gnu.org> <83h8456jaj.fsf@gnu.org> <83bluc7rya.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000070bdb6059545bd0a" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="201907"; mail-complaints-to="usenet@blaine.gmane.org" Cc: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= , Stefan Monnier , emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 19 18:14:24 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 1iLrMz-000qPk-Rv for ged-emacs-devel@m.gmane.org; Sat, 19 Oct 2019 18:14:21 +0200 Original-Received: from localhost ([::1]:58318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLrMy-0000E4-PV for ged-emacs-devel@m.gmane.org; Sat, 19 Oct 2019 12:14:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50903) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLrMr-00007V-6L for emacs-devel@gnu.org; Sat, 19 Oct 2019 12:14:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLrMq-0002j1-2J for emacs-devel@gnu.org; Sat, 19 Oct 2019 12:14:13 -0400 Original-Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:44880) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLrMn-0002gC-GH; Sat, 19 Oct 2019 12:14:09 -0400 Original-Received: by mail-io1-xd34.google.com with SMTP id w12so11001154iol.11; Sat, 19 Oct 2019 09:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZHpe+z7MdzVBX1hUlBJOo0F181Me9FeQB4kWJZFk7DE=; b=awx2eLNwlAYp6eb2M549x/Ss02mVEhLUjs4pwmybATOfu4TDYEqiBZTn9RAWxiN792 f1p3Z9niTpwg7rXoJK7/6cpoq/gWqwon2hNeIWYc1jcS2vg59MEwdhd3fMkgCTU5ldLY b62Y4ZqvFg3p0XLG+DIFQWPNwfA/7TlNVtRZuGWJhAk7dXqhMzcM1Zz5IfhDeln9x49k P5AU+QlzDHDYDLCSL5tSusBDtn7fYxpuraOM3Cq47HTLL6FLUX4srYtsu0xc4WDAmXzK oc4iwKDzm3WqTftYn2QWioGG3P2bepU+yxsafEh0QSHRQgdGN4NLU8n0QvUTNzsjVXFe 7Evw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZHpe+z7MdzVBX1hUlBJOo0F181Me9FeQB4kWJZFk7DE=; b=SypR6B/Zr9jvTxfshDL7SpT2T6Zt0L4yBupEe0yOA2Doj9NIBHIbF5iNn6YUKGYdFc 0PYUvP5j91nNV/EVPxzJG2Ou2i8uELYXmy50R4MFnx3En8DJnuzu4kgUVLwh7IfjcIUL 5OMICcGiKil+I8eyF4eIxwBvTCbxeVyCXEJ9IA9FfrxIldWZdvOuAruo4MWwARMxA9Yk srrWV5NhNOvEvfYim57Q9gX+REllCdmnrmHaby5QCU2MWNk8N9RC0I9c6vuxLVLNREOX 7MDkuxlRZvlIzoaGmiElEdQfTlG+fyK0dgG03QmW1lOaCiiY5ktNPxkpc2meixyleudn PiRA== X-Gm-Message-State: APjAAAX6njn0A4SQn0mftcPzxA/XqCgpqs91kq6UczNnzvRx8axHXjhb qmA8X71q4kBMa3ygKqoXYQPwScaQyxU3wR3FAoYTJiJriZ8= X-Google-Smtp-Source: APXvYqzy5UDMVILb4paaWrTx0KeQy97Wbtzpx63aVUAtfQ7BXj8G4FokrepwClTxu+RWrotVtGD3GAwSS0WNQOP4UxU= X-Received: by 2002:a5d:9dd6:: with SMTP id 22mr1895695ioo.97.1571501647116; Sat, 19 Oct 2019 09:14:07 -0700 (PDT) In-Reply-To: <83bluc7rya.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d34 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:241234 Archived-At: --00000000000070bdb6059545bd0a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Oct 19, 2019 at 3:03 PM Eli Zaretskii wrote: > No, I wouldn't call it "extension", either. I meant to teach > elisp-mode to recognize files that have only ELisp data structures in > them, and adapting itself to such files. The "recognizing" part of that is close to impossible, in the general case. The file can be ill-formed, for example. And think of the false positives. Most of this mail is valid elisp syntax, for example (though obviously not a elisp program). > The latter [the major mode] would be in-line with our other major > modes, which in most cases turn themselves on automatically, given > some tell-tale indications in the file's contents or its name. But we always do it on a "best-effort" basis. Users, organization etc, then use auto-mode-list, mode cokkies, dir-locals or even magic-mode-alist to plug those holes. Just because we introduce a major mode, we're not obliged to be super-smart and turn in on whenever possible. Of course we can study your super-recognizer-heuristic later on, but that's a completely orthogonal problem: to follow your bellic-ornithological metaphor, it's akin to unleashing full-scale war on those poor sparrows. Even if you decimate them, some will survive, and you'll have killed many other birds in the process. For now, just give everyone a slingshot and be done with it. Jo=C3=A3o --00000000000070bdb6059545bd0a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Oct 19, 2019 at 3:03 PM Eli Zaretskii <eliz@gnu.org> wrote:
> No, I wouldn&#= 39;t call it "extension", either.=C2=A0 I meant to teach
> = elisp-mode to recognize files that have only ELisp data structures in
&g= t; them, and adapting itself to such files.

The "recognizing&qu= ot; part of that is close to impossible, in the general case.
The file c= an be ill-formed, for example.=C2=A0 And think of the false
positives.= =C2=A0 Most of this mail is valid elisp syntax, for example (though
obvi= ously not a elisp program).

> The latter [the major mode] would b= e in-line with our other major
> modes, which in most cases turn them= selves on automatically, given
> some tell-tale indications in the fi= le's contents or its name.

But we always do it on a "best-e= ffort" basis.=C2=A0 Users, organization etc,
then use auto-mode-lis= t, mode cokkies, dir-locals or even
magic-mode-alist to plug those holes= .

Just because we introduce a major mode, we're not obliged to b= e
super-smart and turn in on whenever possible.

Of course we can = study your super-recognizer-heuristic later on, but
that's a complet= ely orthogonal problem: to follow your
bellic-ornithological metaphor, i= t's akin to unleashing full-scale war
on those poor sparrows.=C2=A0 = Even if you decimate them, some will survive,
and you'll have killed= many other birds in the process.=C2=A0 For now, just
give everyone a sl= ingshot and be done with it.

Jo=C3=A3o
--00000000000070bdb6059545bd0a--