From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kOR2D7w0gGJ/lAAAbAwnHQ (envelope-from ) for ; Sun, 15 May 2022 01:01:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aJ5tDrw0gGIBFwAAG6o9tA (envelope-from ) for ; Sun, 15 May 2022 01:01:16 +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 C723815845 for ; Sun, 15 May 2022 01:01:15 +0200 (CEST) Received: from localhost ([::1]:38984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nq0l8-0005ot-VH for larch@yhetil.org; Sat, 14 May 2022 19:01:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nq0kw-0005nw-Ug for guix-patches@gnu.org; Sat, 14 May 2022 19:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nq0kw-0000YV-7C for guix-patches@gnu.org; Sat, 14 May 2022 19:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nq0kw-0002cL-3x for guix-patches@gnu.org; Sat, 14 May 2022 19:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55420] [PATCH 0/2] Add a function to parse emacs elisp's package header Resent-From: Fredrik Salomonsson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 14 May 2022 23:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55420 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55420@debbugs.gnu.org Cc: Fredrik Salomonsson X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165256924410025 (code B ref -1); Sat, 14 May 2022 23:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 May 2022 23:00:44 +0000 Received: from localhost ([127.0.0.1]:47700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nq0kd-0002bd-W0 for submit@debbugs.gnu.org; Sat, 14 May 2022 19:00:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:47994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nq0kc-0002bW-Vg for submit@debbugs.gnu.org; Sat, 14 May 2022 19:00:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nq0kc-0005kl-OF for guix-patches@gnu.org; Sat, 14 May 2022 19:00:42 -0400 Received: from mout01.posteo.de ([185.67.36.65]:35929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nq0ka-0000UQ-TQ for guix-patches@gnu.org; Sat, 14 May 2022 19:00:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0B282240026 for ; Sun, 15 May 2022 01:00:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1652569238; bh=ftqUDi9Qb0qOqeFFtbz5VMuJbzTz0CK57bvmOdDiTSg=; h=From:To:Cc:Subject:Date:From; b=m7oce0ZIQsVFmmzMHIZHGeOvlR+4QRgUlBE+5tNPC5uQfkQL+p4u/e5eCZSMwVk9U cGgmmKLfeMsTmp04IQ0wevOzKMgJZWqgZm1Nkr+iyIlJZLn9dEWymzHVrAFh/O5CCJ 2wVm7OapxCAIlRDIUwuE+TxmPUCSsMNUWDf6/1hrT7s/klHDKMNvoQ+azJmyjFXF22 w5Y4TAFn+3mOE94u8DoyAq7dhvVOWyPBKQtKQXnUnAXcWNW1xpH5P+0gcdj+25Vm2U k4HLTU6ek1AOGNDt64uMHiiAh+0mUalVxlnMhTTTuaPidc1XGb4tBEjLg/ACu2oJXz PziwB1yIN1U3Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4L11Fd1Jbxz9rxB; Sun, 15 May 2022 01:00:36 +0200 (CEST) From: Fredrik Salomonsson Date: Sat, 14 May 2022 23:00:17 +0000 Message-Id: <20220514230017.27372-1-plattfot@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.65; envelope-from=plattfot@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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" 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=1652569275; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=rDr890C/y8sQ/dzbJ6IWJkfGdj6XXi06Tq8ztreLnEo=; b=cGW/7yO2QlH0HcCXLirv321urNtvsUOQ7q/OYpr5TTsceHO371a+layd+GP2E6Ze3iVwKh Vk0ZCV9vPCIalrAOxhbDd9+7duYuofb2lKhdT8T7C2eC8fUuPxiy4A6zgXpDfJDRaeP7Ha nifVjJeJPgJ+nt7ZuTVTTSj+7RyZ0jhB55zEQ8LWAesPpLMrVQwanOob/JxFrJW+09BqoK yxo2Jky2u0ynBrqQ45J6BK5PjYUr3S2TMz13+NA6LdBcCpBG3PTe2q2tLvvszS2OkfrLuw 4i7ANXNnQJOWz0qiyo60HdogLiJEKC5TvUDrBYkHWrdZW0Miq0VynZ6mCWgm0w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652569275; a=rsa-sha256; cv=none; b=KTdyYfBz/NRvUJXAzhg6AaAwXRuP8u0cw4JKYtVZZUVlctWOia5IcokGP4IbG4XXs7xiFJ xkmK7FfV/v6HwNJLiD8rGwsgxmwSP84LezZOSaM76C3oyhR6E9nwQ3iD/apdflRIqx2yKU fyBMzqQZTwUWv3f2+WRnkN4kXXXLBrFCCsuvfPFWG1VJDzRN4/ews/u3zcsLNJ7X1tgb64 H/uMT3DXuipSSMK2sbJtWhhZQ2KD57UNPcr9+PDm0vPkzFwkNoHF1pQwNEnmE1a9XYG+fM iszxBpYbIKDjX/mxkxPYLSv9Lsck/yHBdBCRImV+L1iniL5wV7v7p079wVA5yQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=m7oce0ZI; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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: 7.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=m7oce0ZI; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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: C723815845 X-Spam-Score: 7.07 X-Migadu-Scanner: scn1.migadu.com X-TUID: Q6c9+t//Cn7v When writing a guix.scm file for an emacs packages, I wanted a way to fetch the version I specify in the header of the elisp file. I found that I could do that with the lisp-mnt library in emacs. Unfortunately none of the emacs utility functions in guix/build/emacs-utils.scm return the output of an elisp expression. With these two patches I aim to add that functionality. I spilt it in two functions: emacs-batch-script: Run an arbitrary elisp expression and return the output as a string. emacs-header-parse: Given a header section and a file it will return the value of that section. For example (emacs-header-parse "version" "path/to/an/elisp/package.el") Reason for the spilt is that people might want to run other elisp snippets. Fredrik Salomonsson (2): guix: emacs-utils: Add emacs-batch-script. guix: emacs-utils: Add emacs-header-parse. guix/build/emacs-utils.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) base-commit: 3935451f63c078cae9a928d87c6838ec3138abc0 -- 2.36.0