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: Tree-sitter integration on feature/tree-sitter Date: Thu, 16 Jun 2022 12:03:08 -0700 Message-ID: <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) 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="10046"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 16 21:05:19 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 1o1unv-0002PM-Co for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 21:05:19 +0200 Original-Received: from localhost ([::1]:39528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1unu-0000ek-AP for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 15:05:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1um0-0007JN-Lf for emacs-devel@gnu.org; Thu, 16 Jun 2022 15:03:21 -0400 Original-Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:37503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1ulu-0005x3-IB for emacs-devel@gnu.org; Thu, 16 Jun 2022 15:03:18 -0400 Original-Received: by mail-pl1-x633.google.com with SMTP id t2so1991884pld.4 for ; Thu, 16 Jun 2022 12:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=OqGTODLO/GMP6sHhZkTJ7zY1KHY1GuYspVbizERg8EM=; b=RKExcKFb29Hs6rPClacV39t40CRA5KF9uFd2Oyq9xNQ5R8UrtCyrOUiLvUmrh3By+U C5FZIUo/lurXJyN2L6HZxs1LtT8iDpcjARgtdsuFA40/2ZnH2RIeLQCYnqXE0x/cUhCh n4Pxrhw8jCem/GdS5xzNWOaVVNEPhSNEc3Jtw2RWFObZZPvmGMR/eevOtHYs4A6mk+At EP1QhLtf+XD/tDFREoVRp2PQ/xN2dJGud4VTweC3v2qgl8gfgM0O/15lBFcNNfPLH/3W Fz7E73AyUt56XlCpqXjktoWV7HgbzO0Bcv6lN87Ulb9jiZaBufvCeFQcM/abeU56JxfV Qg5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=OqGTODLO/GMP6sHhZkTJ7zY1KHY1GuYspVbizERg8EM=; b=DOVDMfyWry+7IesOU2NVKjHsEju0wyhpBym5Ij6JCe5q6NB6aISavqHLPurP77jFH/ FxR8oO4ias5mqZP5spGqPm8tpOiPRvNLipd80I+PPRj8zcoO6gY3U9xahJJXEYOPSCjC 06Hi2xjm2iV9O9NX3GA/hIZpIg+rIAk8+OJZAUpeXwQ8C9cwfx3MymBVwHWQvjJXFsYN zYtalW9MWNlBEfDX4hDT/VH2/WDy9k/w/OcPAeznpaewJbgDzPOPk+jRGKkKItdxn7dO LcCTm2J8+67oRaaVGFBSU2exaK3Qge1TWxdPgTe0SXOlKWXKLJ/TUerq55/ZitSB6lig x3jg== X-Gm-Message-State: AJIora/GMyxdQ/iRoat/QX4ZpmvUDMJQIz3Q1CnLPmmcG0cpvn6SBuSb w7+8VrFlMKZ1GtjdNMntYP/1Y0bVcaA= X-Google-Smtp-Source: AGRyM1sLsb2bAcvBAfmAOteoljEN0Us6cl3Cu279G4/uEisuYSkF4mHyrmujDedn28pYUX/qKofuwg== X-Received: by 2002:a17:90b:4b4b:b0:1e8:9e0e:c362 with SMTP id mi11-20020a17090b4b4b00b001e89e0ec362mr6351058pjb.187.1655406191028; Thu, 16 Jun 2022 12:03:11 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:c15:33ec:172b:f758]) by smtp.gmail.com with ESMTPSA id w26-20020a63af1a000000b003fbdf7cc750sm2181319pge.89.2022.06.16.12.03.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2022 12:03:09 -0700 (PDT) In-Reply-To: <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=casouri@gmail.com; helo=mail-pl1-x633.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, T_SCC_BODY_TEXT_LINE=-0.01 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:291251 Archived-At: Hey, I=E2=80=99ve just finished with Real Life and got back to tree-sitter. = I=E2=80=99ll reply to individual messages separately, but here is a = summary of all the latest changes pushed to feature/tree-sitter - Now one can compile a query, compiled query is much faster than = uncompiled queries. - Traversal functions now have a parameter that controls how deep to = traverse. - Removed the ltree-sitter setting in configure.ac - Consolidated all the parser creation functions into one: = treesit-parser-create, that means treesit-get-parser and = treesit-get-parser-create are removed. I think these are all the pending requests (sans highlight-paren), = please let me know if I missed anything. Moving forward, I want to make treesit-parser-list internal and turn it = into a function that returns the parser list. And add a function to = remove a parser from the parser list. Because I=E2=80=99m not = comfortable letting users to remove and re-add parsers into the list = anymore. Previously we determined that if a user wants to do the wrong = thing, so be it. But now I realized that there could be danger in = crashing Emacs if user fiddle with treesit-parser-list incorrectly (and = violates some of the assertions I put in). Can I just add a new Lisp_Object field in struct buffer? I assume = that=E2=80=99s how you add an internal buffer-local data? Yuan=