From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
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 kNtoHPpARmMzjAAAbAwnHQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 12 Oct 2022 06:22:18 +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 YAqnG/pARmOlTgAAG6o9tA
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 12 Oct 2022 06:22:18 +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 D5BFEDBB9
	for <larch@yhetil.org>; Wed, 12 Oct 2022 06:22:17 +0200 (CEST)
Received: from localhost ([::1]:35638 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	id 1oiTG5-0002te-0H
	for larch@yhetil.org; Wed, 12 Oct 2022 00:22:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46846)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1oiTFq-0002tU-O1
 for guix-patches@gnu.org; Wed, 12 Oct 2022 00:22:02 -0400
Received: from debbugs.gnu.org ([209.51.188.43]:56239)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1oiTFq-0001jE-Ct
 for guix-patches@gnu.org; Wed, 12 Oct 2022 00:22:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oiTFq-0001ch-4q
 for guix-patches@gnu.org; Wed, 12 Oct 2022 00:22:02 -0400
X-Loop: help-debbugs@gnu.org
Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig
 configuration.
Resent-From: Liliana Marie Prikler <liliana.prikler@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Wed, 12 Oct 2022 04:22:02 +0000
Resent-Message-ID: <handler.57963.B57963.16655484796181@debbugs.gnu.org>
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 <higashi@taiju.info>
Cc: ludo@gnu.org, 57963@debbugs.gnu.org, Andrew Tropin <andrew@trop.in>
Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.16655484796181
 (code B ref 57963); Wed, 12 Oct 2022 04:22:02 +0000
Received: (at 57963) by debbugs.gnu.org; 12 Oct 2022 04:21:19 +0000
Received: from localhost ([127.0.0.1]:55317 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1oiTF8-0001bd-JQ
 for submit@debbugs.gnu.org; Wed, 12 Oct 2022 00:21:19 -0400
Received: from mail-ej1-f68.google.com ([209.85.218.68]:43697)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@gmail.com>) id 1oiTF5-0001bC-Gj
 for 57963@debbugs.gnu.org; Wed, 12 Oct 2022 00:21:16 -0400
Received: by mail-ej1-f68.google.com with SMTP id d26so28370858eje.10
 for <57963@debbugs.gnu.org>; Tue, 11 Oct 2022 21:21:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 
 h=mime-version:user-agent:content-transfer-encoding:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject
 :date:message-id:reply-to;
 bh=Ddv8Wgp/ImDFeGgbLs5XLlbIG68BMh6jxdNjeUY0IYA=;
 b=dayf2nkQKhuD5etr/CK1cckcO0CQX2JyAZx9/SCEl8+fefM3zb7nxCXl+MOYey59bw
 ugeT77K1JrpI7y9Dm9rJw8zORpKN9Ml10BY6vLol8K3VDtQxAq9H4UotE57DsXJEArdl
 znuLYVRpm4PobTdWJ4VyxQSPpjCVwhc8g/4/KKWRqvtMNFmXuI4AAiioLqLxUDwOlTt7
 doK/IcobMfskAdLDa9SmLYgdA31mPIUjUVyKnKVTO0hEKAQJhDOen7+a8bkrBmHovrcD
 TZ3IrmnIAPcyXhVtQxjlu/jfVDXF0GTBCxAoyCO18CqUr3G7IGX3q9rYqK4m1fPjtI6v
 6zHA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:content-transfer-encoding:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=Ddv8Wgp/ImDFeGgbLs5XLlbIG68BMh6jxdNjeUY0IYA=;
 b=quDq7eTMyROYW+DWK9POu/iz3Y8ir/jFKLZPfoP9nREZ60mAjGhBClDDzJNlDVG+/D
 vaR+8eKneVkhOMR6bQDIdnYdQKWdGl1BY2rn05xmvXL/1BaMlpv2nWHQYx4gDq8JWfmh
 r2+De9RTm5XU6fRrQ+pmtYQbgRJ0BVhGmte3jDN+i1jSL5FKHo7jBJK1F/bpqtW3t9OZ
 M8rV7K0zSZUM5U3dBkKCej/w2rUB9oWA96KJErZEYXro5AYG9DkceJ7Zx2tzwPmJ344M
 wWxEpxH2tWajY2fUGAARM9wyCCIu+h56FLdkjRzd0LwgVtLhPdwEZzXv3yDOuj6Gvnxt
 LOOw==
X-Gm-Message-State: ACrzQf3z0a6eQdOhIm4LPfMZjPpYCx5AOXb9IyJILPYJmjyQC+3hJe6i
 dhBUEp0rKS8QJbXMNY1Qs9I=
