From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MPesOsd4/GISvQAAbAwnHQ (envelope-from ) for ; Wed, 17 Aug 2022 07:12:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yIWfOsd4/GJsAwAA9RJhRA (envelope-from ) for ; Wed, 17 Aug 2022 07:12:39 +0200 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 9B63415DE0 for ; Wed, 17 Aug 2022 07:12:39 +0200 (CEST) Received: from localhost ([::1]:35856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOBM6-0004mo-Oq for larch@yhetil.org; Wed, 17 Aug 2022 01:12:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOBLW-0004mY-GO for guix-patches@gnu.org; Wed, 17 Aug 2022 01:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOBLW-00015B-1D for guix-patches@gnu.org; Wed, 17 Aug 2022 01:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOBLV-0005YD-Mp for guix-patches@gnu.org; Wed, 17 Aug 2022 01:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56955] [PATCH] .dir-locals.el: Add guix yasnippets. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 17 Aug 2022 05:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56955 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 56955@debbugs.gnu.org Received: via spool by 56955-submit@debbugs.gnu.org id=B56955.166071311221323 (code B ref 56955); Wed, 17 Aug 2022 05:12:01 +0000 Received: (at 56955) by debbugs.gnu.org; 17 Aug 2022 05:11:52 +0000 Received: from localhost ([127.0.0.1]:49107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOBLM-0005Xp-D3 for submit@debbugs.gnu.org; Wed, 17 Aug 2022 01:11:52 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:43131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOBLJ-0005XZ-Ib for 56955@debbugs.gnu.org; Wed, 17 Aug 2022 01:11:50 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 760CDC0004; Wed, 17 Aug 2022 05:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1660713103; 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=ijgcdT99oIl9htpe0v6rFDYR+3ugfP9zj1set7b+cBQ=; b=MiYXSaosJeYCHa6CJW5gjJuxNo9K7xt854GdT8TdREWR8E5kMC3e1QNnHhnnd1li6VxdE0 /2m9BLJ+bCJT9D5q47PVb7B6Wlwfm4acPHUSSgTVBFpXK3XwJVEWBh1EyPxlwrsYeXQnOq vbOtRINBjHhDwKaMe+RInEW+TLgMPaeCfEKlarwQLN4F9R3QDo3dRUou5gL599CN0QYMmb m+GEvoPEJVupPqD9T/U9D/GYqQ9+rFATEvVtpD3+adXt2ly8Hvse3FLoo55WqzAqihvdv/ eqT4YJWr8qzDDla/5YxI700fsZj8PCWccF05xXGhOVy6dnz+PjfCENyVfz+PDA== From: Andrew Tropin In-Reply-To: <87o7wrlual.fsf@gmail.com> References: <877d3pid5m.fsf@trop.in> <87o7wrlual.fsf@gmail.com> Date: Wed, 17 Aug 2022 08:11:38 +0300 Message-ID: <8735dvqws5.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660713159; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=ijgcdT99oIl9htpe0v6rFDYR+3ugfP9zj1set7b+cBQ=; b=QREjIiwW3CbhsRiuF2s9WypVCgPI+E+No4/b47vBZ3j/Lovdkn1/187rki6oAhRfSSeyFo o6FP332fT+a/2XY2SbsPE5R+4DJUFs9algPN6vkIi+JwWfq/WFGtuerX/ogtRrP6QN50Zm 6lCC/NO4AC+IgUsVEF4QP+wybPtHsOjR0ub+NuZdaYPSB+eP7ZxZhYmS4AWGEfDQwS4k4y 5Q2RMRV86RnLKSdcK/DXE8DtAaQjESD/pfwSoBogTCPK8vjU9xBzC48d152aW34caOszOC URt/GX5hZJRWFG7CseXnLNIHwXtYMOYmqlCYpB7DYokL1ybMQPnzwiMNUyw4Vw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660713159; a=rsa-sha256; cv=none; b=S6uA6uAJSIIGoOQvuUHnZF6lJUEOvxRdkpsgkOtArBc7HedK6vDJxsbZ0sknd/qPC3Wh3F hkDVB9tJ5IRhlVET8Rb3y2t46xlt3bUIsM5psyuorhHh+INZE880JvuGH541j6SGahw94f wpeo7IBtwEiPeYA7XUlPHH8GO1wYVJWOiRsTYF0aTLPQiwMkbRlO2criqKD9CCRYPEQPNO VayecDxKKad1vjnYU1Afqpl3k5xiRDeUJLG2LdFbkhFlF7VGueoZV4zipSrhHvliXttaF9 2poS97cDAKeAQQxaJF9C8q9ScecH5vx4VN5DhZP3tEf3MjqPuRxdfsqZjJh24A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=MiYXSaos; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.44 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=MiYXSaos; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9B63415DE0 X-Spam-Score: 0.44 X-Migadu-Scanner: scn1.migadu.com X-TUID: hwKeTIRbSXzd --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On 2022-08-10 16:26, Maxim Cournoyer wrote: > Hi Andrew, > > Andrew Tropin writes: > >> * .dir-locals.el (eval): Add guix yasnippets. >> --- >> .dir-locals.el | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/.dir-locals.el b/.dir-locals.el >> index e4c1da8026..ecaec8de87 100644 >> --- a/.dir-locals.el >> +++ b/.dir-locals.el >> @@ -14,6 +14,15 @@ >> (eval . (setq-local guix-directory >> (locate-dominating-file default-directory >> ".dir-locals.el"))) >> + ;; YASnippet >> + (eval . (with-eval-after-load >> + 'yasnippet >> + (add-to-list 'yas-snippet-dirs >> + (expand-file-name >> + "etc/snippets" >> + (locate-dominating-file default-directory >> + ".dir-locals.el"))) >> + (yas-reload-all))) > > That's an interesting idea, but wouldn't the `yas-reload-all` be > triggered for every module visited? That may take some time if a user > has lots of snippets in their collection. > > Perhaps what it could do is check if the yas-snippet-dirs already has > the guix snippets directory, and do nothing if it does. That's right, attaching v2 with the fix. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0001-.dir-locals.el-Add-guix-yasnippets.patch Content-Transfer-Encoding: quoted-printable From=2043ab1f3da75cd8bb719b664c42f23f053b3fbb69 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Wed, 3 Aug 2022 17:51:48 +0300 Subject: [PATCH v2] .dir-locals.el: Add guix yasnippets. * .dir-locals.el (eval): Add guix yasnippets. =2D-- .dir-locals.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.dir-locals.el b/.dir-locals.el index e4c1da8026..6fa0ec8bc6 100644 =2D-- a/.dir-locals.el +++ b/.dir-locals.el @@ -14,6 +14,17 @@ (eval . (setq-local guix-directory (locate-dominating-file default-directory ".dir-locals.el"))) + ;; YASnippet + (eval . (with-eval-after-load + 'yasnippet + (let ((guix-yasnippets + (expand-file-name + "etc/snippets" + (locate-dominating-file default-directory + ".dir-locals.el")))) + (unless (member guix-yasnippets yas-snippet-dirs) + (add-to-list 'yas-snippet-dirs guix-yasnippets) + (yas-reload-all))))) =20 ;; Geiser ;; This allows automatically setting the `geiser-guile-load-path' =2D-=20 2.37.1 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmL8eIoACgkQIgjSCVjB 3rD53A//Wej9f7nSuLCNn2073ArcOOfOUBuRlIqmqvpQPf+TyWyZoF1ebPJjCTxU CkQs5eve0uPL9csU6n6R2jqeIM8hldNDLFk6QuS/kqEp+zVESuSPe07sibaST27+ 3BqiKTaN8XTEoQ9tbmIDFS75DXQl0K9nLElWNhry/J+Nb+BkKKOIwg67ewWk4yPC FA/qBNgHs1uGHzZTJGw4fSzypRg2ssZa6aaBnRcWRTHJ6Otj4zn5cLPe3qan/dVa dZFqqTEky5eOswmWjk3tHeOwOp4MU6f9xUJTsTabH2KPExaqvKK31JwV6HnjrZfA 4LgDmCAihIVcdl+YOZUpwEeeHf09u9+W5cuprJ3Qn2si+SxqYstRQvdacmma2pw9 OcrWeFwD4NM2Hnd8jrQASJ4fUU6oCfcV3QwYMlHJhBn0RXYOGR6lUlPHhyyqZVVJ Ct/6wR8xaRA00ZE3Ezoau/BxzMIrU8O26UW7ZJxCm/ivgj54RaSq7Uz1C9GPPmAo 2VS5vNqZORGDrNU/ClHaPAyLyFrF5CuGCfbarc8NRkqNNSTkrTzai8/loiZFKDj7 gMZCk26PUV1NJI1SAnqOjvs7pHfMPhhF01mx4U7rFiV00FgG8m6g8r7QnDUG0Omr 0MOlpuonFoJIiJi5dlC5Mx8/B+r10uWRxHuHQdNWKUJMSNxCF74= =NDOZ -----END PGP SIGNATURE----- --==-=-=--