From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ACPrBXTOl2IXQAAAbAwnHQ (envelope-from ) for ; Wed, 01 Jun 2022 22:39:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eBQFBXTOl2LcBgEAG6o9tA (envelope-from ) for ; Wed, 01 Jun 2022 22:39: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 A33811B55C for ; Wed, 1 Jun 2022 22:39:15 +0200 (CEST) Received: from localhost ([::1]:52972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwV7a-0005Wa-I7 for larch@yhetil.org; Wed, 01 Jun 2022 16:39:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwV7O-0005WD-KI for guix-patches@gnu.org; Wed, 01 Jun 2022 16:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwV7O-0002wX-BN for guix-patches@gnu.org; Wed, 01 Jun 2022 16:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwV7O-0007rK-8t for guix-patches@gnu.org; Wed, 01 Jun 2022 16:39: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jun 2022 20:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55420 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Fredrik Salomonsson Cc: 55420@debbugs.gnu.org Received: via spool by 55420-submit@debbugs.gnu.org id=B55420.165411592730186 (code B ref 55420); Wed, 01 Jun 2022 20:39:02 +0000 Received: (at 55420) by debbugs.gnu.org; 1 Jun 2022 20:38:47 +0000 Received: from localhost ([127.0.0.1]:52014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwV78-0007qo-OC for submit@debbugs.gnu.org; Wed, 01 Jun 2022 16:38:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwV77-0007qa-Pf for 55420@debbugs.gnu.org; Wed, 01 Jun 2022 16:38:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwV72-0002uq-Ft; Wed, 01 Jun 2022 16:38:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=1A0bdIhk1jyC0AFNyE6+NWhAQ/FhSMYjfQikPg0Hjig=; b=brf4PJjKor/i09ylecsh GUAQnVpqxI5ZiB6d7kLLB+PZyhKGoP04axBSXSBi40XEHpLFxFsPES9MGaWe4O7Bpr4rWKI0zshsY IRFAHCqFn3E7WIBWEUVWikRV4Brwl/Yz7ATFyJOrwRW9yHuWAjz+eRee4cnMo0771HD8DjbXOzkRZ 0HdPBc3YBspxF3y9d+in9Yb5QJ5YbPcPDqiWKSsJfN1j18r51uLEoyIj1gt+X3+PbVzthr/QfBbdJ cdh1xxRXhYjcaXqcEXbFli+EP6/ChJJII4Wc+ECQwjW1mHPHSXc+3vxANkVIiffJ/ZiITTUZK8LIH wIT8BsSRGKuSlA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50652 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwV72-0005U4-34; Wed, 01 Jun 2022 16:38:40 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220514230017.27372-1-plattfot@posteo.net> <20220514230508.27885-1-plattfot@posteo.net> Date: Wed, 01 Jun 2022 22:38:38 +0200 In-Reply-To: <20220514230508.27885-1-plattfot@posteo.net> (Fredrik Salomonsson's message of "Sat, 14 May 2022 23:05:07 +0000") Message-ID: <87ee08t8z5.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1654115955; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1A0bdIhk1jyC0AFNyE6+NWhAQ/FhSMYjfQikPg0Hjig=; b=k+lNWFkvQHAMhkQQph07UsWbe9ZFVXnu6lHO/Iv4NUd7IRZLeMzP5qongQUqAdL/IIxpXl fW5kTRd+s/est/zz6JsB5i3MM0ssBXFOsFVivf265+LhNm0F8Hbfkc0KEoRFaN+LBcsNR4 e62ycFGXX3r0sN5/SIFxyYRobV2JyJ3+MhA650C6GaEAT7SHXJm8q/1A3Jw33upkqZbkfC OGJa5S4rmxNIhbxxybAPPSDz54g0qn13THXYF7Z6KsKsiys6klN/FqFcNQ+Gx1iFHMFwJQ wgFy69gkc+VrMd5895yAObk14Li/dNb3nSH7+jV9OR0GRIRFSz8tB0/z0twHYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654115955; a=rsa-sha256; cv=none; b=dxorvG2zAvNBcyo66921miR3gi7NBgP2M7wnlNHkXnD0/x82jn9kf9DMlSgIUs/rtZzDIR OgbLgpxA6iVwt9N8UvRKgpQyJWsBrjW1Ez1gaTMM6a5WrJO2VTwTC3lilAijJNRkRwP8gk AC/x5FKKxDQZMAPTtMenXmqG037hgE1qapoF3AMjuvAZMMPsOH+ItbFa9IAsBmtPBug9AH K2Yb/h/yv6swIuGfr7wPo3/4hTHYRYMWAQpUHYd+q5rCpl7bN3RupVPRCbu4Wk26iFpwHD /cua1kfhD5JSJEcBjfDb3Zd+WZ9Xd/Qk8WncE9yLSLbVxgIyJEBQnwnLksUcUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=brf4PJjK; 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: -4.83 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=brf4PJjK; 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: A33811B55C X-Spam-Score: -4.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: xICtU/AUFa3y Hi Fredrik, The patches LGTM modulo cosmetic issues: Fredrik Salomonsson skribis: > * guix/build/emacs-utils.scm (emacs-batch-script): New procedure. [...] > +(define (emacs-batch-script expr) > + "Execute the Elisp code EXPR in Emacs batch mode and return output." > + (call-with-port > + (open-pipe* > + OPEN_READ > + (%emacs) "--quick" "--batch" > + (string-append "--eval=3D" (expr->string expr))) > + read-string)) I suggest something like: (let* ((pipe (open-pipe* =E2=80=A6)) (output (read-string pipe)) (status (close-pipe pipe))) (unless (zero? status) ;; Use SRFI-34 + either a &message condition or (better) ;; a dedicate SRFI-35 condition type for the error. (raise (condition =E2=80=A6))) output) That way, execution failures would be caught and reported. Ludo=E2=80=99. =20=20=20=20=20