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: Call for volunteers: add tree-sitter support to major modes Date: Mon, 10 Oct 2022 08:35:21 +0200 Message-ID: <87zge45gpi.fsf@thornhill.no> References: <83czb1jrm3.fsf@gnu.org> <84436B1D-3359-487F-B997-A7F56FDEA636@thornhill.no> <83bkqljih5.fsf@gnu.org> <87fsfx6ufb.fsf@thornhill.no> <8335bxjdpf.fsf@gnu.org> <1D07A0F1-A269-410A-9D3C-8A53113FFE2F@thornhill.no> <83sfjxhuvc.fsf@gnu.org> <87bkqk7qb0.fsf@thornhill.no> <8735bw7kwm.fsf@thornhill.no> <158F25C9-A539-4515-8D49-50A7E6252960@gmail.com> <9941E2A6-AB31-49FE-A6BA-9BE61BA6ED13@gmail.com> <83fsfwi44y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11468"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii , Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 08:39:34 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 1ohmRp-0002oJ-Uz for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 08:39:34 +0200 Original-Received: from localhost ([::1]:54164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohmRo-0003AG-JJ for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 02:39:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohmNu-0001Ao-AA for emacs-devel@gnu.org; Mon, 10 Oct 2022 02:35:36 -0400 Original-Received: from out2.migadu.com ([188.165.223.204]:62679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohmNr-0000qV-Vo; Mon, 10 Oct 2022 02:35:29 -0400 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=1665383723; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QPy5yTBtf4DPhDHz0vLNNCJWwEtqnHkeaoQfqRwGFbE=; b=blKgngA/Kk+g2EVYxjZXxDYQAE13uTlmHxww2xPvbh4JeQmZySQp6O5Mll7qjnXbSOzH8m SX0Li1NSOYf9EEruT/y8g2Gjg7w23zOfaE4TeDdqmV5JaBmB7ye7VooDcgyxSH3QdAJei1 wIEK3fXDRPuwVQsBzjzZ0WZuFuvcINkcAPHcFSw0MSPRmdxGHdQyaOE4TpFdTe/2rQyUmp /jL48jqv62zLYRaCBmd351XJMvwOEQWk66gWRdUtbXtiK9o3ckOIXe3R1hJ58bvS5B5QVE fCT1alzW1bu9rS5qNjBGWpJ79EIHmLDQS/IfJ0EBD416bqq349MsAowZ6T2nVA== In-Reply-To: <83fsfwi44y.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=theo@thornhill.no; helo=out2.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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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" Xref: news.gmane.io gmane.emacs.devel:297312 Archived-At: Eli Zaretskii writes: >> From: Yuan Fu >> Date: Sun, 9 Oct 2022 21:05:09 -0700 >> Cc: Eli Zaretskii , >> emacs-devel@gnu.org >>=20 >> > + >> > +(defun js--treesit-enable () >> > + (unless (and (treesit-can-enable-p) >> > + (treesit-language-available-p 'javascript)) >> > + (error "Tree sitter isn't available")) >> >=20 >> > I don't think we should error here, I'd displaying a message instead. >>=20 >> Actually we should also fall back to non-tree-sitter if the conditions a= ren=E2=80=99t met. > > Automatically and silently? I don't think so. The user should know > the knob they pressed didn't work. How about we error and add a suggestion to turn off `*-use-treesitter'?