From patchwork Wed May 8 18:32:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sent X-Patchwork-Id: 27191 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 AEF6227BBEA; Wed, 8 May 2024 19:35:16 +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=ham 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 217D727BBE2 for ; Wed, 8 May 2024 19:35:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4m7s-0001v4-FC; Wed, 08 May 2024 14:34:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4m7h-0001tA-1a for guix-patches@gnu.org; Wed, 08 May 2024 14:34:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4m7g-0005hg-Cf; Wed, 08 May 2024 14:34:36 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4m85-0007DT-Kn; Wed, 08 May 2024 14:35:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70829] [PATCH v2 1/2] doc: Document assume-valid-file-name in local-file References: In-Reply-To: Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Wed, 08 May 2024 18:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70829 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70829@debbugs.gnu.org Cc: Richard Sent , Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 70829-submit@debbugs.gnu.org id=B70829.171519329327717 (code B ref 70829); Wed, 08 May 2024 18:35:01 +0000 Received: (at 70829) by debbugs.gnu.org; 8 May 2024 18:34:53 +0000 Received: from localhost ([127.0.0.1]:50200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4m7w-0007Cz-Jg for submit@debbugs.gnu.org; Wed, 08 May 2024 14:34:52 -0400 Received: from mail-108-mta133.mxroute.com ([136.175.108.133]:44309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4m7u-0007Ct-7y for 70829@debbugs.gnu.org; Wed, 08 May 2024 14:34:51 -0400 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta133.mxroute.com (ZoneMTA) with ESMTPSA id 18f597c2efd0008ca2.001 for <70829@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 08 May 2024 18:34:21 +0000 X-Zone-Loop: 2f01149c2e27682e8851b09fc15998b3fa99407a80c4 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5EpOFjh9Kf5sg43uVarK9Xk/XGf8vhABgrttwJpMsW0=; b=T/7slP/5obo2b9l1zK3p6qzyPp L+b7l1cG7kSm8o9M6xTlINCEpddp726zwTF2ZUqXTtWTA22E7YMf35zT9pYlZsZAiWdve2U7MtM64 gOfWbWaEkwBzzJWl7vz5x9jIfqjQgJs6plffru2ozx6mzn58VSCPBA+LhMRT0hK4K8cQMPkggU19D IEFIRvVYZemEPFaHSRcw5RvzApEE+Ho2PD+TV7/yg+/8k3vwYvEsmBYQ5l6RErLFZYDxuA7lO4JBL 5TQQ0oKPJgN3U7t6256PvmHv3rTpcC0whUj02wVlfB8UmwBVxV66bHgHPODKOag8HDl5O4vCug2yG 2/MS0Now==; From: Richard Sent Date: Wed, 8 May 2024 14:32:46 -0400 Message-ID: <23ca145e6087ea18559fdd71d0c92db572abc8a3.1715193167.git.richard@freakingpenguin.com> MIME-Version: 1.0 X-Authenticated-Id: richard@freakingpenguin.com 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches doc/guix.texi (G-Expressions): Document the use of assume-valid-file-name with local-file. --- Missed a commit that my original revision depended on. I initially submitted that previous commit to https://qa.guix.gnu.org/issue/70830, but since both commits change the same guix.texi section on similar subject matter, I'm resubmitting as a series. doc/guix.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) base-commit: 7b7f299bb493e485c5534b8c554e51d4f3a8c026 diff --git a/doc/guix.texi b/doc/guix.texi index 1c1e0164e7..221db5c022 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12154,6 +12154,18 @@ G-Expressions absolute file name and @var{stat} is the result of @code{lstat}; exclude entries for which @var{select?} does not return true. +@var{file} can be wrapped in the @code{assume-valid-file-name} syntactic +keyword. When this is done, there will not be a warning when +@code{local-file} is used with a non-literal path. The path is still +looked up relative to the current working directory at run time. +Wrapping is done like this: + +@lisp +(define alice-key-file-path "alice.pub") +;; ... +(local-file (assume-valid-file-name alice-key-file-path)) +@end lisp + This is the declarative counterpart of the @code{interned-file} monadic procedure (@pxref{The Store Monad, @code{interned-file}}). @end deffn