From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 kHX7MJ8U9GJxCgAAbAwnHQ (envelope-from ) for ; Wed, 10 Aug 2022 22:27:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gEEYMJ8U9GLMggAAG6o9tA (envelope-from ) for ; Wed, 10 Aug 2022 22:27:11 +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 7F75D1A507 for ; Wed, 10 Aug 2022 22:27:11 +0200 (CEST) Received: from localhost ([::1]:60064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLsII-00089u-6e for larch@yhetil.org; Wed, 10 Aug 2022 16:27:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLsIA-00089k-O1 for guix-patches@gnu.org; Wed, 10 Aug 2022 16:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLsIA-0006QI-Ca for guix-patches@gnu.org; Wed, 10 Aug 2022 16:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLsIA-0006c6-97 for guix-patches@gnu.org; Wed, 10 Aug 2022 16:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56955] [PATCH] .dir-locals.el: Add guix yasnippets. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Aug 2022 20:27:02 +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: Andrew Tropin Cc: 56955@debbugs.gnu.org Received: via spool by 56955-submit@debbugs.gnu.org id=B56955.166016318125375 (code B ref 56955); Wed, 10 Aug 2022 20:27:02 +0000 Received: (at 56955) by debbugs.gnu.org; 10 Aug 2022 20:26:21 +0000 Received: from localhost ([127.0.0.1]:50851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLsHV-0006bD-8F for submit@debbugs.gnu.org; Wed, 10 Aug 2022 16:26:21 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:34432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLsHR-0006ax-Qb for 56955@debbugs.gnu.org; Wed, 10 Aug 2022 16:26:19 -0400 Received: by mail-qk1-f172.google.com with SMTP id d8so7426634qkk.1 for <56955@debbugs.gnu.org>; Wed, 10 Aug 2022 13:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=Aj0hCBilEa6QCiC05fMHa+khvhHUzCARX4Po4Z9+680=; b=lJBkh3yZaXC2hiif0jxx5o5Y+ofUn+whYUJLX3pXW51sG2WCuyF4zQqQo5sqz1Dq7m Zo5A14t52Z0Gohvt9jIbTAlHddwX3JEYP+Gyaeg+7c14Cjz5lrl12Ja58AAy4eQcPZej M7mk2T363yrgXdpIYOzQUuH985lX27kA5xAUXqMsRUNg5EIdTghA0axiUe2l2qMrTAxt mH5tAl3C51K6UMu9LQ+ZfCmHHnZr8Ks/ZTjjC6ptOcIkt1uINxSJLv8J0JvHIHdB/4MJ 9xmXmOgNBjZX2TrxTFhP9iJcW4aZAyAfRc0lKWoC1ODVCBLwZFAB5vB1M1bodgsYuiAQ uhwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Aj0hCBilEa6QCiC05fMHa+khvhHUzCARX4Po4Z9+680=; b=pyp9fmiTMlpId1DX/rLYtEzhnfZt+KN+9zS/v15yLU95tRsHNf3ScdzTiWnHH/isAJ ZwtjnXI7wf9Opq1SqIwQkEhG2ZcMZWOAjtlH56k2wBVbuRJSMQBs5COocSKcAeE3xTf2 QJ8s4gTeZdPxw5pIq0nq5qIOb44GgDuNPjf91qKzfFjFrnvPUUnmtc9Ij02suNyQm93Q VlRQKx3nIp2gLEoEacsEFw13Q/hQuw+sl0nCe6Xsu8+9BzrWNfO851Z/qi6lEBb6X9E6 5yyW45kyu34oIJP4eflOMHz50A/BUlSeSBYWSVN3SvRmZYUkvuWTIvXeUhQf2XlWdT2H lh1g== X-Gm-Message-State: ACgBeo2pOqQJLs4PEKrnfC+NLgcJ5vd3QwZ+eiqmlAeRLmPEC2r24uZR gwJZbpBj+gog7QMT8BTgaAIMBvOXAP8= X-Google-Smtp-Source: AA6agR639gqUqj0CvjaxpNidNtoOpU0NnF/nENcouRTEes31O3LkxnqDSHyrU1nZC1C7qS2bs9XC9A== X-Received: by 2002:a05:620a:bce:b0:6b8:e8c5:21ce with SMTP id s14-20020a05620a0bce00b006b8e8c521cemr22224835qki.484.1660163171944; Wed, 10 Aug 2022 13:26:11 -0700 (PDT) Received: from hurd (dsl-10-148-207.b2b2c.ca. [72.10.148.207]) by smtp.gmail.com with ESMTPSA id x23-20020a05620a0b5700b006a6ebde4799sm538769qkg.90.2022.08.10.13.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 13:26:11 -0700 (PDT) From: Maxim Cournoyer References: <877d3pid5m.fsf@trop.in> Date: Wed, 10 Aug 2022 16:26:10 -0400 In-Reply-To: <877d3pid5m.fsf@trop.in> (Andrew Tropin's message of "Wed, 3 Aug 2022 17:51:48 +0300") Message-ID: <87o7wrlual.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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=1660163231; 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=Aj0hCBilEa6QCiC05fMHa+khvhHUzCARX4Po4Z9+680=; b=p9dWXn1F00ABWsUsvgLPnSX7oQUA3Ml0VW8t4jM8XDG0PrQXGiBuKRrl1XmZhdt4+UXUFp VNNJjQimhZgRn9wtSUho/adFc4/AhT2TOwfltoyOlA5OA05HPIUdyb28bSN54bhzzKHv9k q+Ru0t3xAHF3f8uXtqIqMsxGkkxsqwBJTogEhoWRstqq/QFJ9RhKyZOdVwv+ETYZrHseGx Hq4CrOhc+jqHdnXUAlfyk4m1ADevfpoVSwez2JkD07SLoKyQ1cDQrUrBMqh4sWHE3B6Hm3 03KS02I6Re54aYjY49fTvKf0MZHBFv1fo7mHKSNmS8E17XlTKhsR58fUaGKWKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660163231; a=rsa-sha256; cv=none; b=vAB2v6S+K3x1D0e2l4puVsTRKButrvjP5lbo0/NlLSc6+P1td+eDoVLmuHzbLpJLGZnUmb wl2wvNWLLOq+LIL6oBccRZmYTBfz+fgvbizv+I8g5rL/AjQrgArwSWMBJ6s6jc/zDJcojf pTfYS2uX9qIjpaoOgpt8VpErgCrAKJefb1m5fEadBoVPnSzrQg2WQI7yjeQMFTFSt2NdC2 mBMQHykBkLW/cix/mwncfjMShy9mTJiGGlaMazLYYygn0aXzQerbj3ULd5Gj94l0TbtXlu s2unxM1TS2YRhKY2OTwByYkNegej6RI6ZWgr+CXE8TiFG7LzuvadFnL85GQH0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lJBkh3yZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 7.62 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lJBkh3yZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 7F75D1A507 X-Spam-Score: 7.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: Jd7WuG33ysEU 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. Thanks, Maxim