From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Call for volunteers: add tree-sitter support to major modes Date: Sun, 9 Oct 2022 21:05:09 -0700 Message-ID: <9941E2A6-AB31-49FE-A6BA-9BE61BA6ED13@gmail.com> 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> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="35270"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 06:09:38 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 1ohk6j-00090l-2X for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 06:09:37 +0200 Original-Received: from localhost ([::1]:50436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohk6h-00075Y-Jl for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 00:09:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohk2W-0004fL-Ax for emacs-devel@gnu.org; Mon, 10 Oct 2022 00:05:18 -0400 Original-Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:47005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohk2U-0003S4-Sb; Mon, 10 Oct 2022 00:05:16 -0400 Original-Received: by mail-pg1-x534.google.com with SMTP id 78so9301381pgb.13; Sun, 09 Oct 2022 21:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I+Bj3PoiIRXiCXeRiAo4qvuT1Va9yUgTHFIGZ6G98To=; b=TOBNhc+aKe4+U7QrO5RbUETMEZA9Mi8sBfJ89iEzjOfQII4xctRbat/79nkuH3NGOa xbnv2h0OeOYt/SRGRfuZ5ktnrvk0B0YSKKFHmfk0W3HkTUFdeElNBUoq61mvVlyTi7ga 87btancv1OvCk3nqN3VRl/SiJFEvX4eV6y/sdhZnUV1tkyZfvKGxED7x7SaJf9SM2h7R VsIsDgWS7HClpRqZ4WCkJCaLnTUMJ33GC3Xnbt2XR95n/rnawVVCr4sgMkFnB+Y08n/K 7AnZ2EOvVXuX5AXPG1GwJjuXAf0r2mpeQP6F+58y8AzO4LFaRaZ/QhICmjOn0ejylGRS thWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I+Bj3PoiIRXiCXeRiAo4qvuT1Va9yUgTHFIGZ6G98To=; b=uvbuLHtzog6qJbZdY8/OQKc2511GTwpCJj8dLDaJ+b539RwX/ZHetQVIBW+kA4pSeI tcCHPPt6BaNbEDzCR5WXUdX+lwE2cNHX7/SUziCCe7cu2FcomuSd02FcaIG+q5EMovCx rwGef7TOk+Xw5H7AVl6d0sIc6gMe30Rx7DSyCe94PgkXFp4AYdqF6HGw4FjWknIFZBxH 3gwJ1pxyICwiFh5GNXRhSSO/vadj3BYglFYRdmjZ0naJlIEkjpvhSph9TVATpnlM2A4f WJNOODz5lSqWo3Ps3Z39oJ040Z0OSfC5rJ8VnGelHQw95P5D2OEv7lBV+v99jLtTeroe izSQ== X-Gm-Message-State: ACrzQf0LicOZh9Oto91xyMcCouPXQoBC7oTcdEfaZqEFHVRifYTatNb5 Kd+4gYH9SFu3evFRteTFuwI= X-Google-Smtp-Source: AMsMyM7enu+QHpD/4AlQfLDv7VfV8vrxi471JoJuOHwJnKr5TMhmNlmq2cjFnMJHRATUa42SRyYg/w== X-Received: by 2002:a05:6a00:8c8:b0:52c:887d:fa25 with SMTP id s8-20020a056a0008c800b0052c887dfa25mr17873792pfu.86.1665374712996; Sun, 09 Oct 2022 21:05:12 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id b13-20020a1709027e0d00b00172973d3cd9sm5448237plm.55.2022.10.09.21.05.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Oct 2022 21:05:10 -0700 (PDT) In-Reply-To: <158F25C9-A539-4515-8D49-50A7E6252960@gmail.com> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=casouri@gmail.com; helo=mail-pg1-x534.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:297305 Archived-At: >=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. Actually we should also fall back to non-tree-sitter if the conditions = aren=E2=80=99t met. Yuan=