Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t8BAMONu004545 for ; Fri, 11 Sep 2015 12:22:25 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx110) with ESMTPS (Nemesis) id 0MZgyQ-1ZLYfs1kVS-00LTou for ; Fri, 11 Sep 2015 12:22:19 +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 t8BAKhgm019001 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Sep 2015 12:20:43 +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 t8B8RTn8029702; Fri, 11 Sep 2015 12:20:42 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12534130 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Sep 2015 12:20:42 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.119.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t8BAKgqQ024657 for ; Fri, 11 Sep 2015 12:20:42 +0200 Received: from nov-007-i591.relay.mailchannels.net (nov-007-i591.relay.mailchannels.net [46.232.183.145]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t8BAKVH1024178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Sep 2015 12:20:36 +0200 X-Sender-Id: netnames|x-authuser|joseph.wright@morningstar2.co.uk Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C01E41202AE for ; Fri, 11 Sep 2015 10:20:29 +0000 (UTC) Received: from smtp3.easily.co.uk (ip-10-220-9-73.us-west-2.compute.internal [10.220.9.73]) by relay.mailchannels.net (Postfix) with ESMTPA id 5EFCA120861 for ; Fri, 11 Sep 2015 10:20:28 +0000 (UTC) X-Sender-Id: netnames|x-authuser|joseph.wright@morningstar2.co.uk Received: from smtp3.easily.co.uk (smtp3.easily.co.uk [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.5.1); Fri, 11 Sep 2015 10:20:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: netnames|x-authuser|joseph.wright@morningstar2.co.uk X-MailChannels-Auth-Id: netnames X-MC-Loop-Signature: 1441966828764:1897331765 X-MC-Ingress-Time: 1441966828764 Received: from [139.222.114.163] (port=64473 helo=[139.222.114.163]) by smtp3.easily.co.uk with esmtpa (Exim 4.43) id 1ZaLRS-0000vM-2w for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Sep 2015 11:20:26 +0100 References: <20150911094655.GA29867@hzdr.de> <55F2A790.9090709@morningstar2.co.uk> <20150911101759.GA30955@hzdr.de> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-AuthUser: joseph.wright@morningstar2.co.uk Message-ID: <55F2AAE6.4020801@morningstar2.co.uk> Date: Fri, 11 Sep 2015 11:20:22 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: non-intuitive behaviour of clist with empty items To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <20150911101759.GA30955@hzdr.de> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: 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: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yogPN5Qr l2pfiOA2T2+j6AgdwH8GErKC2Nnr1b+Tw9Gi45vpJn+OJEctK1MO X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7868 On 11/09/2015 11:17, Alexander Grahn wrote: > On Fri, Sep 11, 2015 at 11:06:08AM +0100, Joseph Wright wrote: >> On 11/09/2015 10:46, Alexander Grahn wrote: >>> consider the following example: >>> >>> \documentclass{article} >>> \usepackage{expl3} >>> >>> \begin{document} >>> \ExplSyntaxOn >>> \clist_set:Nn\l_tmpa_clist{,,foo,bar,} >>> \typeout{\clist_count:N\l_tmpa_clist} %expected: 5, I get 2. >>> \typeout{\clist_item:Nn\l_tmpa_clist{3}} %expected: `foo`, I get `'. >>> \typeout{\clist_item:Nn\l_tmpa_clist{4}} %expected: `bar`, I get `'. >>> \ExplSyntaxOff >>> \end{document} >>> >>> Why does \clist_set:Nn ignore empty items when initialising a clist >>> variable from a token list? Is this intended behaviour? Is there a >>> work-around? > >> This is by-design. Comma lists can't contain empty items, commas, etc.: >> sequences can. The reason is comma lists are 'close' to the user level, >> and there stray empty entries are normally best ignored. > > This is very unfortunate, because I want to be able to correctly process > user input of comma sparated items which /may/ contain empty items. > > With \@for from LaTeX2e I can easily process such input properly: > > \documentclass{article} > > \begin{document} > \makeatletter > \@for\listitem:=,,foo,bar,\do{ > \typeout{item:\listitem} > } > \makeatother > \end{document} > > Now I am looking for an L3 equivalent of \@for. > > Alexander What's the real-world use case? Joseph