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: Fri, 17 Jun 2022 17:14:58 -0700 Message-ID: References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <83letvq0ii.fsf@gnu.org> <6EA831D3-A9C9-4346-B1E8-7748BAB285E2@gmail.com> <83czf7pocp.fsf@gnu.org> 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="20512"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 18 02:16:50 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 1o2M8v-00055B-Kb for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jun 2022 02:16:49 +0200 Original-Received: from localhost ([::1]:43300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2M8u-0001jC-3b for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 20:16:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2M7f-00010M-WB for emacs-devel@gnu.org; Fri, 17 Jun 2022 20:15:32 -0400 Original-Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:44936) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2M7C-0002Z8-2Q; Fri, 17 Jun 2022 20:15:31 -0400 Original-Received: by mail-qk1-x72b.google.com with SMTP id c144so4239070qkg.11; Fri, 17 Jun 2022 17:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2ltgYvl82V40NQGQsYb2t+g2mWstuzLnA4oqlmLjBdU=; b=qagKYTacN0GH6rOzSdMIg+l5HOlfWFzBROrQfyRFtpMArrg0zHDTKnPsWZ+ghVZiVU 3TD2DDYJlvpv0Qxyp2hHxExCES4ULJuuGYoDlz0y2MOCZhXWEMoSwNZFsusGs5ys5S9m 7SxpRJPrOIFksGq862kKHl7F+7qF3Z3wZ0zZqwgUoXXD5Ws7RzCMAGzv92ot85m1Yjci 19TCBDyeUcS7YWDAtDKmPytlww20eYVPUdrpWjYA5Ff7anpIuScDU0BXhTVgOvrmGslF 626sXADkB/cC0x58qstxUV4iSJ/V6Rt5FIttdAFzsbg8OkcVkWRPHnjOb1Gx7nUs+Sgz qUBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2ltgYvl82V40NQGQsYb2t+g2mWstuzLnA4oqlmLjBdU=; b=rgSvNjhnYE4Wv4e8Cv51QqjIuRbxkwOOKS6WWCXWzXfD0+5Ex/IFvn7624cKjcSNim 7OnX+YbkHwrz34/bJPKZMTx3CeQ0BBCxGGBm/JSzu2tCLm2CXIxeiZYrGCD5R5maDxnj mowSVVSUjnL2Mj4B5kJMfeflLEDgolDTflkZvCFuTQHYP6jIcbVfws9fSWdL9e5mPHEi M4qIUISv+1xpZWeoDawU96AgKG7DJHEBKUpT0tSSpUXkWlL2b9cjlWlUa7uaPZH3rNeF Yv2xKODWCAwsqjmOvEXm9urUQyBetGAN743NFEkQ5r9EC+EFbwYzwMOE4yA34CtQ14iN 32Gg== X-Gm-Message-State: AJIora/Avwaxwa7rlHEfD+jK4CvHRs76SdvkrZvJk+ZAHnDQUgNeUcn2 X3DrGh+w8Ra3WlqBXBrflGBGI0To3jE= X-Google-Smtp-Source: AGRyM1t+YqNcXNMLcUXedZBsNMBv/lZFh/pvI8dMkoW6K5TVCBPoKJ3duXwJ/8szrsQfqi/nAf0OcQ== X-Received: by 2002:a37:a482:0:b0:6a6:7cbf:74b2 with SMTP id n124-20020a37a482000000b006a67cbf74b2mr9368226qke.137.1655511300469; Fri, 17 Jun 2022 17:15:00 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:c15:33ec:172b:f758]) by smtp.gmail.com with ESMTPSA id c135-20020a379a8d000000b006a6c552736asm5784730qke.119.2022.06.17.17.14.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2022 17:15:00 -0700 (PDT) In-Reply-To: <83czf7pocp.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2607:f8b0:4864:20::72b; envelope-from=casouri@gmail.com; helo=mail-qk1-x72b.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, 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:291322 Archived-At: > On Jun 17, 2022, at 3:37 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Fri, 17 Jun 2022 00:17:54 -0700 >> Cc: emacs-devel@gnu.org >>=20 >>>> 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. >>>=20 >>> And a function to add to the list, right? Or does it already exist? >>=20 >> Creating a parser automatically adds it to the parser list of a = buffer. >=20 > Then removing a parser means we actually delete it? Not sure what do you men =E2=80=9Cdelete=E2=80=9D. Treesit-parser-delete = removes the parser from the parser list of a buffer, so it is never kept = up-to-date with that buffer again. But you can still do stuff with it = until it is gc=E2=80=99ed. I probably should add checks that prohibit = using a parser after it has been deleted. Yuan=