[PATCH] doc: Document assume-valid-file-name in local-file

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Richard Sent
Owner
unassigned
Submitted by
Richard Sent
Severity
normal
R
R
Richard Sent wrote on 8 May 14:17 +0200
(address . guix-patches@gnu.org)(name . Richard Sent)(address . richard@freakingpenguin.com)
9832f834c7b20b664554f4cc8090f0bf1f0a96ae.1715170671.git.richard@freakingpenguin.com
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(+)

Toggle diff (27 lines)
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

base-commit: da41a8f5e85774e2a507d821b5d52e600fb9d1d7
--
2.41.0
R
R
Richard Sent wrote on 8 May 20:27 +0200
Resending as a series
(address . 70830@debbugs.gnu.org)
87y18kcg6u.fsf@freakingpenguin.com
I submitted another patch (https://qa.guix.gnu.org/issue/70829)which
accidentally depends on this one. I'll resubmit to that issue as a
series since the documentation changes are tied together a bit anyway.

--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
R
R
Richard Sent wrote on 8 May 20:29 +0200
control message for bug #70830
(address . control@debbugs.gnu.org)
87wmo4cg3b.fsf@freakingpenguin.com
close 70830
quit
L
L
Ludovic Courtès wrote on 25 May 16:19 +0200
Re: [bug#70830] [PATCH] doc: Document assume-valid-file-name in local-file
(name . Richard Sent)(address . richard@freakingpenguin.com)
871q5q0yax.fsf@gnu.org
Hi,

Richard Sent <richard@freakingpenguin.com> skribis:

Toggle quote (3 lines)
> doc/guix.texi (G-Expressions): Document the use of assume-valid-file-name with
> local-file.

Applied, thanks!

Ludo’.
Closed
R
R
Richard Sent wrote on 25 May 16:24 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)
87zfsermu5.fsf@freakingpenguin.com
Hi Ludo!

Toggle quote (5 lines)
>> I submitted another patch (https://qa.guix.gnu.org/issue/70829)which
>> accidentally depends on this one. I'll resubmit to that issue as a
>> series since the documentation changes are tied together a bit
>> anyway.

Will applying this patch mess up 70829? My intent was to close 70830 and
combine it with 70829, although if the other changes in 70829 aren't
deemed suitable for a merge then there's no need to worry.

Thanks!

--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 70830@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70830
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch