Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id r5EANswn030356 for ; Fri, 14 Jun 2013 12:23:55 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx103) with ESMTP (Nemesis) id 0MABqX-1UcfWc2ild-00BOdv for ; Fri, 14 Jun 2013 12:23:48 +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 r5EAL0g2024198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Jun 2013 12:21:00 +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 r5E37QoI032351; Fri, 14 Jun 2013 12:20:59 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 9865101 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 14 Jun 2013 12:20:59 +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 r5EAAw3m025328 for ; Fri, 14 Jun 2013 12:10:58 +0200 Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r5EAAmm4015866 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 14 Jun 2013 12:10:51 +0200 Received: by mail-vc0-f171.google.com with SMTP id gd11so289191vcb.2 for ; Fri, 14 Jun 2013 03:10:47 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.52.28.171 with SMTP id c11mr549869vdh.18.1371204301579; Fri, 14 Jun 2013 03:05:01 -0700 (PDT) Received: by 10.52.96.36 with HTTP; Fri, 14 Jun 2013 03:05:01 -0700 (PDT) X-Google-Sender-Auth: M2LrIlKRmj5dzqYza1ViRQAPsfo Content-Type: text/plain; charset=windows-1252 X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id r5EAAx3m025329 Message-ID: Date: Fri, 14 Jun 2013 06:05:01 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Jura Pintar Subject: l3keys feature request To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE 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 r5EAL0g2024198 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:mXinjNDIoDg=:eFGxMoRyUkPY7mS7rM/b7W OJ2yaymrSypezu5wWFLAYLSR1E2Zc/NCAXw4mlKNIADM27ggR5iQVlGqgB8w0+dSqffKYJ0 lekrTOsAci8H29GDAAPAoNlIVmYIy4/eTkA2OtggfNNQTHi3mNBV94ECwHwUBtqPOvYXt7Q iw8sBx6WlFNF7r9eAg0A9NfvP4Q+ixmdm85k/B8+LKE2PYsBX2t1NdK3zF4QL97INaICu5r Yo9XauprJwWYRPzTF66ZdnW9LCLmyJvFUEObuEHAjTj1FqD6HoIIG3db/lGkuEMon+HVKun dohPVqp5i5oKyzyt509DFzrV1ILBp7cnWyI0zc4ntDtq9pOAxeC3PhsZnNDGedr1/0Uv9C3 hxQ222hdSos4DKme1DTaeQTAtk+jxiSsE2bwm4WwrmiEO+7n9LXmq0So26DFjmeHdNQnetm f+OR0Y8d81wbBb9iK8U8aGt492xYmPnzOdD5lAj7XzTFbnj9SjP3VpYkMqLTr3JFnDG6XDu qlT261seD57JuZJIOT3OfGbbZNtS8YSWKv69miGKyXjHytDiFVgUj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w= X-UI-Loop:V01:JXZe5ABPkTw=:W3dy2q/XQiWdulezX7V2aSmuZjvUsVK453GqrSI06ig= Status: R X-Status: X-Keywords: X-UID: 7204 Dear all, I=92ve recently been re-implementing some of my projects in L3, and finding myself having to jump through some hoops to get things I had working smoothly in pgfkeys work equivalently well with l3keys. In particular, filtering and redirecting keys has been a bit of a chore. In light of this, I have a couple of suggestions for features that could be added to the module in due course (to better illustrate what I have in mind, I=92ve written a quick-and-dirty implementation - appended at the bottom of this email; the code seems to work, but I fully expect more experienced people could greatly improve it). 1) It would be good to add a .meta:nn property that takes a path as its first argument, so that we could do things like \keys_define:nn { module / subgroup-i } { key-i .code:n =3D { < code > } } \keys_define:nn { module / subgroup-ii } { key-ii .meta:nn =3D { module / subgroup-i } { key-i =3D #1 } } instead of having to write \keys_define:nn { module / subgroup-ii } { key-i .code:n =3D { \keys_set:nn { module / subgroup-i } { key-i =3D= #1 } } } as is the case right now. 2) It would also be useful to provide a \keys_set_in_subgroups:nnn command which would take a list of subgroups in the second argument-place, and would cycle through all the subgroups looking for keys given in the third argument-place. Then we could write things like \keys_set_in_subgroups:nnn { module } { subgroup-i , subgroup-ii } { key-i =3D foo , key-ii =3D bar } instead of \keys_set:nn { module / subgroup-i } { key-i =3D foo } \keys_set:nn { module / subgroup-ii } { key-ii =3D bar } More importantly, we could then easily define user commands that set different subsets of keys. A further command \keys_set_known_in_subgroup= s:nnnN could then be used to catch keys that don=92t exist in any of the specified subgroups. If this suggestion is accepted, it would also be useful to then extend l3keys2e with something like \ProcessKeysOptionsInSoubgroups { < module > } { < subgroup list > } so we can use filtering in this context as well. Anyhow, below is some code that does these things, but does need some improvement. Please let me know what you think. Best regards, Jura Pintar \cs_new_protected:Npn \__keys_meta_make:nn #1#2 { \__keys_cmd_set:Vo \l_keys_path_tl { \exp_after:wN \keys_set:nn {#1} {#2} } } \cs_new_protected:Npn \__keys_meta_make:nx #1#2 { \__keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:N \keys_set:nn \exp_not:n { {#1} } {#2} } } \cs_new_protected:Npn \__keys_meta_make:xx #1#2 { \__keys_cmd_set:nx { \l_keys_path_tl } { \exp_not:N \keys_set:nn {#1} {#2} } } \cs_new_protected:cpn { \c__keys_props_root_tl .meta:nn } #1 { \__keys_meta_make:nn #1 } \cs_new_protected:cpn { \c__keys_props_root_tl .meta:nx } #1 { \__keys_meta_make:nx #1 } \cs_new_protected:cpn { \c__keys_props_root_tl .meta:xx } #1 { \__keys_meta_make:xx #1 } \clist_new:N \l__keys_leftover_clist \prop_new:N \l__keys_leftover_prop \cs_generate_variant:Nn \keyval_parse:NNn { NNo } \__msg_kernel_new:nnnn { kernel } { key-unknown-in-subgroups } { The~key~=92#1=92~is~unknown~and~is~being~ignored. } { A~key~called~=92#1=92~does~not~exist~in~any~specified~subgroup~of~ the~module~=92#2=92.\\ Check~that~you~have~spelled~the~key~name~correctly. } \cs_new_protected:Npn \keys_set_in_subgroups:nnn #1#2#3 { \__keys_set_in_subgroups:onnn { \l__keys_module_tl } {#1} {#2} {#3} \clist_map_inline:Nn \l__keys_unknown_clist { \__msg_kernel_error:nnnn { kernel } { key-unknown-in-subgroups } {##1} {#1} } } \cs_new_protected:Npn \__keys_set_in_subgroups:nnnn #1#2#3#4 { \clist_set:Nn \l__keys_unknown_clist {#4} \cs_set_eq:NN \__keys_execute_unknown: \__keys_execute_unknown_alt: \clist_map_inline:nn {#3} { \tl_set:Nx \l__keys_module_tl { \tl_to_str:n { #2 / ##1 } } \clist_set_eq:NN \l__keys_leftover_clist \l__keys_unknown_clist \clist_clear:N \l__keys_unknown_clist \keyval_parse:NNo \__keys_set_elt:n \__keys_set_elt:nn { \l__keys_leftover_clist } } \cs_set_eq:NN \__keys_execute_unknown: \__keys_execute_unknown_std: \tl_set:Nn \l__keys_module_tl {#1} } \cs_generate_variant:Nn \__keys_set_in_subgroups:nnnn { o } \cs_generate_variant:Nn \keys_set_in_subgroups:nnn { nVn , nVV , nVv , nVo , nvn , nvV , nvv , nVo , nno } \cs_new_protected:Npn \keys_set_known_in_subgroups:nnnN #1#2#3#4 { \__keys_set_in_subgroups:onnn { \l__keys_module_tl } {#1} {#2} {#3} \clist_set_eq:NN #4 \l__keys_unknown_clist } \cs_generate_variant:Nn \keys_set_known_in_subgroups:nnnN { nVn , nVV , nVv , nVo , nvn , nvV , nvv , nVo , nno }