From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 20 16:55:33 2023 Received: (at submit) by debbugs.gnu.org; 20 Jul 2023 20:55:33 +0000 Received: from localhost ([127.0.0.1]:60082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMagP-0000xt-Co for submit@debbugs.gnu.org; Thu, 20 Jul 2023 16:55:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMagN-0000xf-5p for submit@debbugs.gnu.org; Thu, 20 Jul 2023 16:55:32 -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 1qMagD-0002Fr-OG for bug-guix@gnu.org; Thu, 20 Jul 2023 16:55:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMagD-0003Ad-1E for bug-guix@gnu.org; Thu, 20 Jul 2023 16:55:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=mETDBTCDIgQ1syBWnRQwGRX/K8hOlRrShM5zG6KjTkA=; b=sbtRRQwXc21R13 1kVqwisT1K3xizG9qqwCWzqrdOBV0zQX5Mzkrjtn0N7IgzQq6O1gFuTREle7YofTJ8cUQkm8yOtLZ j288c0zaPAXoJ/Te56vCYI7jP6z+jpAE1QN/ErUgK3U1XzUYL4O+cpeIQjakECMbCcdsLiNaYrTTE 44MdONI0z/Bf1+LK3uD5Wb3FU0EErqaCpP028+ZPLa2VEzR1ykPuDPzHPaNqGs8IFyhKIvU+/RD2I X8hiuUAz0T4G1oqlSOFKUwewqaHLe+fpwBv6NDoJgZ70zEYoiIWSIVDfXZMwCfTTsyTwtVyePbReh 5gYofj5Pwou9Q71sohGw==; Received: from [78.199.208.147] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMag5-0007kg-79 for bug-guix@gnu.org; Thu, 20 Jul 2023 16:55:19 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-guix@gnu.org Subject: =?utf-8?Q?=E2=80=98generate-documentation=E2=80=99?= shows evaluated default values Date: Thu, 20 Jul 2023 12:58:12 +0200 Message-ID: <875y6eetob.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 2 Thermidor an 231 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du Bouillon-blanc X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The ‘generate-documentation’ procedure of (gnu services configuration) shows evaluated default values, as in this example: --88--- scheme@(gnu services admin)> (define serialize-string identity) scheme@(gnu services admin)> (define-configuration foo (f (string (ver [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) The =E2=80=98generate-documentation=E2=80=99 procedure of (gnu services con= figuration) 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 =3D #< f: "3.0.99-git" %location: #f> scheme@(gnu services admin)> (display (generate-documentation `((foo ,foo-f= ields)) '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 =E2=80=98version=E2=80=99 call is expanded. This is problematic because sometimes we explicitly want to have default values like =E2=80=98%default-xyz=E2=80=99 or =E2=80=98(expt 2 10)=E2=80=99= , and this is what we want to appear in the manual, not their evaluation result. Ludo=E2=80=99.