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 ICB3JT408mL2aAEAbAwnHQ (envelope-from ) for ; Tue, 09 Aug 2022 12:17:34 +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 KMmnJT408mLMzgAA9RJhRA (envelope-from ) for ; Tue, 09 Aug 2022 12:17:34 +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 F25FEDCD3 for ; Tue, 9 Aug 2022 12:17:33 +0200 (CEST) Received: from localhost ([::1]:60896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLMIn-0005Wx-2h for larch@yhetil.org; Tue, 09 Aug 2022 06:17:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMIN-0005WY-ES for guix-patches@gnu.org; Tue, 09 Aug 2022 06:17:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLMII-0007yr-Ll for guix-patches@gnu.org; Tue, 09 Aug 2022 06:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLMII-00062f-Ct for guix-patches@gnu.org; Tue, 09 Aug 2022 06:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57069] Tempel snippets Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Aug 2022 10:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57069 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 57069@debbugs.gnu.org Cc: Nicolas Graves , Liliana Marie Prikler X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166004019523186 (code B ref -1); Tue, 09 Aug 2022 10:17:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Aug 2022 10:16:35 +0000 Received: from localhost ([127.0.0.1]:42589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLMHr-00061t-0G for submit@debbugs.gnu.org; Tue, 09 Aug 2022 06:16:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:48202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLMHp-00061m-Pz for submit@debbugs.gnu.org; Tue, 09 Aug 2022 06:16:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMHp-0005Vu-KI for guix-patches@gnu.org; Tue, 09 Aug 2022 06:16:33 -0400 Received: from 8.mo560.mail-out.ovh.net ([188.165.52.147]:34189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLMHm-0007rN-Ns for guix-patches@gnu.org; Tue, 09 Aug 2022 06:16:33 -0400 Received: from player691.ha.ovh.net (unknown [10.108.20.52]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id 888E822737 for ; Tue, 9 Aug 2022 10:16:26 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player691.ha.ovh.net (Postfix) with ESMTPSA id B6ABD2D791813; Tue, 9 Aug 2022 10:16:23 +0000 (UTC) X-OVh-ClientIp: 213.44.161.47 Date: Tue, 09 Aug 2022 12:16:21 +0200 Message-ID: <87a68dpvre.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 3745306042393158369 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdegtddgvdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepudethfeugeehffetudeltedthefhheegkefgtddtueetudelkeeliedttddvfeehnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrieeluddrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeitd Received-SPF: pass client-ip=188.165.52.147; envelope-from=ngraves@ngraves.fr; helo=8.mo560.mail-out.ovh.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via 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=1660040254; h=from:from:sender:sender:reply-to: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:list-id:list-help:list-unsubscribe:list-subscribe: list-post; bh=aHlP18uNMpZxAJwBfzYw5hBzjuARLQru2APpe9imH/s=; b=huPqwhM3L51Q30G8Q+bnnxONeSEHJ5Yoi/V1+vg1XNq2ZDa2YMdFoN81DS4Dk5g+5SCG5h mBx0cCHzHsRxC6bNG/msQBjw+PVttEOcIUGGSAeglrE3Ic4Dp/MnnEPh2E4USvcTe14+1Y 5NCVxk7JCc56JxFlQ2OSTYJRV15FMNMAfcaFY8T+hix6PDpO8memZF4IRYov7t1vBdOooU RJ7aTunSEi7OuqS3edCkrbnct3DW9FWOjA3ixcMNzYZ4RTxKhztJou+eiUox6u7pne3OTx g/gC7cq3+t8Wc7VtNcYBCsCpE21/Kt5AcM3QUBsb6Nb/5riONqd8PsGEIW64Pw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660040254; a=rsa-sha256; cv=none; b=hsc/+dwKxjPduSpde00jjgTCvuAHxEB9QgYlH9Zc6R2D32G9jZ0eVZci3U2+XkdPRyNM2n 1jn6BZ+uqZ+fiubOgDYJe1qy+5L9F+ZmOIRM53kpsOo4xx/aZaYH3s2qudmyWo0F7LncW1 MWX6sKK8HH/gKYCmKLD7N1dlW8oS+TTJCGrhfIhg6FKTBWFF+qRDF9RbFz6IJxc6iLW+eA zSsg39XRWIqePuEN96nIVVaE3A97BzAJpW3uWVTifbpJROyYwIyGd6YzqQ3HkxcUyBNra1 yrG878ClXcj+H0y4hyLdaOZkMnuOmfPK2C2x7ES+h6/ixRuoaeT68MMe8b+E2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -5.49 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: F25FEDCD3 X-Spam-Score: -5.49 X-Migadu-Scanner: scn0.migadu.com X-TUID: NBHpcuhBxhGh The first patch of this series introduces the equivalent of current yasnippet templates, with the alternative package tempel. I eventually chose to make a new folder in snippets dir, and to move yasnippet files, hope it's OK. It works quite well for me now, but can be improved: - I selected completing-read for completion because I'm still learning emacs and didn't tackle completion-at-point for now. Would that be better? - Nested snippets don't seem to work that well (e.g. expanding git-fetch... within the edition of an origin... expansion), I had quite a few bugs. Seems better to finish the current snippet before tackling a sub-snippet (for now at least). - I couldn't match a small part of current yasnippet configuration, currently only the part in uri when url-fetch is chosen. Sent a "help/feature report" here https://github.com/minad/tempel/issues/65. If this is possible, we could probably further factorize and integrate the snippets logic, maybe to reach something like that for origin expansion. (origin... (let* ((method-list '(url-fetch url-fetch/tarbomb url-fetch/zipbomb cvs-fetch git-fetch hg-fetch svn-fetch bzr-fetch)) (uri (cl-case method ('git-fetch '("(git-reference" n> "(url " p ")" n> "(commit " p "))")) ('svn-fetch '("(svn-reference" n> "(url " p ")" n> "(revision " p "))")) ('hg-fetch '("(hg-reference" n> "(url " p ")" n> "(changeset " p "))")) ('cvs-fetch '("(cvs-reference" n> "(root-directory " p ")" n> "(module " p ")" n> "(revision " p "))")) ('bzr-fetch '("(bzr-reference" n> "(url " p ")" n> "(revision " p "))")) (t '("(string-append https://" p ".tar.gz)")))) (fname (cl-case method ('git-fetch '("(file-name (git-file-name name version))" n>)) ('svn-fetch '("(file-name (string-append name \"-\" version \"-checkout\"))" n>)) ('hg-fetch '("(file-name (hg-file-name name version))" n>)) ('cvs-fetch '("(file-name (string-append name \"-\" version \"-checkout\"))" n>)) ('bzr-fetch '("(file-name (string-append name \"-\" version \"-checkout\"))" n>)) (t '(""))))) "(origin" n> "(method \"" (p (completing-read "method:" method-list nil t)) "\")" n> "(uri " uri ")" n> fname "(sha256" n> "(base32 \"" p "\")))" n>)) The next patches are just new patches proposals, including :phases and licenses. Also note that there were 3 or 4 missing build-systems in the yasnippet template (might add them in a patch here). -- Best regards, Nicolas Graves