From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 02:45:45 2022 Received: (at 57963) by debbugs.gnu.org; 2 Nov 2022 06:45:45 +0000 Received: from localhost ([127.0.0.1]:44745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oq7VR-0008F4-9c for submit@debbugs.gnu.org; Wed, 02 Nov 2022 02:45:45 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:37733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oq7VQ-0008Es-FZ for 57963@debbugs.gnu.org; Wed, 02 Nov 2022 02:45:44 -0400 Received: by mail-ed1-f65.google.com with SMTP id l11so23769882edb.4 for <57963@debbugs.gnu.org>; Tue, 01 Nov 2022 23:45:44 -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=Ag4eIhWrJsefzjdkNRe61jHHucpuDwwrDs2th49naBk=; b=if5O9PEtYQ6r8YvPozSsd/54Yh3NX+QkprBwUW/iMXZs4SR6DsUyJl/XeDU9v8ixq4 gpetSdCXcz2fiRaFUbkbj1KS6IANA3COAfgiaFi1nq9BCS9jL2jdtL5GocT2+CntBoqV DIRQnOlFptKtuD5t/ZOoLlrSXxfMTMVImyC38aUrI+4ezgcebcNB0NEvb5URfnpuoUfN yaIgALvQxpCYen41YAAabYYmXIru8BSKUkBdwEk5zRLmEBpRXhYVg48qyPjXl7ouVrMG Faaj31Jci77Ohr2l+bBhxQ5hw4gygrrmNEk4ULZ1nvFMR26hQcobdfpkyjinfskFxkiM FFpA== 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=Ag4eIhWrJsefzjdkNRe61jHHucpuDwwrDs2th49naBk=; b=jZJH2Wm4/JWTeoz8Zr2yBL3Ttivje7ZrdjT7G2N7Dwkae+zmCiLJ6YT4NGNr+FGusG W6nSm3cc0dfTRDRBhbpP5ZP3XD0bJzPz3M0JjZWfLLm0oiTO8A05MIvAe5WtMLCZ7Jta uXWkRQpnK1583DX6Ekvafh23rxnHdYV7ZsGzxsLhknvUqPTMsV5axU38rvT+/UCOSFbY cHhQpVgvFYFQ11+g7oE0MY6IZoUDX7aHyWzz2vu05YU53A3ilSSpfz4/OhZobjys8xYj 02hcvWyCjK+sJGjem620nNlcienfGJBLkcdO3BNRMHYANFaAlol8xs9TRWOEndQzrSXW hciQ== X-Gm-Message-State: ACrzQf0Gia0bxAXhZsuifnC/3f6nvETh7nIB3rnbvBcYm0NCWRsLlLfs KjNbe/OOXm2CGMg5ydLvIoQ= X-Google-Smtp-Source: AMsMyM7ByJqVhMWTiVrrvmNeONPtBUZQBFhAUPlZ2hDKNFLAPn7lES18Ke4GilTPvS6F6oAAbjbcoA== X-Received: by 2002:a05:6402:386:b0:463:c43f:6628 with SMTP id o6-20020a056402038600b00463c43f6628mr5611748edv.53.1667371538262; Tue, 01 Nov 2022 23:45:38 -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 e17-20020a170906045100b007aa239cf4d9sm4998900eja.89.2022.11.01.23.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 23:45:37 -0700 (PDT) Message-ID: <0b28bb01db01fafe30acb45f4b12e259b79121a6.camel@gmail.com> Subject: Re: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration. From: Liliana Marie Prikler To: Taiju HIGASHI Date: Wed, 02 Nov 2022 07:45:34 +0100 In-Reply-To: <87y1sugmh2.fsf@taiju.info> 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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57963 Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= , 57963@debbugs.gnu.org, Andrew Tropin 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: -1.0 (-) Am Mittwoch, dem 02.11.2022 um 10:43 +0900 schrieb Taiju HIGASHI: > Hi, >=20 > Liliana Marie Prikler writes: >=20 > > Am Donnerstag, dem 27.10.2022 um 14:31 +0900 schrieb Taiju HIGASHI: > > > Liliana Marie Prikler writes: > > >=20 > > > > 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.=C2=A0 Ludo offered the > > > > solutions: > > > > 1. Taking a or a file-like object > > > > 2. (Optionally) using a gexp-compiler for the former > > > >=20 > > > > Cheers > > >=20 > > > 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. > > >=20 > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D57963#239 > > Ahh, I missed that.=C2=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 > >=20 > > (match > > =C2=A0 ((? home-font-config-configuration? config) > > =C2=A0=C2=A0 (serialize-... config ...)) > > =C2=A0 ((? file-like? config) config)) > >=20 > > 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. > >=20 > > Cheers >=20 > Sorry for my response delay. > Is my recognition correct?=C2=A0 I have plan to rewrite it as below. >=20 > --8<---------------cut here---------------start------------->8--- > (define (serialize-fontconfig-configuration config) > =C2=A0 (define start-of-fontconfig " > > ") >=20 > =C2=A0 (define end-of-fontconfig "\n") >=20 > =C2=A0 (mixed-text-file > =C2=A0=C2=A0 "fonts.conf" > =C2=A0=C2=A0 start-of-fontconfig > =C2=A0=C2=A0 (serialize-configuration config home-fontconfig-configuratio= n- > fields) > =C2=A0=C2=A0 end-of-fontconfig)) >=20 > (define (add-fontconfig-config-file user-config) > =C2=A0 `(("fontconfig/fonts.conf" > =C2=A0=C2=A0=C2=A0=C2=A0 ,(match user-config > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((? home-fontconfi= g-configuration? user-config) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (serialize-f= ontconfig-configuration user-config)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((? file-like? user-config) us= er-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