Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s539uHR2000920 for ; Tue, 3 Jun 2014 11:56:18 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx103) with ESMTPS (Nemesis) id 0Ll0Uz-1WH3aY1mBZ-00amPW for ; Tue, 03 Jun 2014 11:56:12 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s539rTJ0018234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Jun 2014 11:53:29 +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 s5367gJS025659; Tue, 3 Jun 2014 11:53:21 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11066401 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 3 Jun 2014 11:53:21 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s539rKxH030480 for ; Tue, 3 Jun 2014 11:53:21 +0200 Received: from smtp2.easily.co.uk (smtp2.easily.co.uk [62.128.146.103]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s539r9Wu005664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 3 Jun 2014 11:53:12 +0200 Received: from [139.222.113.100] (port=52798 helo=[139.222.113.100]) by smtp2.easily.co.uk with esmtpa (Exim 4.43) id 1Wrkob-0004dZ-Iu for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 03 Jun 2014 10:15:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 References: <538C959C.3060904@morningstar2.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=windows-1252 X-Spam-Check-Skipped: Loadavg 12.12 Message-ID: <538D9231.1030807@morningstar2.co.uk> Date: Tue, 3 Jun 2014 10:15:29 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: 'Preseting' keys 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 relay.uni-heidelberg.de id s539rTJ0018234 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:TlB2c/f+9dw=:6EByHp74YG6DldkREcGNEkXsCh NEm6PuDWvPw8Fskqg1h9Ng4IB/Yl+ZzLe5eucS+1b8BhoawZmR1GOV7HzE5+luUYAWrDdG53H mar+BW7z75gx0RIIK0MBNjMRKWmXo4qQyXpNH1Dr3TixGlTZ1h2r34OQJxNDZbo6KhHsZog9F wM8SQ05GLUCeps2hNXGvXOonjAxtgJF53okjxZqxvxRdpVBUaueis6yElx3nrNvRzWJ8DNBjZ g6729pVTW1Q06anywM5Kmym7A4DkakJgru0r8ocO2a9ory/i6fKZBWnND+d+kGYRc+hfidkig sDrp17oBvjmVjsIx1OR1CkqRnbI8IMCxJWedP7FworXF4h/zhSjmCseXDfMdG5+L/EkLFDVGy l9snhfLiWk91AXs+ur5ZXrGLGUYrsQ8UH8DEawEGy/wwO1DnNHsbOX8/BJCml2277YOgivf5r QIKzbQUnNuD2q5TADWxM5f1k+9YebCfSsOt1gOya03UmH5ZkQxbctQ5jDGsqVd9IHk3bGFAur V+G4copkQAImwO+dPPXMVgF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loop:V01:nwrlEmN/iFs=:xfZTot7rvnXG0xGdNXkQJQ0HRiPQEW4Jb0xSOB4ri1o= Status: R X-Status: X-Keywords: X-UID: 7484 On 03/06/2014 00:17, Will Robertson wrote: > Hi Joseph, >=20 > I think the name and the functionality are sensible. Cool :-) > The first case is what I do in fontspec (but there=92s lots I do in fon= tspec that I probably shouldn't). > I suspect that I=92d need to play around with some interfaces to figure= out how this would change things. > Thinking along these lines: >=20 >=20 >> \cs_new_protected:Npn \foo #1#2 % #1 =3D keys >> { >> \keys_define:nn { mymod } >> { >> key-a .preset:n =3D new-value , >> } >> \keys_set:nn { mymod } >> { >> #1 >> } >=20 >=20 > One thing that becomes a bit harder is unsetting the preset; if I then = need to run \keys_set:nn again the preset would either need to be grouped= or explicitly disabled. >=20 > (E.g., when setting Letters=3DSmallCaps for the small caps font before = moving on to another font shape.) >=20 > So at least in my use case, and only thinking very briefly about it, I=92= m not sure if this interface would be a advantage for fontspec =97 but th= at=92s not to say that it=92s not a bad idea, nor either that fontspec co= uldn't be re-jigged to be a bit more sensible in such matters. >=20 > Cheers, > Will I'm seeing offering a 'preset' concept as a convenience/performance boost, but not necessarily trying to cover everything. The scenario you outline for fontspec is probably tricky to cover without some dedicated code, although I guess one might have key-a .unset: or key-a .skip_preset: I think a more common issue is how presetting interacts with filtering or grouping. Not sure at present, but I suspect the most sensible outcome is that filters/groups apply to preset keys such that only 'active' keys (that potentially could be set) are preset. --=20 Joseph Wright