From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration in python.el Date: Mon, 03 Oct 2022 20:07:44 +0200 Message-ID: <87y1twlr0v.fsf@gmail.com> References: <3A68545C-2E40-4BB4-8563-8041A5452634@gmail.com> Mime-Version: 1.0 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="30871"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 03 20:09:49 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 1ofPsy-0007wH-PJ for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 20:09:48 +0200 Original-Received: from localhost ([::1]:36470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofPsx-00020v-Ja for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 14:09:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofPr3-00004w-RU for emacs-devel@gnu.org; Mon, 03 Oct 2022 14:07:49 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:44710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofPr2-00083b-4S for emacs-devel@gnu.org; Mon, 03 Oct 2022 14:07:49 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id c11so17916049wrp.11 for ; Mon, 03 Oct 2022 11:07:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=MV9kMbtxT4dD7QWrC2QsKXVJXOpWJRQ9TK9v4FI4hw0=; b=m9v/q7VIzBqeKOw9q4slGCc+TiKjbYCXsvyfi7OEVx0j+K8mh2ckMybbyjS4+Mh9s1 UguQLkSxaNm7I3/qySW5A9LSI5kQ7oQz95Y7uAqZ+5XgA6ZhCEsk78h/8PG380/nMxeh /mjoNNQV/w8NXLpCFcrK++lbIGJHg+vCqB5/JGhRi+L0rzoUP60qMcEgaKVbv+2yx4w7 AJE43siActFgh011kub5Jf8vR/Ri8uPNpMQPZST3kn8aQ7oSzD0pYaf2kOI0P3HXxiHV QBMe4wWJ6BZ5cagE2rQrVJ7bbYl2JgzqKTyxMZ0sHWdWWZhzb9LvBH5XONUdMqf+H2x5 YeZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date; bh=MV9kMbtxT4dD7QWrC2QsKXVJXOpWJRQ9TK9v4FI4hw0=; b=BisMcAvplTWFeljmdCbGKQt/bwKJYmlU3fpAm//beUirdElxEkvuD0s8se7Q7pKIJR OtrTeV4k1d8Vi4VeVc+a1XQKIE7rUzzgZyH5LjNgSyN08KTSYlo4pTdBGwcIpZO1n2gb bHiURW5Jo8Xp3AI9cB9Oh5zqL/VaaAUX5/TpyOY6F5g9idpj2QaT73HUkXlJ2pMfX0en +tBgYN8k+U+c0YkzZZ/n3HrAZs0wTu9Lek3/+AwZcCx+xNkJ/JibP+JKK011vAO1J4N1 otka45/jFfeorWQyWXSLT5os3hptw2T8Wb85ty4ejY56Mw59dDJVD49qeDjyPIjE1POE QDvw== X-Gm-Message-State: ACrzQf0nQypkbnvtjZaCKr02WzcdKvDNZ/49f5dTFHrddTXv7TitrcCO ekn8HrkpmKsO9KYJVv8FgPc/0QwbFxM= X-Google-Smtp-Source: AMsMyM6Z/csCPhvrWK4a7tlw1iAPG9yJk/2pSf9XA25QPA/LZALkT88NPP9PRRP3QlB6NvaeVktqgg== X-Received: by 2002:a5d:6250:0:b0:22e:3cc0:19bc with SMTP id m16-20020a5d6250000000b0022e3cc019bcmr3903538wrv.236.1664820465608; Mon, 03 Oct 2022 11:07:45 -0700 (PDT) Original-Received: from carbon.localdomain ([2a01:e0a:245:c850:98f5:429a:aa8e:95bb]) by smtp.gmail.com with ESMTPSA id bw18-20020a0560001f9200b00226dedf1ab7sm4752605wrb.76.2022.10.03.11.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 11:07:45 -0700 (PDT) In-Reply-To: <3A68545C-2E40-4BB4-8563-8041A5452634@gmail.com> (Yuan Fu's message of "Thu, 22 Sep 2022 11:42:26 -0700") Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=orontee@gmail.com; helo=mail-wr1-x42e.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:296778 Archived-At: Yuan Fu writes: > 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. I'd like to test your integration but... I am new to tree-sitter. I've cloned the Git tree-sitter repository, make, make install, call to ldconfig. The generated shared object is known to the linker and I successfully build the feature/tree-sitter branch of emacs (it starts succesfully and I see symbols under the treesit- prefix). I also cloned tree-sitter-python but I've no idea of what should be done with the grammar file. I've understood that I am suppposed to convert the grammar to a shared object but I don't know how... (I've tree-sitter-cli installed and in path, but "tree-sitter generate tree-sitter-python/grammar.js" seems to generate rust and node bindings; Am I supposed to compile the src/parser.c file? I don't see any Makefile...). --=20 Matthias