X-Google-Smtp-Source: AMsMyM5WMx8hNEdBcLPFwSKlezajV0sJFrXcjKbLlQL/JwVny7L8+VQebOu9hfLe/WnDM1gXXJzFLg==
X-Received: by 2002:a17:907:1b1e:b0:783:8e33:2d1c with SMTP id
 mp30-20020a1709071b1e00b007838e332d1cmr21013446ejc.304.1665548468435; 
 Tue, 11 Oct 2022 21:21:08 -0700 (PDT)
Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 c12-20020aa7c98c000000b0045754cd5e08sm10381840edt.39.2022.10.11.21.21.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 11 Oct 2022 21:21:07 -0700 (PDT)
Message-ID: <0ead19bea58a05eccfe71d2d7035419bed33cf51.camel@gmail.com>
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
Date: Wed, 12 Oct 2022 06:21:06 +0200
In-Reply-To: <875ygpk7zt.fsf@taiju.info>
References: <20221002131535.9972-1-higashi@taiju.info>
 <20221002131535.9972-2-higashi@taiju.info> <87zge4chb5.fsf@trop.in>
 <87edvfkob8.fsf@taiju.info>
 <7a7ba84518d2f6afa387e1e2649bc249acd74750.camel@gmail.com>
 <87pmeykchl.fsf@taiju.info>
 <796ace856ca7ccb44fda2b15f8f7abc6990e53e0.camel@gmail.com>
 <875ygpk7zt.fsf@taiju.info>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.46.0 
MIME-Version: 1.0
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: guix-patches@gnu.org
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org
Sender: "Guix-patches" <guix-patches-bounces+larch=yhetil.org@gnu.org>
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=1665548538;
	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=Ddv8Wgp/ImDFeGgbLs5XLlbIG68BMh6jxdNjeUY0IYA=;
	b=AVinV0PWv1ymhK2+EdrdKiML7TEATg92tuuFGfeGW71HaT+mVCJiDm1B5OGLzrr0YygcNj
	oC7OjIUpwcPr+3fz7zgIEQ1boynyvwbDOxlPTkp2irnMTtJa/WjmwCY4m1zvwHLKM9fqb0
	rn1eRrYpVvLAbkePbMCPZ3wlF6xHWUbEHvUXoAn5DGk1mR4px3UrgX+hocXKd8dO+xOaMi
	aWopwixro+BSmT3Q22QOsEUFNMMagOMJrYujUt3963RBJVyftfbF8XqkTbusDATe+6Betn
	20dW8t0SsyA6MCPaLKxjoqX3vOSpx4Z7k9+BObTqyHq20qQMV9iOaM2T64/9VA==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665548538; a=rsa-sha256; cv=none;
	b=KSeI09XfjMDOHChVhuz+IfHUXae/hNS48I4nqO/cnT+tJ7dh2Ypxc0nLE8vo+ylhtmxT34
	u/TukveEFXn8ZdPsQw2ELFqBS/HqsbGYYUBoQN0NdipMW1QAYwCs+OFs9eXFisn/OX+IxR
	lIm7B7WXKcKmtSwb+AJqeaBLXKuKs8spkwhg9yCxEZEu8gYz+XC21XYa3T5R/ViSOur4+U
	WAvZwPenZ+CxuWpCitHTZyOQpj0ewArYvTdPRO+KWW556hwiPpf8X1McHLyK7RN1erzivy
	hND01SFOCa1BUhBGM7RsaW5sWEttghGKN5wXlvbTYE0+klVMQ9/KDCE/LddL3A==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dayf2nkQ;
	dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none);
	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: 6.10
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dayf2nkQ;
	dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none);
	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: D5BFEDBB9
X-Spam-Score: 6.10
X-Migadu-Scanner: scn1.migadu.com
X-TUID: T9epbsolYHq7

