Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t8BAJnVs004519 for ; Fri, 11 Sep 2015 12:19:51 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx102) with ESMTPS (Nemesis) id 0Li21u-1YnExJ1Fpa-00n7xe for ; Fri, 11 Sep 2015 12:19:44 +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 t8BAIGli017692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Sep 2015 12:18:16 +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 t8B8S5Fl014399; Fri, 11 Sep 2015 12:18:16 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12534123 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Sep 2015 12:18:16 +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 t8BAIGSW024528 for ; Fri, 11 Sep 2015 12:18:16 +0200 Received: from mxout.hzdr.de (ix1.fz-rossendorf.de [149.220.4.85]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t8BAICiF017652 for ; Fri, 11 Sep 2015 12:18:14 +0200 Received: from fz-rossendorf.de (cg.hzdr.de [149.220.4.64]) by mxout.hzdr.de (Postfix) with ESMTP id 1CCBABC69 for ; Fri, 11 Sep 2015 12:18:12 +0200 (CEST) Received: from [149.220.65.84] (HELO fwo045.hzdr.de) by hzdr.de (CommuniGate Pro SMTP 6.1.5) with ESMTP id 11044165 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 11 Sep 2015 12:18:12 +0200 Received: by fwo045.hzdr.de (Postfix, from userid 1530) id 3EFE2E806E; Fri, 11 Sep 2015 12:17:59 +0200 (CEST) References: <20150911094655.GA29867@hzdr.de> <55F2A790.9090709@morningstar2.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Message-ID: <20150911101759.GA30955@hzdr.de> Date: Fri, 11 Sep 2015 12:17:59 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Alexander Grahn Subject: Re: non-intuitive behaviour of clist with empty items To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <55F2A790.9090709@morningstar2.co.uk> 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:iyxhXpl08dU=:LF6KZSC7xMfN2h2bfCQK1bWfvg JKXWcG4ipu6oQACNtZFBsHOQLvvlZ7WxIK91zgWtMK2X8Kr7cEtPj8uH9kaMHzIQm8RHHqP5q rs5F64m4Vhmh2I6ctWz7z5YBlmVAiIxLZCluojgtZCfVhlBlyjJX9EOQyvr8/nKD2+qgcfrG5 ymPjjTjKH7WeEazoOtDDZgYdnAUzul/0XCUAyD/kQWzlRBHp9M6LMPKyX3ISMc7GYm9PJGSDR WMNa8ZZ3jYcLCVpBcxyGfLQKb7be3IbzeDeccGDWJIumBT3ZNIxZeDTufJ4t2ZN76kBGjtN7d mGDqvBd/SUC6JHTh5Xi+u4aIdZ2M/vAfNy6VgY67KYjKwxHTF2M3ElOxBDIKM4WAWVyArA16Y s29Z/cTuoHZfdRE54gVKHExwZyzXqrfzPnX0UzeT/3kHtEUrjD0C9cb1Xi9qWHZ00o56lYt+7 87/poH8R8E4fDuq9xd/z3rN4uc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BqsxI+Isp9ZxirZ4jpip0ZCJjgQO8= X-UI-Out-Filterresults: notjunk:1;V01:K0:mdqrG99DKOY=:8YaR+boSLVYwXnpPN/sFKM c/uCMmiZBviAiSmFJkPapt4y9QwNaL2Q335TUaLwFPRrJ8sRRcGbZn8qOZ9n4hB6V5V7gQbOJ upoTOj/xgD5ousxE2JzpUxExdau6wV/9URPj84p2VUDoMzq9h7i6mwIcmvmZiOlxt+zOuD9rW UgZlleYBwtXqev1rZX78kXP9goQgjre3hBb/lJYNX7XA8W3RFkiTcGeYb9Xoxp7s6yyBwRGaW U6Cs3ORci6gPVc9jR3kARQygwlDdWgcA88am6RkGOAXQp5y1ykpx4izTzBWNwiaMW+VpbDS70 nGXbjZhfihwsRfUan8maXhA58NybdixGLkd5nadKpol/L9ERkjy0SomgL41bWZtQgkVx6hxqn ZTsDbn77BzuIxLFwB1rx1id891cL1QvBn6saZeDMxqQ7ADR2d1WGz9GUCrwi+fvf9AHWFVnte nDvIOg0wFavqCmwWEbL7NI+mUDs9VAb0y0SQGMprl9KxV7NRxxGr X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7867 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