Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o1DGSvos025936 for ; Sat, 13 Feb 2010 17:28:59 +0100 Received: (qmail 24395 invoked by alias); 13 Feb 2010 16:28:52 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 13 Feb 2010 16:28:52 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx017) with SMTP; 13 Feb 2010 17:28:52 +0100 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 o1DGQkth001107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Feb 2010 17:26:47 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o1CN12sF030489; Sat, 13 Feb 2010 17:26:42 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 394065 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 13 Feb 2010 17:26:42 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o1DGQg7T003552 for ; Sat, 13 Feb 2010 17:26:42 +0100 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o1DGQb1c000977 for ; Sat, 13 Feb 2010 17:26:40 +0100 Received: from morse.mittelbach-online.de (p54A87716.dip.t-dialin.net [84.168.119.22]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MLA1p-1NgbwV0psX-000VTT; Sat, 13 Feb 2010 17:26:38 +0100 Received: by morse.mittelbach-online.de (Postfix, from userid 501) id 4BF716DC1B; Sat, 13 Feb 2010 17:26:35 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <4b6c8efc$0$6573$9b4e6d93@newsspool3.arcor-online.net> <09bdfa24-c77c-4f37-8c89-809befb28934@u41g2000yqe.googlegroups.com> <4b6cc60a$0$6581$9b4e6d93@newsspool3.arcor-online.net> <227E5CB1-DBE8-4956-94C6-9B9FD1B15A07@yahoo.de> <19317.56561.17406.210089@morse.mittelbach-online.de> <702AECD6-E31C-47EE-8921-AB9EACC52AC7@yahoo.de> <44638509-90DA-40C0-8A04-0E04CD12C208@gmail.com> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Provags-ID: V01U2FsdGVkX19qIbg8ffryw8C6VEt1tuqo5inDwBVt06W14iW Mc52vwhZCjAj23hZNe2Yeg1U8Rhs0ygl3DDgQEeQjl+zS+ROJ6 W3MXzxsszdUgI9go5cbJQ== X-Spam-Whitelist-Provider: Message-ID: <19318.53947.230007.647258@morse.mittelbach-online.de> Date: Sat, 13 Feb 2010 17:26:35 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Frank Mittelbach Subject: Re: Newbie Question on LaTeX 3 Programming - \exp_arg:x To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <44638509-90DA-40C0-8A04-0E04CD12C208@gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe6KyumPEzQo/v49H/ 6WH16A3hVxdb50dQBMe/GhyW+KflE2xKxwMOEKvHDWk7UqJoh2LvyLXsywjCkfM1ILLlYNfmOEMt /DqUA==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de X-Scanned-By: MIMEDefang 2.63 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 6267 Will Robertson writes: > On 13/02/2010, at 11:37 AM, Philipp Stephani wrote: > > > expl3 itself uses \exp_arg:x in disguise, e.g. in l3tl.dtx, l. 1504: > > > > \cs_set_nopar:Npn \tl_tmp:w #1 { > > \tl_set:Nx \l_tmpa_tl { > > \exp_not:N \prg_new_conditional:Npnn \exp_not:c {tl_if_eq:#1} > > ####1 ####2 {p,TF,T,F} { > > \exp_not:N \tex_ifnum:D > > \exp_not:c {tl_compare:#1} {####1}{####2} > > \exp_not:n{ =\c_zero \prg_return_true: \else: \prg_return_false: \fi: } > > } > > } > > \l_tmpa_tl > > } > > > > Codes like that are very common. I also think that this is not too elegant, but in many cases there is no other way. \edef lets you specify completely arbitrary combinations of expansions, something that is impossible otherwise. It doesn't matter that it is not expandable because the result must be executed anyway. > > > I've proposed adding this version of \exp_arg:x to expl3 relatively recently. > (It's the first on the list of l3candidates.dtx.) > > Your feedback helps us to decide whether it should be included. > Any thoughts from others? I don't think it should be added - not for the non-expandable operation that we are currently talking about. For starters the command you are looking for already exists, sort of at least. It is called \use:x if you think about it: \use:n is the base function that takes its argument and returns it without the braces. \use:x is then the command that fully expands its argument (using the power of \edef that Philipp is looking for) and passes presents the result to \use:n, which is what you are looking for. we currently don't have \cs_generate_variant:Nn \use:n {x} but I guess we should provide it (though probably coded more efficiently like \use:c which is also not defined as a variant). if we do get \expanded as a standard primitive we might rethink that but then we might then implement all \exp_args:N...x as expandable versions and that would make \use:x equiv to \expanded if done right, so don't know if we would need another name either. my thoughts frank