unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Andrew Tropin <andrew@trop.in>
Cc: 56955@debbugs.gnu.org
Subject: [bug#56955] [PATCH] .dir-locals.el: Add guix yasnippets.
Date: Wed, 10 Aug 2022 16:26:10 -0400	[thread overview]
Message-ID: <87o7wrlual.fsf@gmail.com> (raw)
In-Reply-To: <877d3pid5m.fsf@trop.in> (Andrew Tropin's message of "Wed, 3 Aug 2022 17:51:48 +0300")

Hi Andrew,

Andrew Tropin <andrew@trop.in> 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




  reply	other threads:[~2022-08-10 20:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 14:51 [bug#56955] [PATCH] .dir-locals.el: Add guix yasnippets Andrew Tropin
2022-08-10 20:26 ` Maxim Cournoyer [this message]
2022-08-17  5:11   ` Andrew Tropin
2022-09-01 21:18     ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7wrlual.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=56955@debbugs.gnu.org \
    --cc=andrew@trop.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).