From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter introduction documentation Date: Sun, 18 Dec 2022 11:40:38 +1100 Message-ID: <864jttv82k.fsf@gmail.com> References: <83edszjslp.fsf@gnu.org> <83bko3jr3o.fsf@gnu.org> <83359fjoie.fsf@gnu.org> <86cz8ivfvw.fsf@gmail.com> <83bko2ifq4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11409"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.7; emacs 29.0.60 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 18 02:02:27 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 1p6i4P-0002jA-GS for ged-emacs-devel@m.gmane-mx.org; Sun, 18 Dec 2022 02:02:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6i3a-0002aX-IL; Sat, 17 Dec 2022 20:01:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6i3Y-0002a3-5H for emacs-devel@gnu.org; Sat, 17 Dec 2022 20:01:32 -0500 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6i3W-0001ip-BG; Sat, 17 Dec 2022 20:01:31 -0500 Original-Received: by mail-pf1-x430.google.com with SMTP id c13so4067862pfp.5; Sat, 17 Dec 2022 17:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=ByMgjdeQmPP1NmX0ThJECCYOsiYcjrcfB7zYxRPMZQw=; b=FXL4qgQN1hMavhN49VX0OJ48ekWpbEibbJxbqsk7nzMWNRBJq9WSvP/WIYW9w16HEq nl27QgE0FbFI30QnQvvqFQRRn6bxb9daPxBpPUVZhLfy19vGfs7LFE+0Qn78evadDC6s xkjVcMg8MOTzLoG4OVgr0spAh+gnuYtRyfjBYkfCLybslE3dOoET3Ikw4y74lG6CA4q5 mx5pfRY74b9730BvFqnMHx4Ft70nvnM35WS5+nPYYHLgqY87Gw1RG5C4jhSwNzt1Knzv aEAYVB3QA5FjC3pYrgjiegZeMJObhIt0lrCIaku7qn/2ZflsrkoQr6836kaHp5/Qa5r4 C/Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ByMgjdeQmPP1NmX0ThJECCYOsiYcjrcfB7zYxRPMZQw=; b=gOT3rWy1Vp3njG5NltztGis3Wx5dum8JoqtFYC66ooSZ6m2VAr37L9xCTBv24VyC+C mFycp9tZ0P20Bwo6yNYlw0hw71KXRUSUBSrExRRUxvK5fkdBZ3paZ2tlML8Pt4FvXVAS e/L6PvCuKybZMf2vBbGKcNzPWf+Gi6f0eAx/NDpnE3w6N6aXsQgHjlbFBZS1akg4jRlN +CiQ/EVLtUWjq4bIE5ODQ1oPGF7RKGzDFGDtXAkOl3QjskRyuvwkynk6ssRCLiTCPClk qYxSYglNWbUeWXAgHgCNaHle8o5CAD/ftLJN7qLBqWBTn1d2+qfHnDCZLvj46s/GEOq+ 1k3Q== X-Gm-Message-State: ANoB5pnOS67/W1onxmc/g5V1EANH3m6u/yVJ2ecgEGlONzJoPkYJ2wyH hUXqoi8fHkZociBkNkszqDqMkJFiADo= X-Google-Smtp-Source: AA0mqf4eBVpV4QtzQv1kmEjgmmZ3tMJ7ttuAPD6yEnjOENVule3cJ8017sco5PF+8wlel9jydeFXxw== X-Received: by 2002:a05:6a00:1acc:b0:56b:ad3b:7f5b with SMTP id f12-20020a056a001acc00b0056bad3b7f5bmr49584884pfv.1.1671325287738; Sat, 17 Dec 2022 17:01:27 -0800 (PST) Original-Received: from dingbat (203-173-24-107.dyn.iinet.net.au. [203.173.24.107]) by smtp.gmail.com with ESMTPSA id x68-20020a626347000000b0057709fd0fccsm3678218pfb.153.2022.12.17.17.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 17:01:27 -0800 (PST) In-reply-to: <83bko2ifq4.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x430.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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301594 Archived-At: Eli Zaretskii writes: >> From: Tim Cross >> Date: Sat, 17 Dec 2022 11:03:50 +1100 >> >> Given the installation of language grammars is reasonably straight >> forward (from what you posted earlier), what about adding a package to >> GNU ELPA which could facilitate/do the installation of a set of >> language grammars (similar to what the >> admin/notes/tree-sitter/build-modules/batch.sh script does. > > I don't mind, but then I don't take care of ELPA, so I'm not the guy > to talk to about this. > > Up front, it would be a strange kind of "package" for what ELPA is > supposed to hold, and I also don't understand what would package.el do > with such a "package". But that's me. I get your points. My thoughts are that this could be an easy temporary solution that would provide a smoother initial transition until distributions do bundle the language grammars. However, given other editors apart from Emacs use tree sitter, I wonder why none of the distributions I've looked at are bundling language grammars? Most of them seem to have packages for the main tree sitter libs, but none have the language grammars (with possible exception of Arch, where I think they are available via the AUR, which technically, isn't part of the distribution). Wasn't there a MELPA package which provided these language grammars? If so, I guess we know the idea can work. I also note there are other packages which will automatically install some non-elisp dependencies i.e. lsp-mode, ps-tools, all-the-icons etc. I'd like to stress my point that I would see this as a temporary and easy to deprecate approach that would help in the adoption of tree sitter. There are some options on how it would work - it could do a direct install of pre-compiled binaries, clone and build from git repositories, provide an install script the user then has to run or some other combination. Once the major distributions have packaged the grammars, it would be expected they would be automatic or possibly optional dependencies for the main emacs package. At this point, we might decide to deprecate the package in favour of using distribution based packages (or possibly just keep it for platforms which don't provide them?).