From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Make all tree-sitter modes optional Date: Thu, 16 Feb 2023 09:46:21 +0100 Message-ID: <87o7puq9pe.fsf@thornhill.no> References: <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <868ri140sr.fsf@mail.linkov.net> <83fsc92gbz.fsf@gnu.org> <83cz6ccagy.fsf@gnu.org> <838rgzaqmj.fsf@gnu.org> <7bad77ae-a176-d49b-5115-dbadf7e6d1bc@yandex.ru> <3112fa15-8d1c-679a-f319-cf659b097be4@yandex.ru> <831qmq9jjr.fsf@gnu.org> <83bklu80vg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10407"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, monnier@iro.umontreal.ca, acm@muc.de, juri@linkov.net, casouri@gmail.com, larsi@gnus.org, jostein@secure.kjonigsen.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 16 09:46:58 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSZus-0002YC-Dp for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Feb 2023 09:46:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSZuP-0001CN-4V; Thu, 16 Feb 2023 03:46:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSZuN-0001BB-CH for emacs-devel@gnu.org; Thu, 16 Feb 2023 03:46:27 -0500 Original-Received: from out-111.mta0.migadu.com ([2001:41d0:1004:224b::6f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSZuL-0004Vm-NB for emacs-devel@gnu.org; Thu, 16 Feb 2023 03:46:27 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1676537182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vUPLEfIhnnB5kCPQyD0PcqMtYhsOxD2LnZOyHNgDfgc=; b=NtRgs0MKqgTlZ1CZ9VPtkIzMrWXlvg1++Stdd94Dmzn8tfQTBXfvtQ5G3EcwlGwBq6Ne17 S6Sl/6EsHZ+FweG5YSGWnEUeftXlIF2R//+ilBmffSl9amvbgh9MUZn/PWnJ1Fw2ytw2NY wetkc7n0SJq0wdveUF179ym4JMpnPHIN6dt+vbXAj30Y0myJqKC1mZ/pMAm+ApTW42osUT csP1AeHsXeRfDVPiJ+pg1WOulhxLFsTygF7vcw67fLmCQqzkr5OHfkKwRuKu6u4zoZeFBi P+Myt0qt+YlD2y91wZxqNZ1QWR2P1P61NCWvRSa+kWMLH8heV2m/R7yU8YrHAA== In-Reply-To: <83bklu80vg.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::6f; envelope-from=theo@thornhill.no; helo=out-111.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303382 Archived-At: Eli Zaretskii writes: >> Date: Thu, 16 Feb 2023 08:53:56 +0100 >> From: Theodor Thornhill >> CC: monnier@iro.umontreal.ca, acm@muc.de, juri@linkov.net, casouri@gmail.com, >> larsi@gnus.org, jostein@secure.kjonigsen.net, emacs-devel@gnu.org >> >> I'm thinking some devise like a "language layer", where major and minor modes are pluggable. >> >> Let's say you want to program in JavaScript. >> >> Then you can for example do something like: >> >> (make-language-layer 'js-layer >> :major-mode 'js-ts-mode >> :lsp 'eglot >> :dagnostics 'flymake) >> >> >> Then >> >> (add-to-list auto-mode-alist ".js" 'js-layer) >> >> And so forth. In this case a person can swap out flymake for flycheck, eglot for lsp-mode, js-ts-mode for js-mode etc. Then no implementation "owns" the language namespace, and we hopefully don't step on anyone's toes. >> >> What do you think? > > I don't know yet. We should definitely think about this more. Emacs > never had more than a single major mode per programming language, so > for us "language" and "major mode" were always synonyms. (Perl mode > and CPerl mode is the only exception I know of, and it did cause us > grief.) > > So yes, this is a new situation that could call for some new concepts > in Emacs. Yes, absolutely. I just wanted to put out there a concrete thought that hopefully moves the discussion forward. Theo