From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 wCNnKPp952PiogAAbAwnHQ (envelope-from ) for ; Sat, 11 Feb 2023 12:37:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6MNnKPp952NCtAAA9RJhRA (envelope-from ) for ; Sat, 11 Feb 2023 12:37:30 +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 7B0B028B8C for ; Sat, 11 Feb 2023 12:37:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQoBX-0003LE-It; Sat, 11 Feb 2023 06:36:51 -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 1pQoBW-0003KT-AA for guix-devel@gnu.org; Sat, 11 Feb 2023 06:36:50 -0500 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQoBU-0000Aj-AT for guix-devel@gnu.org; Sat, 11 Feb 2023 06:36:50 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id 6FEEA165F6; Sat, 11 Feb 2023 11:36:43 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 5ca8c2ff; Sat, 11 Feb 2023 11:36:42 +0000 (UTC) References: <167610269975.14308.10330520524841229243@vcs2.savannah.gnu.org> User-agent: mu4e 1.8.11; emacs 28.2 From: Christopher Baines To: Andrew Tropin Cc: guix-devel@gnu.org Subject: Re: branch master updated: gnu: emacs: Add TREE_SITTER_GRAMMAR_PATH support. Date: Sat, 11 Feb 2023 11:29:26 +0000 In-reply-to: <167610269975.14308.10330520524841229243@vcs2.savannah.gnu.org> Message-ID: <87cz6g5t87.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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=1676115450; a=rsa-sha256; cv=none; b=VbbiZLwQHNqjf/RzmEyKURrUa0dqoVU4bbuqWSu05Sew0CChjxRA0ANnvtdk25DT6fYaOl SDC/tU2buMA6xshBaCeXy5yo5T1HA9YsOMgBlK1nlUoWjTIW+YE5qSlr8lorUctZA3fIlA +aimTbytrCXgwT7hwLJlmc1a8F8PHgUweT+BHDMhS05YIur4gjsIaYUYC/14paSJOwwT9V b1nrHlR2eVCX6tT+Qr9+3Wd9jXYTc+H9Av1+qi1rW2sf2hcpUkDYB2ZFydd6eUOpASYweQ HKBoDy6j1mc8z0TJ9LyNsq2wxp14wC16ujtG/TLRLaWUzuPLpAptk3ixzR1U7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=1676115450; 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; bh=VkIK04OIpQmUFgtuc0Ru8VRtnztih9cghdgrm0PcxzY=; b=Cyj92gn7RecOkjPXogAlehOPGzkymmWiXz0kGdeaxNOrjG73gy9c8djYL733IWmBt7VDRO BgxfkMMJrLDE3w1LF1AJ6bbjIlFP6OUxqbH6x/nmbmubvFa/JqxQMyV09Ido9UZzArR/uI AukusZFLRyo+ARhjUXnNm2fXk8fUzZE7zlaw2knj7A0PzT33xoOZ33Rsxf5ZG/e21/Am5H GdLqH4E2IeZVTLDklG5cp2BVBEMtKRueMXTGS/olybF9LgZJ3f9zJyixqFrsrWmfwsb+9X 45IQClmNbJzYnl1SVSMGDrPozqGTgbQVlri78whfD7dMbJXAysQ57hwL/kbHBw== X-Migadu-Spam-Score: -4.50 X-Spam-Score: -4.50 X-Migadu-Queue-Id: 7B0B028B8C Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 5qWSxcCsCNFy --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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-pat= h 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/au= x-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, .el= c)." > (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 va= riable > +;; 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-sit= ter > + ;; 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 edito= r") 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmPnfchfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XdDIg//R4vaI4x1cD/hgqR2gmpVSWz+mY2sHqJ9 GQSYopegtxnQ61B1W5MkFXZdSaDc3Ptz4vCVmu5xeeGjcct+klXWZhhEfIoM/H/r 7VnVsGpIqEqYAwfeBnaEklJwDI3zLYNiiC/Szf/pZ1BD7ubUd/L+6eUCOjVbx8tS ONI2Ndp3tshpxlTda+BYkei0b7gab3oWzZCnaCCxo8d9ROCIamqrdZK+t96cEGll f+LOuxxzgFRE9pcNUDvXP5n7ZK4QnRe9z8aKz9I83d5NDkli9AxY8iJ6CIKFjKOe +eYa9sC2FCEqBij3kmpmAoZ1U03RmT07MzW9RAiX7W0EdUCMcRVLaXnVFtBfdSId wfwMI9onWbj36p4kM+IXXGXcDjC1Cszzu58Uztk1dvXQeS6NmCt9BSbvqMDPPL+b tEv8M34bK/iT23S5paFW6cklWaYhzdMEA5fg6sr5FbG1bQrc0znhHx/ZnsWD2ibs EgEH+u0nJLIDNqwQDQG/IhoOIoXhne3bcm6QJpaRdMbdNK39PkYhwaVgFi+N1NxQ xaTdCP2HQeojCxyD07COAsa4EdBMetCnIx8/mbNHJiV0lij9CXG2/h/s3L0ZWpHq LgPeoeKuq1hyzWNmfjiFzqArg/ZJ0u61NPhfq1XPZa07oiEV1z6LERnYKoyPjaiW 9InNqlqcqAI= =ujxZ -----END PGP SIGNATURE----- --=-=-=--