From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yEJJJP63OGOrAAEAbAwnHQ (envelope-from ) for ; Sat, 01 Oct 2022 23:58:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8BFdI/63OGOszwAAG6o9tA (envelope-from ) for ; Sat, 01 Oct 2022 23:58:22 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5F4772F7BF for ; Sat, 1 Oct 2022 23:58:22 +0200 (CEST) Received: from localhost ([::1]:59068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oekV3-0002O4-3c for larch@yhetil.org; Sat, 01 Oct 2022 17:58:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oekUl-0002Ns-Nk for guix-patches@gnu.org; Sat, 01 Oct 2022 17:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oekUk-0008UF-Ow for guix-patches@gnu.org; Sat, 01 Oct 2022 17:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oekUk-0003VF-G5 for guix-patches@gnu.org; Sat, 01 Oct 2022 17:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v4 2/2] home: fontutils: Support user's fontconfig. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Oct 2022 21:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57963 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Taiju HIGASHI Cc: 57963@debbugs.gnu.org, liliana.prikler@gmail.com, andrew@trop.in Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.166466144913426 (code B ref 57963); Sat, 01 Oct 2022 21:58:02 +0000 Received: (at 57963) by debbugs.gnu.org; 1 Oct 2022 21:57:29 +0000 Received: from localhost ([127.0.0.1]:45795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oekUD-0003UU-3w for submit@debbugs.gnu.org; Sat, 01 Oct 2022 17:57:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oekUB-0003UH-5x for 57963@debbugs.gnu.org; Sat, 01 Oct 2022 17:57:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oekU4-0008SV-QD; Sat, 01 Oct 2022 17:57: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:In-Reply-To:Date:References:Subject:To: From; bh=MG5vdF6tT2riVzNvpJ15Wd3EvTzc6Ef3e9y86B8zm+I=; b=P9Ml4h9Yvg2u+cCkw60r Jthe8mTNpJws/nx9pje2AkjTjdVQGu0y8OvA0fHFs1iolk+ovUiU/kjLP282KBWSDVroksjOlVAJf 8QCKZImesyxhoJ+LgxKHMCAnUMEBpGwUs8JEWq+wsCJ8utuQ4dv5ZZk3tnoTQTlx5VERlBR1AwT3O zMWi2sUHmzBgTyIvVwUSESTIGUls8YyA8qP2mdAb1j4svrwM4XkEddfDeE+d3Lv898j1DCNbZNCTx h9hM2trzMAl5BkZATwP9xS2f+XYeAIKxxBka1d8VFZcytRvp7plsmuG8xsEUKKHEv4K+woNhyMAmq ms+RY9I7vZ7pWw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60796 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oekU4-0003sR-Bz; Sat, 01 Oct 2022 17:57:20 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220929143633.28844-1-higashi@taiju.info> <20220929143633.28844-2-higashi@taiju.info> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?UTF-8?Q?D=C3=A9cadi?= 10 =?UTF-8?Q?Vend=C3=A9miaire?= an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour de la Cuve 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 Date: Sat, 01 Oct 2022 23:57:18 +0200 In-Reply-To: <20220929143633.28844-2-higashi@taiju.info> (Taiju HIGASHI's message of "Thu, 29 Sep 2022 23:36:33 +0900") Message-ID: <87ill3b41t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664661502; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MG5vdF6tT2riVzNvpJ15Wd3EvTzc6Ef3e9y86B8zm+I=; b=RP6efKH2Lupn/dZ4TirGaOi4DAzQG8JR+vrPcOQprD2s/pNpL+0TOBgjbHUVkyZXSNLZoX /G3Hv6iClPk1iA18RWgjIw+FizReRRrdBIPbft+B7foXPd8wvPtwe7RY3+1C7CRNBpr3m0 8w68yQZM6vAggRu/5Fw9Dxc38gpegDft2N9dNGfKRNoR7iZ3XZznCz2rhmLwU19tEq6MC3 D8Uz+EPkN2ptOCReP8kRRrDNoIRHd/Hkop1k/ITLDMozJe3ioapKY/VQwSK5p2+GjAcAz6 SJo0iIHbZOXgJAU7uMdM920kuTPMTwk+6py6xAH6fIyTWKhi8Wz3OTXy05g40Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664661502; a=rsa-sha256; cv=none; b=lnIXlJ0Z7pjGpBAlqzn6IRt/jR0Sn9KxPLdaTyZ/ROddNpbf8jnyIAb1VPvtvZyXgy5Z6L WfiMQ/GANEX47Tl3dyIUoHjn0kXiapeO0dZqPMtf8p1PL3ajp6p4plXo9DU3RszPaJDiJE Qni0a1WNt26Y3QpTgU6XpYg8j8v1xYWToPcV+3G4GuUF0SChbyb20YNMKYeQ9HlDBqZHmQ pb0dIvFvwRMuN6uSA1PbhAu1SqOthFWbOOs3EMwnKBoHmRi4F+ULUWq+9iLgrX1M9v6B/J GQLjDv0hvV4sN4UbGFCCnQiiveOs0UUQ28eOq9UqzFcvPMGKvo9ePlEL5Y3I3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=P9Ml4h9Y; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.84 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=P9Ml4h9Y; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5F4772F7BF X-Spam-Score: -1.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: T8srAlE+IfCg Taiju HIGASHI skribis: > * gnu/home/services/fontutils.scm: Support user's fontconfig. I=E2=80=99m nitpicking a bit, but here we would describe all the variables/procedures added, removed, or modified. Please check =E2=80=98git log=E2=80=99 for examples. Regarding code, there=E2=80=99s a convention to add a docstring to each top-level procedure: https://guix.gnu.org/manual/devel/en/html_node/Formatting-Code.html It would be nice to follow it here. > +(define (default-font-sanitizer type) > + (lambda (value) > + (if (null? value) > + value > + `(alias > + (family ,type) > + (prefer > + (family ,value)))))) Giving '() special meaning here looks quite unusual. As Liliana wrote, we=E2=80=99d usually use #f as the value denoting =E2=80=9Cnothing=E2=80=9D. > +(define (sxml->xmlstring sxml) > + (if (null? sxml) > + "" > + (call-with-output-string > + (lambda (port) > + (sxml->xml sxml port))))) Same here. Also, =E2=80=9Cxml-string=E2=80=9D rather than =E2=80=9Cxmlstri= ng=E2=80=9D. > +(define font-directories? list?) Is it really needed? > +(define (serialize-font-directories field-name value) > + (sxml->xmlstring > + (append > + '((dir "~/.guix-home/profile/share/fonts")) > + (map > + (lambda (path) > + `(dir ,path)) > + value)))) The indentation would rather be: (append '((dir =E2=80=A6)) (map (lambda (directory) `(dir ,directory)) value)) > + (map (match-lambda > + ((? pair? sxml) sxml) > + ((? string? xml) (xml->sxml xml)) > + (_ (error "extra-config value must be xml string or sxml list.= "))) Instead of =E2=80=98error=E2=80=99, which would lead to an ugly backtrace a= nd an untranslated error message, write: (raise (formatted-message (G_ "'extra-config' =E2=80=A6"))) without a trailing dot in the message. The rest LGTM! Like I wrote, could you please add documentation in =E2=80=98doc/guix.texi=E2=80=99, with a configuration example like the one = you gave? Thanks for all the work! Ludo=E2=80=99.