Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s4QA6PNH002222 for ; Mon, 26 May 2014 12:06:27 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx001) with ESMTPS (Nemesis) id 0Lcjkl-1WOv2y1Yk3-00k4Gk for ; Mon, 26 May 2014 12:06:20 +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 s4QA3NjY009972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 May 2014 12:03:23 +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 s4PM133q029629; Mon, 26 May 2014 12:03:22 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11062802 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 26 May 2014 12:03:22 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s4QA3Mnw026168 for ; Mon, 26 May 2014 12:03:22 +0200 Received: from smtp2.easily.co.uk (smtp2.easily.co.uk [62.128.146.103]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s4QA30rQ005734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 26 May 2014 12:03:03 +0200 Received: from [94.116.171.213] (port=61756 helo=palladium.local) by smtp2.easily.co.uk with esmtpa (Exim 4.43) id 1WorkC-0003HJ-7w for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 26 May 2014 11:03:00 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 References: <537E212E.2030607@morningstar2.co.uk> <537E5311.3020302@nag.co.uk> <537E60D1.7010708@morningstar2.co.uk> <537FCA13.3000700@nag.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: 7bit Message-ID: <53831153.50107@morningstar2.co.uk> Date: Mon, 26 May 2014 11:02:59 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: Reading from the system (pipe input) To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <537FCA13.3000700@nag.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:TWG8kyK6Oyg=:mXh4seUuPYaE1SC3+U4zkxcvLJ gxRI9bxL1i5L8vrw7FPd9KCTEv9XzbhZPJn1cGJjTeoVLv4AxISsQChBgvWsfzJuPtlhd78dQ jipKbO3P/YLdlQ2yjDBmfEJ+D9GQ1/R4lxuGAD8c9PE6AEWHJDg3wiobzM6NLQtqABI98H0mY Rbp0n2TDCWWTOz0/UGRdcDk/t1wQhYdU7zP245FQWJjwnNy4cReqpFkR93WNtjur2Ha1UHzbI Op/2nmZWCCFE5k6msAETAhoSVayzjhYInWKb22KoD/yh3uGYow3iMji4L6lpGCvj1+46o1GaO RJu2p5xdPc5kB6wytuyqhwyQL5Ygez8vkDuaLGqxKjwupSIvQgVHqPJTS4lDaJ7FiK2+2879N VwrXmnRCasK9rrJaW24St6dpEVAmUc0U/97l0L1YeBNpecs79+zo8tE87s0s2FX8lkHuDZxIs yKCw7F+i6kp3ZEbLPZnGnNBB8txVLEwdhAJR4oOv1A3QaGj/RIdKX56Bo2ejfxT7itm76Gc4M fMtthaO33l5+WCrxiHd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BYGDQSc=:9FwB9Qy30VSUj7ekfxIhY44C9ySayxzPpacnA2aXdAw= Status: R X-Status: X-Keywords: X-UID: 7450 On 23/05/2014 23:22, David Carlisle wrote: > On 22/05/2014 21:40, Joseph Wright wrote: >> On 22/05/2014 20:42, David Carlisle wrote: >>> On 22/05/2014 17:09, Joseph Wright wrote: >>>> Hello all, >>>> >>>> Currently, we have \ior_open:Nn for reading from a file, but no defined >>>> interface for using the 'pipe' shell escape provided by pdfTeX. As we >>>> forbid spaces in file names, >>> why do we do that? Spaces in filenames always seem like an abomination >>> to me. >>> But that seems to be a relic on the 1970s I've noticed that people who >>> started using >>> computers this century don't seem to think anything of using a >>> descriptive phrase >>> as a filename... >> The logic here was that, at least as I understand it, there are some >> places where you can't just 'wrap up spaces' and have them work. In >> particular, there are some comments about dvips and included graphics >> which suggest that space behaviour is hard-coded in that case and can't >> be changed. (MiKTeX also does some 'interesting' things with BibTeX >> input names containing spaces.) I may have this wrong: can other more >> knowledgeable people comment? >> >> This can of course be changes if required. > > issues with existing implementations aside.... >>> Shouldn't we just allow spaces (and leading | or any other system >>> dependent special >>> syntax) just surrounding any user supplied name by " " to keep it >>> together? >> Space behaviour notwithstanding, I think the point here is that the pipe >> input approach is sufficiently different from a 'real' file to deserve a >> separate interface. > > My instinct here is still that the pipe interface being exposed as a > file is a feature that should be > preserved rather than hidden. > > At the bottom programming layer it probably seems natural to have > separate functions for accessing files > or for invoking commands, but if you separate them you need to duplicate > the entire stack all the way > up to the document level, all file reading commands would need to be > duplicated or have some > way of accessing the pipe functionality. > > In 2e you can do > > \documentclass{article} > > \begin{document} > > \input{"|zcat foo.tex.gz"} > > \end{document} > > to input a compressed file (and zcat could be replaced by a database > query or wget to do web request or whatever. > You can do same with \include and \InputIfFileExists and... > > The easiest way to ensure that all top level file reading can access > pipes (if enabled) as well as files is to not distinguish > them and just treat them as files. The syntax for a filename is > explicitly system dependent in anycase and this is not really > so different (which is how come it came to be hooked into the \input > syntax in the first place). > > David OK, this seems like a reasonable argument. I'll update the behaviour w.r.t. spaces. -- Joseph Wright