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 in python.el Date: Wed, 5 Oct 2022 19:56:06 -0700 Message-ID: References: <3A68545C-2E40-4BB4-8563-8041A5452634@gmail.com> <87y1twlr0v.fsf@gmail.com> <83czb8ycpo.fsf@gnu.org> <87tu4klfcw.fsf@gmail.com> <87ill0le20.fsf@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="4886"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Matthias Meulien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 06 04:57:54 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 1ogH56-00018V-UI for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Oct 2022 04:57:52 +0200 Original-Received: from localhost ([::1]:58532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogH55-0007ux-HP for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Oct 2022 22:57:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogH3T-0006wI-SE for emacs-devel@gnu.org; Wed, 05 Oct 2022 22:56:13 -0400 Original-Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:43731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogH3S-00045Y-9M; Wed, 05 Oct 2022 22:56:11 -0400 Original-Received: by mail-pl1-x636.google.com with SMTP id z20so491807plb.10; Wed, 05 Oct 2022 19:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date; bh=3LjOSB4pIGQ6saUjT51H8Kaz42r87OUNERO+HK6rxz4=; b=JDiJStqMnXZfdeigF9fWgKq1Ybg0CO/gbZT4KduLEZZpiiHrqkPipIJz/G0MBvRh19 323pit3BG20R4dt1Xh81FZ5vvcLf0D/Dd+luWqqR/Rn/bRTGqfdK/xD0zeKy6OLJYJCD Fx5ofLksOWiEWVx4KJ0UwWBQVMiUNzyBd7v/SBJS2D+BrE6amHJClAIqrWktBKXRAW8a wk0e3PSgliamZ7dV6m8h+9UQT+/ujA7N0muJkUDdeil5puEWrfZTgCHIMTOR+wB00TKR ar3jN/ZHgaa910Zo3pMzKZPzR5pdjyYDDLwvZ8Ln4vi1WnVCTIMMqHvzwflboEGa/+Zz +esw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=3LjOSB4pIGQ6saUjT51H8Kaz42r87OUNERO+HK6rxz4=; b=DwYEdFMW6/B2aXHDKm3xK/PV05PmOR1isFb2h8oHHix1jnNxzL/kATjIQkU40a/JlN zJIp0cOiBVNN0fJZq08b/qf05vNMyu6HVtlKdxIOc3oQMcNmrChqLX8YZBicVxaWR7xg eDN+SNeriPO5EH5L1zuw1ZWa/K2MU3zHo78rIUA3QBVQYHnT27GSeKF45eATMyF+3St6 zaVWPZKM5tEDUaSLK2ppObONpWFFKGxtIirRcS/N2w0YjuHSh0Vi8mSYGV3BJnS1hXNN e2A5wkUVNlRq76mYTv37TxfFDxTRtiy+U2l4uHDbjBvS0iB/iMUkurE8ACpSVOZhb3Rv thEA== X-Gm-Message-State: ACrzQf2e671EFOvpx0iSPsfvXgRCkxE7VI1mSjCZ24C0wpFfVq79jhTf 9aGMjxW+OiRQyjOzFlTH6B4= X-Google-Smtp-Source: AMsMyM5hANGpbeurocUlME3pwHcak6LfD5Tg5qqFRt8iAVjm2HbLDbpf1QTPpQD/N0BgDZH9jOkbzw== X-Received: by 2002:a17:90a:a415:b0:20a:f813:83a3 with SMTP id y21-20020a17090aa41500b0020af81383a3mr2913535pjp.238.1665024968470; Wed, 05 Oct 2022 19:56:08 -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 x10-20020a170902ec8a00b00177f4ef7970sm11096925plg.11.2022.10.05.19.56.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2022 19:56:08 -0700 (PDT) In-Reply-To: <87ill0le20.fsf@gmail.com> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=casouri@gmail.com; helo=mail-pl1-x636.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 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:297048 Archived-At: > On Oct 3, 2022, at 3:47 PM, Matthias Meulien = wrote: >=20 > Yuan Fu writes: >=20 >>> On Oct 3, 2022, at 3:19 PM, Matthias Meulien = wrote: >=20 >>> (...) At first sight, moving commands and imenu seems to work as >>> expected. Fontification too. >>=20 >> I didn=E2=80=99t modify and move commands. There are a lot of them = and I don=E2=80=99t >> know if tree-sitter would bring any improvement. Imenu and font-lock >> are indeed powered by tree-sitter. >=20 > Ok. Thanks for clarifying. >=20 >>> I saw small differences between buffers fontified with >>> `python-use-tree-sitter' equal to nil and t. Attached is a = screenshot >>> where one can see two such differences (the third tall buffer shows = the >>> output of "tree-sitter highlight"): >>>=20 >>> - line 284: The self attribute >>=20 >> Why is the _url attribute highlighted? Other attributes don=E2=80=99t = seem to >> be highlighted. >=20 > I guess it's because it is on the left hand side of an assignment. >=20 I=E2=80=99ve fixed fontification discrepancies you found and pushed the = change. Yuan