Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id r5PLfrQt009890 for ; Tue, 25 Jun 2013 23:41:54 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx002) with ESMTP (Nemesis) id 0LpNbB-1UOK7C1f41-00fBvA for ; Tue, 25 Jun 2013 23:41:47 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r5PLdNZG017964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Jun 2013 23:39:23 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r5PDvVof020160; Tue, 25 Jun 2013 23:39:22 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 10088029 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 25 Jun 2013 23:39:22 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r5PLTMHd013744 for ; Tue, 25 Jun 2013 23:29:22 +0200 Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id r5PLTDIH020016 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Tue, 25 Jun 2013 23:29:15 +0200 Received: by mail-we0-f174.google.com with SMTP id q58so9653596wes.19 for ; Tue, 25 Jun 2013 14:29:13 -0700 (PDT) X-Received: by 10.180.73.81 with SMTP id j17mr553968wiv.51.1372195752846; Tue, 25 Jun 2013 14:29:12 -0700 (PDT) Received: from palladium.home (host81-155-134-252.range81-155.btcentralplus.com. [81.155.134.252]) by mx.google.com with ESMTPSA id r9sm6894445wik.1.2013.06.25.14.29.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 14:29:11 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 References: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Message-ID: <51CA0BAA.3070607@morningstar2.co.uk> Date: Tue, 25 Jun 2013 22:29:14 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: Initialize l3keys definition from clist To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by relay2.uni-heidelberg.de id r5PLdNZG017964 Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:rbyM/GVwcK8=:EvYMejnUFf8Bmzss1Gzi10 syvmH9PJp9UHHO8GX//i6ccyHREO13XmKqgv/z2oiZ2B2vCGOc0zXD1PyJyjiblqzF5q1MI e5oVOxwUhqwZxfVTtwmm/rrxucIBp5mvJDPhb+eGGAk2bfo9nrCEt2D6qtKvKE3iXQJLmt1 /ArcKRTnlFpsLiRFj4gK6h0oPN6a8YWWtAXXcM81eqwEo9TjeANM6mmOY4fcanB247BvhyL gsZPb3VyEvOt5hJMc2nOdApEfs9S/LzacpwSGp58OxCGrNBzaeaT/fu/gwd23IvdlFTJd2C YTW378a1QE9IyynhfyEhb6up+uPOUu8I2YoFWVcNtWnn11sdhzzo2TDFm5aOXPv+pjBNGNW DNpZniu3c/dE6vUZguuUQQaM0HlsSuhzRE+dvG7O/mT3L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xUCZKzdrmh2VjfTIuDi8zfI cvURVgQUZHaReJ6RYxvr44dphJjrq9HL0H/k7E6BoLtQwkTWnTy1I1pTEibDZm5og3jntpD cSu4/cNcq6dGittnGL1T7aV1uRkvty4M0yq9dw4vR4LXFtTtdZJf+uY0VKx86xI7zNB7OhW xltUXgOrk X-UI-Loop:V01:cCtM+P+jts0=:wYRhuMRdcQnRqw+dTNIKK31ZgdGkrB8smQRwQf9tepI= Status: R X-Status: X-Keywords: X-UID: 7208 On 20/06/2013 23:39, Joel C. Salomon wrote: > On TeX.SE (http://tex.stackexchange.com/q/120258/2966), Prof. Enrico > =E2=80=9Cegreg=E2=80=9D Gregorio helped me set up the below code, which= sets up an > l3keys definition from a clist. >=20 > Note that the property `.generate_choice:V` has to be created; is it > perhaps a useful addition to l3keys? >=20 > Note also the way I've set the default value to the first element of > the clist. I would assume that the "idiomatic" way would be >=20 > font .initial:o =3D { \clist_item:Nn \c_jcsfonts_clist {1} }, >=20 > or something like that, but of course, the property `.initial:o` > doesn't exist. And unlike the rest of Expl3, there is no clean way to > generate variants of l3keys properties; egreg's code needed to call on > `\__`-private functions. Might this, too, be a useful addition to the > package? >=20 > Code follows. >=20 > =E2=80=94Joel Salomon I see that this is the second simultaneous thread on l3keys: clearly a useful part of expl3 :-) I'm not quite sure how to handle the general 'variant generation' question: unlike arbitrary functions, I'd imagine that the key properties form a defined set. On the other hand, it certainly would be possible to provide some form of interface to allow extensions: at the moment, 'not sure'! I guess for the moment I can look at adding some additional variants: the cost is low. The question reminds me of a broader point: the business about generating choices. My original preference was that properties should take a single "n"-type argument key-name .property:n =3D value as this uses 'all' of the value. That led to the .choice_code:n/.generate_choices:n stuff. Later, I was not so sure that was the best plan (not all that clear), hence bringing in .choices:nn to do both parts in one. (I see the other key-related thread also asks for 'two-part' key properties, so this looks not-unpopular as an interface.) I'd like to know what other people think of the two approaches. -- Joseph Wright