From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Need for "-ts-mode" modes Date: Fri, 30 Dec 2022 10:49:09 +0200 Message-ID: <83edsh6zui.fsf@gnu.org> References: <877cyagmti.fsf@posteo.net> <831qoi85u7.fsf@gnu.org> <87mt76f4n4.fsf@posteo.net> <279658FD-ABF9-4127-A646-038C60A79EA1@gmail.com> <83tu1e6lon.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8235"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 30 09:50:08 2022 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 1pBB5c-0001uv-5R for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Dec 2022 09:50:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBB4w-0000Wq-Tk; Fri, 30 Dec 2022 03:49:26 -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 1pBB4t-0000WV-1P for emacs-devel@gnu.org; Fri, 30 Dec 2022 03:49:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBB4s-0005WD-PF for emacs-devel@gnu.org; Fri, 30 Dec 2022 03:49:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZZL3yKRXDwJXzh1+TZppvhMBevy90yajf3lmazVPcco=; b=ClP5rhlGHIRJvdXuzynI LJMcErhTZmxolRna09zb0/laO65M0mxfcrnIV/8nHv7t351XHQgv644Y42mjQZVr188TpI1IaG0xH ufsH3ZaCB3jz/mybpZfMpaApM23szTUY6kUSETHr+mutPvSyvoaFbvCTMIiFv4q/jWxBbrw0fPJ/k leuZj9Ji/0zKwiL1KyFMC5EdCpGE2eq8aG/IiM0UP9I6Jvo6bv6UcileLY3PMAJebzYYyttwSaTLX Vvhn9mrtFkBjgSiLnKunK5liwaPIow6ic1duHLvXF1jj5d8SW65q/YRyZnFzgm5c8CznX4U0ZNjiS dv9HKULTtks3iA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBB4h-0006hA-At; Fri, 30 Dec 2022 03:49:11 -0500 In-Reply-To: (message from Richard Stallman on Thu, 29 Dec 2022 23:05:24 -0500) 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:302084 Archived-At: > From: Richard Stallman > Cc: emacs-devel@gnu.org > Date: Thu, 29 Dec 2022 23:05:24 -0500 > > > > I think we should not enable docker-ts-mode in auto-mode-alist if (treesit-language-available-p 'dockerfile) is nil. > > > I don't see how this could be accomplished, since whether three-sitter > > is available for a language is only known at run time, and > > auto-mode-alist is in files.el, which is preloaded. > > It would be possible for `docker-ts-mode' to check whether tree-sitter > is available for the Docker language, and DTRT if not. It does: it displays a warning (when you visit a file that should trigger this mode). Like this: ■ Warning (treesit): Cannot activate tree-sitter, because tree-sitter library\ is not compiled with Emacs