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, 13 May 2022 22:13:04 -0700 Message-ID: <1179E1EC-90EF-4989-BE1D-115498F77F60@gmail.com> References: <5bada349-2f43-4325-b696-70918584cd3d@email.android.com> <83mtfsuluo.fsf@gnu.org> <87sfpjhm33.fsf@thornhill.no> <83a6brufe5.fsf@gnu.org> <87pmkmhp8i.fsf@thornhill.no> <83v8ueuc7i.fsf@gnu.org> <73DE25BA-5EEF-4497-8F98-8C5F20853A61@gmail.com> <87v8uewfuq.fsf@thornhill.no> <87mtfkbt9n.fsf@thornhill.no> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12497"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Stefan Monnier , Emacs Devel , Daniel Colascione To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 14 07:17:53 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 1npkA5-0002xj-Gz for ged-emacs-devel@m.gmane-mx.org; Sat, 14 May 2022 07:17:53 +0200 Original-Received: from localhost ([::1]:38074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npkA3-0004AG-Mb for ged-emacs-devel@m.gmane-mx.org; Sat, 14 May 2022 01:17:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npk5c-0002Vk-8f for emacs-devel@gnu.org; Sat, 14 May 2022 01:13:16 -0400 Original-Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:37412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npk5W-0001Cm-Eg; Sat, 14 May 2022 01:13:14 -0400 Original-Received: by mail-pl1-x62a.google.com with SMTP id m12so9800007plb.4; Fri, 13 May 2022 22:13:06 -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=MROC3U8ZfWf6YWA4ARZZzVOfoflu575CMmt6/JMLneU=; b=L1I06fM4tPbY7d07B5tUTZhznV6h8LV5GwNUA6B7/REh6F1qQ0OfdF9GRuGVtMxz90 Accdz4fFM1072fYu8ey+UZwcM6WbN38H7G8djP3+kvTgDTag95Ti1pno0TjNVF+rm9Uf a9hQbzhkyh1tCyquzNg9gFd7h5HJ9NUU12hzIoHyzajowHT5KVJfm2vXN/KupydtVQcr q2s8VbqbWUnzMsmcBj1dyFjMsmTaEX3XNMRDlIyxy8s4ojW2dZC56nliGOzWcaZINPh3 1EzZpUvc1GtWc+zicpuYcJdq7FlUGuXeFPuwkdbmYY2msAc5l2vqJ14AHYHQ0reiZKQj ewvw== 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=MROC3U8ZfWf6YWA4ARZZzVOfoflu575CMmt6/JMLneU=; b=VpaObJPohmY+FDVINIU0pRPVA7g+t0ypZnxhxdZc8Lvdq6113ffleOIdYTuFicvFBS xsDrXtMkpg7F6zYo+64390DykHA8zWtQRywtaS8kv4K0ZCEaz45/n/thuxnw3EgDvP07 2PLRW/Xs7by0QOA8QIrHtsLAo9p/k9IxjW9yUpf2mbKxzp62w4lhmQgvrk+Zxp5c7WUO R5p/4N+901JCTBp4oE+3YNytOB3KW8SCkzibloMszfn1flVcxltcCeGjnTcWb4fWYMmC gvTnxUWrtGwb9dn50M2ShrXweEttc8EZTMhYTxZPwwrzdjPNxRMw/BTiB9nqYBGmbfDX I9ew== X-Gm-Message-State: AOAM533BnUo+KOQtnh7kk0+tHQLUJomA+t584/+Nbh6ers6XWFBnr+N4 0VKLcIphLerXqtyQZzUWTpM= X-Google-Smtp-Source: ABdhPJw1QgllXeOiR8IOinPICQ+ajB6HwlrK6h/w2kJqdLTvKiRBv2Woj3KFD1in55U7LYbIJLb5Kg== X-Received: by 2002:a17:90a:e64b:b0:1df:d0f:b8e5 with SMTP id ep11-20020a17090ae64b00b001df0d0fb8e5mr1940496pjb.66.1652505185586; Fri, 13 May 2022 22:13:05 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:c48:babf:bfaa:d815]) by smtp.gmail.com with ESMTPSA id y23-20020a170902d65700b0015ed3a112c9sm2697290plh.280.2022.05.13.22.13.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 May 2022 22:13:05 -0700 (PDT) In-Reply-To: <87mtfkbt9n.fsf@thornhill.no> X-Mailer: Apple Mail (2.3696.80.82.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=casouri@gmail.com; helo=mail-pl1-x62a.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:289766 Archived-At: > On May 13, 2022, at 10:03 PM, Theodor Thornhill = wrote: >=20 >>=20 >> Now there is treesit-beginning/end-of-defun. You just need to set = treesit-defun-query and everything else come for free. I needed to = invent some heavy machinery for that, resulting in some new handy = functions: >>=20 >> - treesit-traverse-depth-first >> - treesit-traverse-breadth-first >> - treesit-traverse-forward-depth-first (maybe this should be named = simply treesit-traverse-forward?) >>=20 >> - treesit-search-forward >> - treesit-search-beginning >> - treesit-search-end >>=20 >=20 > I cannot find them on the branch - did you push them? My bad, I pushed to the wrong repo. Now they should be up. >=20 >> They are untested & undocumented (in manual), so please play with = them and report problems :-) >>=20 >=20 > Will do :) Thanks! Yuan