From patchwork Wed May 8 12:17:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sent X-Patchwork-Id: 27185 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 C7F6227BBE2; Wed, 8 May 2024 13:20:12 +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 97B7F27BBE9 for ; Wed, 8 May 2024 13:20:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4gH6-0003Sy-34; Wed, 08 May 2024 08:19:58 -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 1s4gGo-0003Ru-76 for guix-patches@gnu.org; Wed, 08 May 2024 08:19:38 -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 1s4gGn-0006id-G7; Wed, 08 May 2024 08:19:37 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4gHC-0002pi-Hd; Wed, 08 May 2024 08:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70830] [PATCH] doc: Document assume-valid-file-name in local-file 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 12:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70830 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70830@debbugs.gnu.org Cc: Richard Sent , Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by submit@debbugs.gnu.org id=B.171517077610871 (code B ref -1); Wed, 08 May 2024 12:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 May 2024 12:19:36 +0000 Received: from localhost ([127.0.0.1]:48595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4gGm-0002pH-86 for submit@debbugs.gnu.org; Wed, 08 May 2024 08:19:36 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4gGj-0002pB-Ur for submit@debbugs.gnu.org; Wed, 08 May 2024 08:19:34 -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 1s4gGE-0003GY-IW for guix-patches@gnu.org; Wed, 08 May 2024 08:19:02 -0400 Received: from mail-108-mta151.mxroute.com ([136.175.108.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4gGB-0006bI-Gk for guix-patches@gnu.org; Wed, 08 May 2024 08:19:02 -0400 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta151.mxroute.com (ZoneMTA) with ESMTPSA id 18f582473120008ca2.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 08 May 2024 12:18:54 +0000 X-Zone-Loop: fc493972ed88e22053073d83ee931439a1395d9bf978 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=R6M4tOOKT77eI9G8RTf+631Jy8ww9kLSosjGWCySFYo=; b=rV8VjMm6FNr8XR6HDY6qCCpeTv pex3OGKQ8bTGNI8fzTZqkr/WITPZKVPpOK0zd9YSlMJ9J+3/Uv53xnn6Wcr5b7R8n9mPvhFWiuSpL Wzs21JgQCvcG/o1o/Xe2SUxBFn8y2mXESeKCXxrsY+njLHVamL9qg7o0zof+uP+JJcQpwNvVlFa2s 4ss3bZyGjOueafvZgXxl7gj+i7eqJ57sSyuulaPVwsdlYFrO24hqX60RLZk/ZroPqBrQD9bjUEufL aWWAoE0Gzom2WcHujK3lcX2+hPtCgOlf1I7XaI/9e6GcCXlStINeSzTonLIvNevq34nvtzEoinNyf dF0S17+g==; From: Richard Sent Date: Wed, 8 May 2024 08:17:51 -0400 Message-ID: <9832f834c7b20b664554f4cc8090f0bf1f0a96ae.1715170671.git.richard@freakingpenguin.com> MIME-Version: 1.0 X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.151; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta151.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-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. --- Hi Guix! I found it odd that assume-valid-file-name isn't documented in the manual. Well, now it is! doc/guix.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) base-commit: da41a8f5e85774e2a507d821b5d52e600fb9d1d7 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