From patchwork Tue Aug 30 14:57:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 42076 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 93E8927BBEA; Tue, 30 Aug 2022 15:58:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5598D27BBE9 for ; Tue, 30 Aug 2022 15:58:26 +0100 (BST) Received: from localhost ([::1]:42834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT2h7-0000bj-Gb for patchwork@mira.cbaines.net; Tue, 30 Aug 2022 10:58:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT2gk-0000Xi-JE for guix-patches@gnu.org; Tue, 30 Aug 2022 10:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oT2gk-0003ku-9p for guix-patches@gnu.org; Tue, 30 Aug 2022 10:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oT2gk-00071p-0u for guix-patches@gnu.org; Tue, 30 Aug 2022 10:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57487] [PATCH] guix: Add tempel snippet move. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 Aug 2022 14:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57487 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57487@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166187147427002 (code B ref -1); Tue, 30 Aug 2022 14:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Aug 2022 14:57:54 +0000 Received: from localhost ([127.0.0.1]:36990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT2gc-00071Q-1q for submit@debbugs.gnu.org; Tue, 30 Aug 2022 10:57:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:43892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oT2ga-00071J-AL for submit@debbugs.gnu.org; Tue, 30 Aug 2022 10:57:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT2ga-0000PG-45 for guix-patches@gnu.org; Tue, 30 Aug 2022 10:57:52 -0400 Received: from 4.mo550.mail-out.ovh.net ([46.105.76.26]:35139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT2gX-0003gk-8M for guix-patches@gnu.org; Tue, 30 Aug 2022 10:57:51 -0400 Received: from player715.ha.ovh.net (unknown [10.111.172.221]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 00FE02498F for ; Tue, 30 Aug 2022 14:57:34 +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 player715.ha.ovh.net (Postfix) with ESMTPSA id 8B5072DDAF836 for ; Tue, 30 Aug 2022 14:57:33 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-101G0042ecefb35-f4a1-4236-a8f5-527d43c75909, 17BE3074218503CA9BB50652DF57D6A0BB3A2226) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Tue, 30 Aug 2022 16:57:32 +0200 Message-ID: <87r10xkcdf.fsf@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 2692308155965563642 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekfedgkeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkgggtgfesthhqredttddtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeejgeevueeihfelkeevteffkedvudetheekkefggeehleefteetveefheejgedvtdenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrjeduhedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheehtd Received-SPF: pass client-ip=46.105.76.26; envelope-from=ngraves@ngraves.fr; helo=4.mo550.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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches --- etc/snippets/tempel/text-mode | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/etc/snippets/tempel/text-mode b/etc/snippets/tempel/text-mode index a1400aac69..8096d92e47 100644 --- a/etc/snippets/tempel/text-mode +++ b/etc/snippets/tempel/text-mode @@ -99,3 +99,20 @@ text-mode :when (and (fboundp 'git-commit-mode) (git-commit-mode)) ": Use HTTPS home page." n n "* " (car (magit-staged-files)) " (" (s var) ")[home-page]: Use HTTPS." n (mapconcat (lambda (file) (concat "* " file)) (cdr (magit-staged-files))) n) + +(move\ + "gnu: " + (p (with-temp-buffer + (magit-git-wash #'magit-diff-wash-diffs + "diff" "--staged") + (goto-char (point-min)) + (when (re-search-forward "\\-(define-public \\(\\S-+\\)" nil 'noerror) + (match-string-no-properties 1))) + var) + ": Move to " + (concat "(" + (string-replace "\.scm" "" + (string-replace "/" " " (car (magit-staged-files)))) + ").") n + n "* " (car (magit-staged-files)) " (" (s var) "): Move from here…" + n "* " (cadr (magit-staged-files)) " (" (s var) "): …to here.")