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 p1LBNNoB005482 for ; Mon, 21 Feb 2011 12:23:25 +0100 Received: (qmail 4191 invoked by alias); 21 Feb 2011 11:23:18 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 21 Feb 2011 11:23:18 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx009) with SMTP; 21 Feb 2011 12:23:18 +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 p1LBKvOd015851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Feb 2011 12:20:57 +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 p1LBJH47022481; Mon, 21 Feb 2011 12:20:49 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1219823 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 21 Feb 2011 12:20:49 +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 p1LBKnr7005507 for ; Mon, 21 Feb 2011 12:20:49 +0100 Received: from mail-gx0-f177.google.com (mail-gx0-f177.google.com [209.85.161.177]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p1LBKhO5015681 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Mon, 21 Feb 2011 12:20:48 +0100 Received: by gxk21 with SMTP id 21so231340gxk.22 for ; Mon, 21 Feb 2011 03:20:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.95.173 with SMTP id p33mr2233998yhf.3.1298287243073; Mon, 21 Feb 2011 03:20:43 -0800 (PST) Received: by 10.146.86.8 with HTTP; Mon, 21 Feb 2011 03:20:42 -0800 (PST) References: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Whitelist: Message-ID: Date: Mon, 21 Feb 2011 06:20:42 -0500 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: Fully expandable "x" argument (was "expandable \uppercase...") To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe+OynZRhvlGqb5A0X bbiCt2rAnnct/NAlbHMvoAL6GY+23tB3khNK7bp7qqSbssdDTHsQd8+gWzfjr4OMj5ambWQGofKK 3vIsQ==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6613 > I am especially interested in this last part with the e-type argument, > especially its relationship to LuaTeX's \expanded primitive (also available > in pdfTeX >= 1.5, if it's turning up in TL this year?). Do you think that > we'd be able to add 'e' as an argument type using your code above where > necessary and replace it with \expanded if it's available? Or will there be > edge cases to cause us headaches? No headaches, I think :). It all depends on whether the test `\token_if_expands:N` that I used (not `\token_if_expandable:N` provided by l3token) is reliable. The only other fine point that I see is renamed versions of `\noexpand` and `\unexpanded`. Currently, I only detect `\noexpand`, `\unexpanded`, `\exp_not:N` and `\exp_not:n`, but I can do some rewrite to use the meaning rather than the string representation of the tokens. Of course, I will need to read some documentation (if it exists) on `\expanded`, to know how it behaves exactly (protected control sequences?) > Another function I'd like to see based on this work: expandable nestable > function mapping. E.g., I'm very interested in knowing what should be added, thanks. Expandable nestable function mapping requires the conversion to carry around an argument (the function to map), so every function in the package needs one more argument. I'll do that some time this week. That will naturally gives something like \tl_map_function_item_brace_space:nNNN {ab~{cd~{}}~} \foo_i:N \foo_ii:n \foo_iii: => { \foo_i:N a \foo_i:N b \foo_iii: \foo_i:n { \foo_i:N c \foo_i:N d \foo_iii: \foo_ii:n {} } \foo_iii: } > (I haven't looked into doing it non-expandably, which would be more robust.) My claim is that expandable is just as robust as non-expandable if - we have access to the full argument (i.e. no peeking ahead) - there is no token of catcode 1 other than a true "{" - there is no token of catcode 10 and character code other than 32 (space). If these conditions are satisfied, then everything can be done (except, of course, assignments). It will just be much slower in most cases. Note that the third condition is actually much less than it seems because catcode 10 tokens in the input are automatically converted to "true" spaces: \def\space{ } \ExplSyntaxOn \def\tilde{~} \ifx\space\tilde \show\true \else \show\false \fi shows "\true". Regards, Bruno