From: "Ludovic Courtès" <ludo@gnu.org>
To: 64754@debbugs.gnu.org
Subject: bug#64754: ‘generate-documentation’ shows evaluated default values
Date: Thu, 20 Jul 2023 12:58:12 +0200 [thread overview]
Message-ID: <875y6eetob.fsf@inria.fr> (raw)
The ‘generate-documentation’ procedure of (gnu services configuration)
shows evaluated default values, as in this example:
--8<---------------cut here---------------start------------->8---
scheme@(gnu services admin)> (define serialize-string identity)
scheme@(gnu services admin)> (define-configuration foo
(f (string (version)) "The version string."))
scheme@(gnu services admin)> (foo)
$44 = #<<foo> f: "3.0.99-git" %location: #f>
scheme@(gnu services admin)> (display (generate-documentation `((foo ,foo-fields)) 'foo))
@c %start of fragment
@deftp {Data Type} foo
Available @code{foo} fields are:
@table @asis
@item @code{f} (default: @code{"3.0.99-git"}) (type: string)
The version string.
@end table
@end deftp
@c %end of fragment
--8<---------------cut here---------------end--------------->8---
Notice that the ‘version’ call is expanded.
This is problematic because sometimes we explicitly want to have default
values like ‘%default-xyz’ or ‘(expt 2 10)’, and this is what we want
to appear in the manual, not their evaluation result.
Ludo’.
reply other threads:[~2023-07-20 20:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875y6eetob.fsf@inria.fr \
--to=ludo@gnu.org \
--cc=64754@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).