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 t8BA7vQ9004498 for ; Fri, 11 Sep 2015 12:07:58 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx102) with ESMTPS (Nemesis) id 0M5qGT-1YhZjK03aL-00xsdN for ; Fri, 11 Sep 2015 12:07:51 +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 t8BA6N0P011186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Sep 2015 12:06:24 +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 t8B8RTmk029702; Fri, 11 Sep 2015 12:06:23 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12534082 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Sep 2015 12:06:23 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t8BA6Nda023759 for ; Fri, 11 Sep 2015 12:06:23 +0200 Received: from ftx-008-i769.relay.mailchannels.net (ftx-008-i769.relay.mailchannels.net [50.61.143.69]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t8BA6D8C010984 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Sep 2015 12:06:20 +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 4E979602C1 for ; Fri, 11 Sep 2015 10:06:12 +0000 (UTC) Received: from smtp3.easily.co.uk (ip-10-229-11-165.us-west-2.compute.internal [10.229.11.165]) by relay.mailchannels.net (Postfix) with ESMTPA id B3AB960937 for ; Fri, 11 Sep 2015 10:06:10 +0000 (UTC) X-Sender-Id: netnames|x-authuser|joseph.wright@morningstar2.co.uk Received: from smtp3.easily.co.uk (smtp3.easily.co.uk [10.89.138.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.5.1); Fri, 11 Sep 2015 10:06:11 +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: 1441965971110:3512514393 X-MC-Ingress-Time: 1441965971110 Received: from [139.222.114.163] (port=63971 helo=[139.222.114.163]) by smtp3.easily.co.uk with esmtpa (Exim 4.43) id 1ZaLDc-0007H8-Ef for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Sep 2015 11:06:08 +0100 References: <20150911094655.GA29867@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: <55F2A790.9090709@morningstar2.co.uk> Date: Fri, 11 Sep 2015 11:06:08 +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: <20150911094655.GA29867@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:K0:WMOk5JePHNQ=:yMHCZ9G/eA5t/oh6eGHCMaGDHn 3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dB0h4QdDzE5UXK6 X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7866 On 11/09/2015 10:46, Alexander Grahn wrote: > Good afternoon, > > 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? > > Kind regards > Alexander 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. Joseph