From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cBc0IbSL52NWOQAAbAwnHQ (envelope-from ) for ; Sat, 11 Feb 2023 13:36:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2Li8ILSL52Ni2wAAauVa8A (envelope-from ) for ; Sat, 11 Feb 2023 13:36:04 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 44FD729D01 for ; Sat, 11 Feb 2023 13:36:04 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQp6E-0003Ul-9u; Sat, 11 Feb 2023 07:35:26 -0500 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 1pQp6A-0003UN-TK for guix-devel@gnu.org; Sat, 11 Feb 2023 07:35:23 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQp5y-0004Xw-Nf for guix-devel@gnu.org; Sat, 11 Feb 2023 07:35:13 -0500 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 234D460004; Sat, 11 Feb 2023 12:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1676118905; 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=UOR9L6ao3lYmHbMP7+ANRt4/PCOdjAPAHQ4YZqXpYIo=; b=P7Lne66NQjVvKcb+HeZPuXqyqFnvkFtKFJz9pdsiVeDy+LZhFgg9jozVK+sCunGk/mRqaM B42Ewjv5jBfGZguBLk7Ois8lHemKCFQePXkGAWGQ4R1E/0PkDVXYCJGEvg3lzBR1B2ELMQ to86InUcIcT+NzFN8XHw28MdE+7FOZRGfGlZJc/3LRPhpUpMpk5qMVQwgI1n6z6TdVnzan 0CQnJcbxR/GSe/72iOk8jf0Ocvv4JvDS8E7nE7okKPHqhq7LJqhKzHhuZ7DTW5z0mVF4kb Wj2tM+oEiBpQJSqOVTp5TcXCMqcDhCI2u8ywt0Sd7l+j8PbnvundCrW4uXbjhg== From: Andrew Tropin To: Christopher Baines Cc: guix-devel@gnu.org Subject: Re: branch master updated: gnu: emacs: Add TREE_SITTER_GRAMMAR_PATH support. In-Reply-To: <87cz6g5t87.fsf@cbaines.net> References: <167610269975.14308.10330520524841229243@vcs2.savannah.gnu.org> <87cz6g5t87.fsf@cbaines.net> Date: Sat, 11 Feb 2023 16:35:01 +0400 Message-ID: <87zg9kgz2i.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:4b98:dc4:8::223; envelope-from=andrew@trop.in; helo=relay3-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676118964; a=rsa-sha256; cv=none; b=nsOJ/SyqFz6Mq07tp4ptwVMnnXvpNm2zVPnSXuuWsyALLO/lPUeuk4E15sGQ6qPNGXHTKP 5sskiO6pROgju1qpWCx4QBJUAwdeDgY7vL7IQkbTU9JPfbdHP9jH6pe7fJNfQB6+kjo2z8 hKT6cw2ylPpCZ60OTycYDXZg7XA2PzYaoR0N6lacRfTIhVqwsBMAFG/kyUFG23A3IrX18V 67D2u9zz+yURJ/Vdrvfy+odeXRw8RKIpXJlm10CwvCD/pr0+Qgbl03BS32DVmVsD9/nPR/ ymp77c621cj9ru5UQN92pZyhT5IC9hgEcgHmrhCUNVDBbW/PkJVxFLdBx3fVWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=P7Lne66N; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676118964; h=from:from:sender:sender: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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=UOR9L6ao3lYmHbMP7+ANRt4/PCOdjAPAHQ4YZqXpYIo=; b=X9JMs3CZBwooDOIrW/WqAVQC7A1O8f62wAZHxKoSILDisnV6I1vt0WW2WTGetoHQ53y8Zu tiv14yfUNkb0x9lSld4hvG5mr1l3d/xxQ2AVB+T0AIO/hQv0a1OJS08/daS8i6F62QH/4g TkQsZJWAu8k067uBRMRj+HQ5DXGShx7jWvIwsXvntjL1BmSGpDji0Nwrca4QyLw/D136ke 7kqOlWtFT2P/LIaU9bfG5V70f2nlhuATehJ1qVndce3wYFrSGvdT5MSvtGRDPyUcZSTym3 GSf1dmdCSpRX1SJbtp1Ky8x+bK3aVegYpxzLCfaCBA1YnojcDDSREpsdBZv3SQ== X-Migadu-Spam-Score: -7.74 X-Spam-Score: -7.74 X-Migadu-Queue-Id: 44FD729D01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=P7Lne66N; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-TUID: 3Ea4aVm+myxN --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-02-11 11:29, Christopher Baines wrote: > guix-commits@gnu.org writes: > >> This is an automated email from the git hooks/post-receive script. >> >> abcdw pushed a commit to branch master >> in repository guix. >> >> The following commit(s) were added to refs/heads/master by this push: >> new c77a3d4554 gnu: emacs: Add TREE_SITTER_GRAMMAR_PATH support. >> c77a3d4554 is described below >> >> commit c77a3d4554175ee5320ccc713aa21b1ba3e6b8a3 >> Author: Andrew Tropin >> AuthorDate: Fri Feb 10 12:32:12 2023 +0400 >> >> gnu: emacs: Add TREE_SITTER_GRAMMAR_PATH support. >>=20=20=20=20=20 >> gnu/packages/emacs.scm (emacs)[native-search-paths]: Add a search-pa= th for >> tree-sitter grammars. >> gnu/packages/aux-files/emacs/guix-emacs.el: Add directories from >> TREE_SITTER_GRAMMAR_PATH to treesit-extra-load-path. >> --- >> gnu/packages/aux-files/emacs/guix-emacs.el | 7 +++++++ >> gnu/packages/emacs.scm | 10 +++++++++- >> 2 files changed, 16 insertions(+), 1 deletion(-) >> >> diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/a= ux-files/emacs/guix-emacs.el >> index 56dbcb8d67..708093267d 100644 >> --- a/gnu/packages/aux-files/emacs/guix-emacs.el >> +++ b/gnu/packages/aux-files/emacs/guix-emacs.el >> @@ -76,6 +76,13 @@ The files in the list do not have extensions (.el, .e= lc)." >> (when (file-directory-p pkg-dir) >> (package-load-descriptor pkg-dir))))))))))) >>=20=20 >> +;; If emacs built with tree-sitter, read the value of the environment v= ariable >> +;; to make tree-sitter grammars available in emacs out-of-the-box. >> +(with-eval-after-load 'treesit >> + (when-let ((grammar-path (getenv "TREE_SITTER_GRAMMAR_PATH"))) >> + (mapcar (lambda (x) (add-to-list 'treesit-extra-load-path x)) >> + (split-string grammar-path ":")))) >> + >> (provide 'guix-emacs) >>=20=20 >> ;;; guix-emacs.el ends here >> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm >> index 4ce41deb88..b6a66bafac 100644 >> --- a/gnu/packages/emacs.scm >> +++ b/gnu/packages/emacs.scm >> @@ -367,7 +367,15 @@ >> (files '("lib/emacs/native-site-lisp"))) >> (search-path-specification >> (variable "INFOPATH") >> - (files '("share/info"))))) >> + (files '("share/info"))) >> + ;; tree-sitter support is not yet available in emacs 28, but= this >> + ;; search path won't harm and also will be beneficial for >> + ;; emacs-next and other emacs-* packages, which have tree-si= tter >> + ;; support enabled. Please, remove this comment, when emacs >> + ;; package is updated to 29. >> + (search-path-specification >> + (variable "TREE_SITTER_GRAMMAR_PATH") >> + (files '("lib/tree-sitter"))))) >>=20=20 >> (home-page "https://www.gnu.org/software/emacs/") >> (synopsis "The extensible, customizable, self-documenting text edit= or") > > The change to guix-emacs.el is pretty impactful here since that affects > all the emacs packages including emacs-minimal I think. > > If I've understood your comment correctly, that does seem pretty > wasteful since those rebuilds because of the changed emacs-minimal won't > have any affect since it's version 28 and not 29, right? I think > applying this change to just emacs-next would have been possible. It could be applied to emacs-next only and we could move it to emacs later when it updated to 29, but I checked guix refresh --list-dependent emacs and it shown less than 100 packages so I decided to apply it straight to emacs, but I forgot that emacs-minimal is inherited from emacs and I guess you are right and it will affect all the emacs packages. Anything we would like to do about it right now? =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmPni3UACgkQIgjSCVjB 3rBJXxAAibOs7jn/D5ekjhSHFd61rfNG8X+EGyW3IhGAHJ3JaSEQh9oUcG8tTqyE 4skcKmJR5MeBqDiDA8cNKNRZSOz/5HZ85bQwmF1Jw3HvasMUj+DDUiDblm06xrx/ EKo2/l7Uob04hyGbZ3crAp6MsWQEs4sFlv92kX6USlc5W+GYq2xDX1A/dA5x/SvV FmU2x5pExRM87rHhbWseiaJwhhrePh6IEXA7z5uKu0CkctFBZQX9vC14iEeFIaq4 BuDsQYKAhxkwWnb7uH9N+6T/h0hFj51v/v/2TQgs/ljfjhSDS9vRNqbnWYhuFapF 4j+OKXdtiXUeAYABNIAMlfyImaDozTXdpkLnjjxp+KTPkObsfw6U5ECN/7BS2oB3 1s11WdxO+aQq/qGpbe9D0tPcpE4sRkpRS5Bl4hhESPHVFmuQDxiGJwuUJAO9GL3t LGYdawMKOqD3rWuO2ZV0k32Z4hvK2Hpxk9o0EFl5jjAaOS6SsCMOdDAmEh16ijDo 2He1fXK0e+fU/fLVbnx5tp1sPOQeXMNrOq320AKdCtBwDe6T+D32D58Jd+A1rTxX bcVuWiMt3zYTciC+F4o71EYHX21+UsEpgFT34rQng85LtoTVMeSgIyKq1XnhVzKk xckHTGgrENdP67zu/rrMJBL/8gPygLJFyxARPwJrPshlP47x3bE= =d/XL -----END PGP SIGNATURE----- --=-=-=--