Am Mittwoch, dem 12.10.2022 um 12:59 +0900 schrieb Taiju HIGASHI:
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>=20
> > Am Dienstag, dem 11.10.2022 um 17:09 +0900 schrieb Taiju HIGASHI:
> > > Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> > >=20
> > > > Am Dienstag, dem 11.10.2022 um 12:54 +0900 schrieb Taiju
> > > > HIGASHI:
> > > > > We can specify invalid value such as (list "foo" '(foo bar)
> > > > > 123).
> > > > It will be sanitized before that.
> > >=20
> > > I'm sorry, I may not be getting it.
> > >=20
> > > When I reconfigure with the following settings:
> > >=20
> > > --8<---------------cut here---------------start------------->8---
> > > (home-environment
> > > =C2=A0(packages (list font-google-noto))
> > > =C2=A0(services
> > > =C2=A0 (append
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (service home-bash-service-type)=
)
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (modify-services %home-base-services
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (home-fontconfig-service-t=
ype
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 config =3D> (home-fo=
ntconfig-configuration
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (extra-config
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list "<dir>foo</dir>" =
123))))))))
> > > --8<---------------cut here---------------end--------------->8---
> > >=20
> > > The following error occurs.
> > >=20
> > > --8<---------------cut here---------------start------------->8---
> > > ./pre-inst-env guix home container home-fontconfig-config.scm
> > > Backtrace:
> > > In guix/monads.scm:
> > > =C2=A0=C2=A0=C2=A0 487:9 19 (_ _)
> > > In gnu/services.scm:
> > > =C2=A0 1137:16 18 (_ _)
> > > In guix/monads.scm:
> > > =C2=A0=C2=A0=C2=A0 487:9 17 (_ _)
> > > In gnu/services.scm:
> > > =C2=A0 1140:36 16 (_ _)
> > > In srfi/srfi-1.scm:
> > > =C2=A0=C2=A0 586:17 15 (map1 (#<<service> type: #<service-type home-
> > > fontconfig
> > > 7f1926abf=E2=80=A6>))
> > > In ice-9/eval.scm:
> > > =C2=A0=C2=A0=C2=A0 155:9 14 (_ #(#(#<directory (gnu home services fon=
tutils)
> > > 7f1926df8780>) #))
> > > =C2=A0=C2=A0=C2=A0 159:9 13 (_ #(#(#<directory (gnu home services fon=
tutils)
> > > 7f1926df8780>) #))
> > > =C2=A0=C2=A0 173:55 12 (_ #(#(#<directory (gnu home services fontutil=
s)
> > > 7f1926df8780>) #))
> > > In gnu/services/configuration.scm:
> > > =C2=A0=C2=A0=C2=A0 124:8 11 (serialize-configuration _ _)
> > > In srfi/srfi-1.scm:
> > > =C2=A0=C2=A0 586:29 10 (map1 (#<<configuration-field> name: font-
> > > directories
> > > type: str=E2=80=A6> =E2=80=A6))
> > > =C2=A0=C2=A0 586:29=C2=A0 9 (map1 (#<<configuration-field> name: defa=
ult-font-
> > > serif-
> > > family =E2=80=A6> =E2=80=A6))
> > > =C2=A0=C2=A0 586:29=C2=A0 8 (map1 (#<<configuration-field> name: defa=
ult-font-
> > > sans-
> > > serif-fa=E2=80=A6> =E2=80=A6))
> > > =C2=A0=C2=A0 586:29=C2=A0 7 (map1 (#<<configuration-field> name: defa=
ult-font-
> > > monospace-fam=E2=80=A6> =E2=80=A6))
> > > =C2=A0=C2=A0 586:17=C2=A0 6 (map1 (#<<configuration-field> name: extr=
a-config
> > > type:
> > > maybe-ext=E2=80=A6>))
> > > In ice-9/eval.scm:
> > > =C2=A0=C2=A0=C2=A0 155:9=C2=A0 5 (_ #(#(#<directory (gnu home service=
s fontutils)
> > > 7f1926df8780>) # =E2=80=A6))
> > > In srfi/srfi-1.scm:
> > > =C2=A0=C2=A0 586:29=C2=A0 4 (map1 ("<dir>foo</dir>" 123))
> > > =C2=A0=C2=A0 586:17=C2=A0 3 (map1 (123))
> > > In unknown file:
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2 (raise=
 #<&formatted-message format: "'extra-config'
> > > type
> > > must be x=E2=80=A6>)
> > > In ice-9/boot-9.scm:
> > > =C2=A0 1685:16=C2=A0 1 (raise-exception _ #:continuable? _)
> > > =C2=A0 1685:16=C2=A0 0 (raise-exception _ #:continuable? _)
> > >=20
> > > ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> > > Wrong type (expecting exact integer): #<&formatted-message
> > > format:
> > > "'extra-config' type must be xml string or sxml list, was given:
> > > ~a\n" arguments: (("<dir>foo</dir>" 123))>
> > > --8<---------------cut here---------------end--------------->8---
> > >=20
> > > Is it sanitized before?
> > That error seems to be coming from your sanitizer if I read this
> > correctly.
>=20
> Yes, I think so.=C2=A0 So I do not know what he meant when he said "Other
> branches would never be visited."
>=20
> =C2=A0=C2=A0=C2=A0 Other branches would never be visited because it will =
fail
> earlier
> =C2=A0=C2=A0=C2=A0 by define-configuration predicate check for extra-conf=
ig-list?
> =C2=A0=C2=A0=C2=A0 (which is basically list?).
>=20
> I may have misunderstood the location of the code to which his
> comment refers.
I think this basically means that you can't have a raw string, but only
a list of strings, which conflicts with how you distinguish xml and
sxml?

> > > > > > Also, making multi-type fields is debatable, but isn't
> > > > > > great
> > > > > > IMO.
> > > > >=20
> > > > > I see. If we had to choose one or the other, I would prefer
> > > > > the
> > > > > string-type field.
> > > > Prefer sexp-type.
> > >=20
> > > I too would like to write my settings in S-expression, but for
> > > users
> > > who know the XML format of fontconfig but do not know how to use
> > > SXML, I believe the effort of converting XML to SXML in their
> > > head
> > > and writing it cannot be ignored.
> > > Still, users can write settings in SXML and convert them to
> > > strings. That is a choice the user prefers to make; someone who
> > > doesn't know SXML writing strings and converting them to SXML is
> > > not
> > > a choice the user prefers to make.
> > You can likewise convert xml->sxml explicitly, there's not really
> > any
> > difference here.=C2=A0 Providing this in a sanitizer just makes it more
> > user-friendly.
>=20
> I believe the v5 patch currently does that. Do you think a multi-type
> field is acceptable? Or do you think it is better to keep only the
> SXML-type field?
I think the field, once sanitized, should be SXML.  I care little about
what happens before.

Cheers