unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Tempel snippets
@ 2022-08-06 23:53 Nicolas Graves via Development of GNU Guix and the GNU System distribution.
  2022-08-07  7:33 ` Liliana Marie Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Graves via Development of GNU Guix and the GNU System distribution. @ 2022-08-06 23:53 UTC (permalink / raw)
  To: guix-devel


Hi guix!

I'm translating the snippets used in the snippets dir so that we can
provide an alternative (here tempel) for snippets in the Perfect Setup.
I have two practical questions about where to put that code.

1) For reproducible development purposes (e.g. rde), it would
be great to have snippets shipped with guix itself (the snippets
directory is not in the store of the guix package), or alternatively in
a package, instead of in a possibly moving directory. WDYT? Which
alternative is the best?

2) Where should I add tempel-ready snippets? The etc/snippets dir can't
be used directly because it's the one used by yasnippet. Or in the
option of packages, I can rather make one.

3) I'll send a first series with basic working templates, but in the
process have seen that there may be some refactoring / snippets
improvements, but I'm not yet emacs-fluent enough to get that done
easily. Will probably send a mail with the series with some ideas for
refactoring and where I'm stuck. Also I think that we can add a snippet
for license: completion, include an alternative snippet for copyright
(since we must be at the right spot to insert anyway), and have an
option to compute base32 hash during template completion (if possible,
I'll see what I can do).

-- 
Best regards,
Nicolas Graves


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tempel snippets
  2022-08-06 23:53 Tempel snippets Nicolas Graves via Development of GNU Guix and the GNU System distribution.
@ 2022-08-07  7:33 ` Liliana Marie Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Liliana Marie Prikler @ 2022-08-07  7:33 UTC (permalink / raw)
  To: Nicolas Graves, guix-devel

Hi Nicolas,

Am Sonntag, dem 07.08.2022 um 01:53 +0200 schrieb Nicolas Graves:
> I'm translating the snippets used in the snippets dir so that we can
> provide an alternative (here tempel) for snippets in the Perfect
> Setup.
Thanks for that.  I've been meaning to try out Tempel for a while, but
Guix snippets have been a minor reason to "just keep yas" for a while.

> I have two practical questions about where to put that code.
> 
> 1) For reproducible development purposes (e.g. rde), it would
> be great to have snippets shipped with guix itself (the snippets
> directory is not in the store of the guix package), or alternatively
> in a package, instead of in a possibly moving directory. WDYT? Which
> alternative is the best?
I don't really think there's a requirement to do so.  These snippets
are meant for contributers to Guix.  Contributers to other channels
ought to follow that channels' practices – if Guix snippets apply
there, that's great, but it's not a given. 

> 2) Where should I add tempel-ready snippets? The etc/snippets dir
> can't be used directly because it's the one used by yasnippet. Or in
> the option of packages, I can rather make one.
I'll give you two answers:
1. The taxonomer's answer is to simply subdivide etc/snippets into
tempel and yas.
2. The "I don't like that many layers in my filesystem" answer would be
to have etc/tempel-snippets and etc/yasnippets
Pike your bikeshed.

> 3) I'll send a first series with basic working templates, but in the
> process have seen that there may be some refactoring / snippets
> improvements, but I'm not yet emacs-fluent enough to get that done
> easily. Will probably send a mail with the series with some ideas for
> refactoring and where I'm stuck. Also I think that we can add a
> snippet for license: completion, include an alternative snippet for
> copyright (since we must be at the right spot to insert anyway), and
> have an option to compute base32 hash during template completion (if
> possible, I'll see what I can do).
For the hash thing I think it'd be valuable already if you embedded the
hash of an empty directory.  For the record, that's
  0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5
Don't try to be too smart, running guix commands (or even git checkout)
during snippet expansion is not something I'd expect.

Cheers


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-07  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-06 23:53 Tempel snippets Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2022-08-07  7:33 ` Liliana Marie Prikler

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).