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: Tree-sitter integration in python.el Date: Thu, 22 Sep 2022 11:42:26 -0700 Message-ID: <3A68545C-2E40-4BB4-8563-8041A5452634@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="27494"; 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 Sep 22 20:45:37 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 1obRCa-0006wD-SP for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Sep 2022 20:45:36 +0200 Original-Received: from localhost ([::1]:55900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obRCY-0001Jx-P2 for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Sep 2022 14:45:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obR9l-0006UU-Ie for emacs-devel@gnu.org; Thu, 22 Sep 2022 14:42:42 -0400 Original-Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:33326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obR9Z-0002nN-Nf for emacs-devel@gnu.org; Thu, 22 Sep 2022 14:42:41 -0400 Original-Received: by mail-pj1-x102f.google.com with SMTP id bu5-20020a17090aee4500b00202e9ca2182so6353162pjb.0 for ; Thu, 22 Sep 2022 11:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date; bh=gBoXaxZ09ITfjzjtrW5nRo8HOtn7c6mp2tY47/ZWLNk=; b=ghnl8lmYqiy8Ic8G6sA06FkvbD1apzjbdJLQIBD/sCMMUJUm8U5MCfHc0/an0GQuDB aYVle9xOZniLBIknWz1bCkT/G3/e+d4IdGDz6dOW9jJhd0dP5bzSP2Kx4+zqjYWvyxvK x+rjWhLG6nhM/BU56fW4tQaNeLPYUsDcw3hTfLAsZsEjKn0MiS1AFJpwNn179u2pVzeB zaQfs1eAriUzIOH6C3yRTqtM3ygqmgCVHc0QyhcwlTqBJBX4+TcVjV83e4f4RjqQf1qt tjrGRWz//r4kRG72/VOHOtzro5geU3dpQuk+DJYhNDVbephtynuj63e43dbsDnWI7pKv lbvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date; bh=gBoXaxZ09ITfjzjtrW5nRo8HOtn7c6mp2tY47/ZWLNk=; b=CGPKXAQ5OTq7JMd2h+JJbvPU5kTYv7noU9qCGFej+JW6HGEacbdUcrYBaTvH6081cf 5rO3x2S//UNMr/OfPmw4n+NMWIVfpupe8NzJxkZq5oh2Myz11KP62kYsFrXRMs/U8Qfw WYDbgpK5mJiNK4zaDwnO9C19UIA5IuzUUz/IylFRkpouSYY1LcDGG3aJQtwfnomZiBdm YL6HAPpOg7klxYqjyAzDkgUW7IczozsgiszgSMjv968DNTTAEdtc6VtZ01elRSkYAN0a fj5oa6x4TVLS9IOTCjqFE00G2iJ1DE0H1OiOk8sf1LlW54gJpnwEM/cnl5GJLEneMtv+ TVTA== X-Gm-Message-State: ACrzQf2zptUr+bGxCqX7eaqLcBTjd0xxYv4aEe8uxIrg9Y97JDQXn+JS qdcY8sxM6CfLcnR0Eh/7LbZXwRJjlk8= X-Google-Smtp-Source: AMsMyM7K0tcWTWGOZEQRlN3WNJvfLzEik7PaH41zVY0UB9KXeKa0Xp0qNxExYlXIjPZ18vIjEr24CQ== X-Received: by 2002:a17:903:2443:b0:178:221d:c599 with SMTP id l3-20020a170903244300b00178221dc599mr4684417pls.100.1663872147986; Thu, 22 Sep 2022 11:42:27 -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 y26-20020aa79afa000000b0053ebe7ffddcsm4788561pfp.116.2022.09.22.11.42.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2022 11:42:27 -0700 (PDT) X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=casouri@gmail.com; helo=mail-pj1-x102f.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 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:295998 Archived-At: Hi,=20 I=E2=80=99ve added tree-sitter version for font-lock and which-func in = python.el. And I=E2=80=99d love to hear some feedback from python.el = maintainers. Specifically, does it look right and which other part of = python.el could actually benefit from a parse tree? I wrote a = tree-sitter imenu indexer for python and it performed worse than the = current one, presumably because it traverses the whole parse tree = whereas the current one only scans the buffer once or so and do some = regex matching. Here is the commit: = https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=3Dfeature/tree-sitte= r&id=3D1cdb24fe35a9ff2e4f92c5acc93a5a5b0e70d93f Yuan