From patchwork Tue Aug 30 06:32:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 42073 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 A09E527BBEA; Tue, 30 Aug 2022 07:33:31 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED 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 1403C27BBE9 for ; Tue, 30 Aug 2022 07:33:31 +0100 (BST) Received: from localhost ([::1]:48372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSuoL-0005kN-Et for patchwork@mira.cbaines.net; Tue, 30 Aug 2022 02:33:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSuo2-0005iD-Kv for guix-patches@gnu.org; Tue, 30 Aug 2022 02:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSuo2-0002VZ-BY for guix-patches@gnu.org; Tue, 30 Aug 2022 02:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSuo2-0003i4-2w for guix-patches@gnu.org; Tue, 30 Aug 2022 02:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57482] [PATCH] gnu: Add emacs-org-fc. Resent-From: iyzsong@envs.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 Aug 2022 06:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57482 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57482@debbugs.gnu.org Cc: =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166184116914239 (code B ref -1); Tue, 30 Aug 2022 06:33:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Aug 2022 06:32:49 +0000 Received: from localhost ([127.0.0.1]:34511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSuno-0003ha-S7 for submit@debbugs.gnu.org; Tue, 30 Aug 2022 02:32:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:39708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSunn-0003hT-Je for submit@debbugs.gnu.org; Tue, 30 Aug 2022 02:32:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSunl-0005c3-U3 for guix-patches@gnu.org; Tue, 30 Aug 2022 02:32:45 -0400 Received: from envs.net ([89.163.145.170]:34168 helo=mail.envs.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSunj-0002S1-NP for guix-patches@gnu.org; Tue, 30 Aug 2022 02:32:45 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4A3D538A0E02; Tue, 30 Aug 2022 06:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1661841142; bh=SYoYh1eXwUcAxlhGp8ah85WkThjqOTRoVX8aLt4Lmkk=; h=From:To:Cc:Subject:Date:From; b=P92JpTbM30cj/irj962fYNnAJd/athdkHDGeW93EtxvRMSVXjHCvD15OZ1VpSAB0F AjVyZ5nCZGyWTUVdfjwmuJSz52UlBU8564q8GfAliTbMtQKYqgiQ+6qfMqupaL83Zz qziYKvBpt9r28WCuKAacuv06Bcwccxlp6tA1WxUoLVaobXmVtD4l2UIzsph/a2/GOW 25ew07ejmW2+sN6l7pJs/UyDC6dAVebYzV0u39bKs/4sO5JS6RJ1yE3WOrvn6OjE0u gp2amvlQuFQLFJquBUSHC1ywQzqpqO8WbVeIccn13jPZtQ0BcG/QL+bfSM+wD7neTy mcFTo5NxHgC6KT3ggGWip7d9DcLhIiI/yKQc2CoGXGn6/PErT/yiaLp3Mhp840DtUg kmpz2A1/xxO5THgvlIhL+1yFavFU/SwWAwi0Bus1Xx4T95F1LUZ8MgPK17DE4WKxTH zEnCLB5fcRUp79dIoJ+h0wj5GW04P9EbXugit3/1z665J4tuqPPxToBh4A6nFgTnsO vxhqCaHI0qRsf/+9Ksoz77WvcOGzwz8zMcN6PiLRVj4/0cWTUPKM0hJAF8Y0erSO1c v5jure/nRCYy/XglZORMufU2TIenu1D0vcfbmw+9cvn+z5AZ9jpdDRT4TZyeWG3dCq mYKy5G0TCtnJhG2Hi1W50SZo= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id S5MgepoR6_kq; Tue, 30 Aug 2022 06:32:19 +0000 (UTC) Received: from localhost (unknown [182.150.116.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: iyzsong@envs.net) by mail.envs.net (Postfix) with ESMTPSA; Tue, 30 Aug 2022 06:32:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 7392d543; Tue, 30 Aug 2022 06:32:16 +0000 (UTC) Date: Tue, 30 Aug 2022 14:32:13 +0800 Message-Id: <20220830063213.6058-1-iyzsong@envs.net> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Received-SPF: pass client-ip=89.163.145.170; envelope-from=iyzsong@envs.net; helo=mail.envs.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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: iyzsong@envs.net X-ACL-Warn: , iyzsong--- via Guix-patches X-Patchwork-Original-From: iyzsong--- via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches From: 宋文武 * gnu/packages/emacs-xyz.scm (emacs-org-fc): New variable. --- gnu/packages/emacs-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 90ee485f1e..90d817527b 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -166,6 +166,7 @@ (define-module (gnu packages emacs-xyz) #:use-module (gnu packages fonts) #:use-module (gnu packages freedesktop) #:use-module (gnu packages games) + #:use-module (gnu packages gawk) #:use-module (gnu packages golang) #:use-module (gnu packages guile) #:use-module (gnu packages gtk) @@ -32410,3 +32411,46 @@ (define-public emacs-vertico-posframe a Vertico extension which provides a way to pop up a frame at point to show a vertical completion UI.") (license license:gpl3+))) + +(define-public emacs-org-fc + (let ((commit "f64b5336485a42be91cfe77850c02a41575f5984") + (revision "0")) + (package + (name "emacs-org-fc") + (version (git-version "0.1.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~l3kn/org-fc") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1d0a3vr09zkplclypcgpfbfd6r0h0i3g3zsqb4pcz6x239d59gd5")))) + (build-system emacs-build-system) + (propagated-inputs (list emacs-hydra)) + (inputs (list findutils gawk)) + (arguments + (list + #:include #~(list "\\.el$" "\\.awk$" "\\.org$") + #:exclude #~(list "^tests/") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'qualify-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((find (search-input-file inputs "/bin/find")) + (gawk (search-input-file inputs "/bin/gawk")) + (xargs (search-input-file inputs "/bin/xargs"))) + (substitute* "org-fc-awk.el" + (("\"find ") (string-append "\"" find " ")) + (("\"gawk ") (string-append "\"" gawk " ")) + (("\"xargs ") (string-append "\"" xargs " "))))))))) + (home-page "https://www.leonrische.me/fc/index.html") + (synopsis "Spaced Repetition System for Emacs org-mode") + (description + "Org-fc is a spaced-repetition system for Emacs' org-mode. +It allows you to mark headlines in a file as flashcards, turning pieces of +knowledge you want to learn into a question-answer test. These cards are +reviewed at regular interval. After each review, the next review interval is +calculated based on how well you remembered the contents of the card.") + (license license:gpl3+))))