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: Tree-sitter integration on feature/tree-sitter Date: Sat, 14 May 2022 07:03:16 +0200 Message-ID: <87mtfkbt9n.fsf@thornhill.no> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32662"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Stefan Monnier , Emacs Devel , Daniel Colascione To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 14 07:04:28 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 1npjx5-0008Fz-Dk for ged-emacs-devel@m.gmane-mx.org; Sat, 14 May 2022 07:04:27 +0200 Original-Received: from localhost ([::1]:33012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npjx3-00089Q-TW for ged-emacs-devel@m.gmane-mx.org; Sat, 14 May 2022 01:04:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npjw7-0006w8-Ns for emacs-devel@gnu.org; Sat, 14 May 2022 01:03:27 -0400 Original-Received: from out2.migadu.com ([188.165.223.204]:57377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npjw5-0004fA-BO; Sat, 14 May 2022 01:03:27 -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=1652504598; 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: in-reply-to:in-reply-to:references:references; bh=50mmKNHc7wuR4/LEgRSA0huXjjlbBbOwP/tCgigXYK8=; b=ExKTrBOXJ0tE1CEkJk/yNzhSVKTVK1h5H+JS5373F5OO6Q6C/wNbE6p/TTieueNGFrb15d 0bgjaHRCUdt/SUav2rvth5RdEwdeRAwSdRAOpg1M1tf+opU5x4gihYF2DzMulzYx7MXXHt XZhmNqYgIPHzlCipZ9EMLxLaRnqSLN/yVL+3juar9yjtO+d5xwqrEcvgSkLjDGjHgDuh4B ILVaWsbf5HXeb+Oy5gVRlrSDYRXsd/f/SgzIdgrNbe1E+31zP5T4ys8SQPFRRbesEESt/U ZcFWIjiIAO6PR9liksdTikCOI06hKlkylQl2HhR3vVyTJ48iJB92VVYh2FFS3w== In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: thornhill.no 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_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:289765 Archived-At: > > 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: > > - treesit-traverse-depth-first > - treesit-traverse-breadth-first > - treesit-traverse-forward-depth-first (maybe this should be named simply treesit-traverse-forward?) > > - treesit-search-forward > - treesit-search-beginning > - treesit-search-end > I cannot find them on the branch - did you push them? > They are untested & undocumented (in manual), so please play with them and report problems :-) > Will do :) Theo