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 uE+rLpnRZGNfEwEAbAwnHQ (envelope-from ) for ; Fri, 04 Nov 2022 09:47:21 +0100 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 4MW4LZnRZGPlfAAAG6o9tA (envelope-from ) for ; Fri, 04 Nov 2022 09:47:21 +0100 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 83A511C3B6 for ; Fri, 4 Nov 2022 09:47:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqsLw-0000iC-AI; Fri, 04 Nov 2022 04:47:04 -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 1oqsLu-0000hJ-AB for guix-patches@gnu.org; Fri, 04 Nov 2022 04:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqsLu-0005KR-2M for guix-patches@gnu.org; Fri, 04 Nov 2022 04:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqsLt-0002Wz-Li for guix-patches@gnu.org; Fri, 04 Nov 2022 04:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration. Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Nov 2022 08:47:01 +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: Liliana Marie Prikler Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 57963@debbugs.gnu.org, Andrew Tropin Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.16675516189720 (code B ref 57963); Fri, 04 Nov 2022 08:47:01 +0000 Received: (at 57963) by debbugs.gnu.org; 4 Nov 2022 08:46:58 +0000 Received: from localhost ([127.0.0.1]:51601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqsLq-0002Wi-Ao for submit@debbugs.gnu.org; Fri, 04 Nov 2022 04:46:58 -0400 Received: from mail-pf1-f180.google.com ([209.85.210.180]:40612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqsLm-0002WQ-1y for 57963@debbugs.gnu.org; Fri, 04 Nov 2022 04:46:56 -0400 Received: by mail-pf1-f180.google.com with SMTP id y13so3934257pfp.7 for <57963@debbugs.gnu.org>; Fri, 04 Nov 2022 01:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=FTA1/BgJwInT8glCqGb/R635T2CIa6sjvn7zUfO4D3M=; b=uOSz+NViJNqOXTAGolZZ+KOT/oMiAp9+k6FjFHGT6l1j1ZUZSXlrRXnrwLao2+VYHB 0xKIXlsn+MSMWsIlKLivcDp62V74e1ZcGFVS/7T09rhbkWBxLwf++anvf4rXHJwnyB3L sDWJQkG9crfmq1J/Ih1iweoV6EAGIv9Yqk+3nDBUYGyROimMxAP+xzpP6GVepTBye48j 2WRACcSU7w6+EzEoBjwgyYCpfuj0XGcabgcrNpATsFe9m8XQQ7kDj6ecoGGh/Sba6Dhx vRI61X7T9Sehc7l9Xkk5beRNEeUbJCp1ZPPyMmjParA7bb4ItXE3mt32speoeZdp2eHF 54DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=FTA1/BgJwInT8glCqGb/R635T2CIa6sjvn7zUfO4D3M=; b=iAdiIx4x4FN9g5nCx1G2Bf8mKAdFqgFjlrNSN1t5Y8SLT4S6WnmCXIRxn4TG9PHBgo UVqpdMynDa0PceJJAPm7xVmPCJba8wwlO5ncZ/y0zY9Osjl3Oj8vOKGkqyZDXGBvUcnv n/K/Gr8xxwxzJ/D1nb6C+Dq1OGLg7iWqfU0lbXpkjGThe1zFFcWWUowl7Qj5PTPWdp20 GosQBOnQxh5X2Kq2hfy4S/cikqYpA4lemsiYPRjW719ehQZ8vHN8/vkiHqHPJoIitThx GE8z5vJBkJpWf4kl5g5O5SQUigressSih+3weZDiqQl9yUGC+7+P40ue1odpZSErdlEp zF8A== X-Gm-Message-State: ACrzQf2XOP2OnYbuYBl7Zea5D4l0BphS5FI2iR3i7PrkTcMIuq2ECCMU 76gVOogR8rFZYViNM9PluJyF2vzslqRQb2NQ X-Google-Smtp-Source: AMsMyM5MYOcfQ+uzIMD6Nw9bsF0duOSn6hFEZEPyNuvgRKI4rSZl4MV5y6ZhWr6rgt3aLDeQYYMr9g== X-Received: by 2002:a05:6a00:848:b0:56e:4e85:33fc with SMTP id q8-20020a056a00084800b0056e4e8533fcmr6998386pfk.40.1667551607563; Fri, 04 Nov 2022 01:46:47 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id q8-20020a170902dac800b00186b3528a06sm2129869plx.41.2022.11.04.01.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 01:46:46 -0700 (PDT) From: Taiju HIGASHI References: <87k053sxur.fsf@gnu.org> <87zgdzat99.fsf@trop.in> <87zgdxgx0l.fsf@taiju.info> <875ygiqur9.fsf@gnu.org> <87r0z5e23k.fsf@taiju.info> <87czanebhd.fsf@taiju.info> <871qqtapbo.fsf@taiju.info> <20a8312539654df3c98954620979078e3e41a150.camel@gmail.com> <87r0yt96iy.fsf@taiju.info> <87y1sugmh2.fsf@taiju.info> <0b28bb01db01fafe30acb45f4b12e259b79121a6.camel@gmail.com> Date: Fri, 04 Nov 2022 17:46:43 +0900 In-Reply-To: <0b28bb01db01fafe30acb45f4b12e259b79121a6.camel@gmail.com> (Liliana Marie Prikler's message of "Wed, 02 Nov 2022 07:45:34 +0100") Message-ID: <87leorqf7w.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 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: , Sender: "Guix-patches" Errors-To: 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=1667551641; 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=FTA1/BgJwInT8glCqGb/R635T2CIa6sjvn7zUfO4D3M=; b=DgW3TP15dgQ69+Wb9dJkQfMFOLeSC/66z6/DMc663vl7AkpdKRv5slq5mvpxMcp0fy8Q6L xEbKFCOhGstX0XPE9JROyQOm5irWyARxZTYJsghd6Z/iafrEsl+ozTzl52TjPX0O9M2kkN bDKyAbm7xTIr8VsyOW5Eff6gnnyEpgn54OOu/DP3BhhestaS4ORd3guV50RIA1ky3ocxbG ThPaQIOgbYT9GHefKn4hvyHNNmOo/l08sGKxE9eXyLusLLxbDBKzBthipl2rVlOddv5d1F FxMQlqS3Ij2V/xPSGEVcVOzP+GfsF47R3fA3MRykZjcbmGLLXk4cpaLXx8xBig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667551641; a=rsa-sha256; cv=none; b=IBW9sJFrS1j/8I4nwhP6Mrr9pQSi+sRKj9otwIN+28u6cfsJl+SlM1zDaGO7+HKc1Taayb u2DuQqd8hrmiuWYWya1nDSfuAXGW18k3cnbBBtcvSJ+4hF0DmZEDGZJal8qJaPbEWEeRG2 0++7qF8E1VrpSiBbHxhD/+0X6/64t/fESvV4HL7Wy3iN6+rwqMknbvFQa8JIQWi0GQmfNz P+YKYxk8GqhKmDE9s33+RDyT73Hg55HpMq9+oUj1jdyHsqyJbSlZlrZA2GM73EvbxtWxV3 LLIr1Kh6quFQXMBzDHXgAs7cAphKd2Y21eLvvqwaKfdwZM+WnL2orcsZ9XNEBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=uOSz+NVi; dmarc=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: 2.00 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=uOSz+NVi; dmarc=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: 83A511C3B6 X-Spam-Score: 2.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3ARyrCHmz+rv Liliana Marie Prikler writes: > Am Mittwoch, dem 02.11.2022 um 10:43 +0900 schrieb Taiju HIGASHI: >> Hi, >> >> Liliana Marie Prikler writes: >> >> > Am Donnerstag, dem 27.10.2022 um 14:31 +0900 schrieb Taiju HIGASHI: >> > > Liliana Marie Prikler writes: >> > > >> > > > Am Donnerstag, dem 27.10.2022 um 13:00 +0900 schrieb Taiju >> > > > HIGASHI: >> > > > > Sorry for the long time it has taken to resolve the issue. >> > > > > What do you think about it? >> > > > Putting the discussion with Declan aside, the last thing >> > > > mentioned >> > > > was >> > > > not trying to mix SXML and XML-in-strings.=A0 Ludo offered the >> > > > solutions: >> > > > 1. Taking a or a file-like object >> > > > 2. (Optionally) using a gexp-compiler for the former >> > > > >> > > > Cheers >> > > >> > > Sorry for the lack of clarity. >> > > I had sent you a past email confirming that the direction of the >> > > implementation was correct and was waiting for your response. >> > > >> > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D57963#239 >> > Ahh, I missed that.=A0 If you pull in the XML declarations and the >> > stuff to the serialization, you should >> > basically have most of what you'd need for a G-Exp compiler, but >> > even >> > if not it'd simplify this to >> > >> > (match >> > =A0 ((? home-font-config-configuration? config) >> > =A0=A0 (serialize-... config ...)) >> > =A0 ((? file-like? config) config)) >> > >> > Not sure if a match for type-checking would be needed since it's >> > already taken care of elsewhere, so writing it just in case. >> > >> > Cheers >> >> Sorry for my response delay. >> Is my recognition correct?=A0 I have plan to rewrite it as below. >> >> --8<---------------cut here---------------start------------->8--- >> (define (serialize-fontconfig-configuration config) >> =A0 (define start-of-fontconfig " >> >> ") >> >> =A0 (define end-of-fontconfig "\n") >> >> =A0 (mixed-text-file >> =A0=A0 "fonts.conf" >> =A0=A0 start-of-fontconfig >> =A0=A0 (serialize-configuration config home-fontconfig-configuration- >> fields) >> =A0=A0 end-of-fontconfig)) >> >> (define (add-fontconfig-config-file user-config) >> =A0 `(("fontconfig/fonts.conf" >> =A0=A0=A0=A0 ,(match user-config >> =A0=A0=A0=A0=A0=A0=A0=A0=A0 ((? home-fontconfig-configuration? user-conf= ig) >> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (serialize-fontconfig-configuration user-= config)) >> =A0=A0=A0=A0=A0=A0=A0 ((? file-like? user-config) user-config))))) >> --8<---------------cut here---------------end--------------->8--- > More or less. For one, I don't think start-of-fontconfig and end-of- > fontconfig need to be declared. The (serialize-configuration ) call is > a little opaque atm, but let's suppose it returns properly formatted > XML. Finally, as hinted already and since you're returning a file-like > object anyway, you may want to make this serializer a gexp-compiler > instead. > > Cheers Sorry. I did not understand what you meant by making it a gexp-compiler instead. Is there anything reference documents or codes? I believe it was presented to me in advance as an optional proposal, but I do not know what it means and have not been able to respond. Thanks, --=20 Taiju