From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27582 Path: news.gmane.org!not-for-mail From: nico Newsgroups: gmane.comp.tex.context Subject: Re: \typefile with a file in \usepath fails Date: Sun, 30 Apr 2006 20:28:52 +0200 Message-ID: References: <44549270.2080506@wxs.nl> <4454BA29.9020106@wxs.nl> <4454ED09.6090004@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1146421630 9776 80.91.229.2 (30 Apr 2006 18:27:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2006 18:27:10 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun Apr 30 20:27:08 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaGdL-0002V7-7u for gctc-ntg-context-518@m.gmane.org; Sun, 30 Apr 2006 20:27:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0578012772; Sun, 30 Apr 2006 20:27:03 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10966-02; Sun, 30 Apr 2006 20:27:02 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4B7E9127A7; Sun, 30 Apr 2006 20:25:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EBD71127A7 for ; Sun, 30 Apr 2006 20:25:16 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07955-03-2 for ; Sun, 30 Apr 2006 20:25:16 +0200 (CEST) Original-Received: from swip.net (mailfe03.tele2.fr [212.247.154.76]) by ronja.ntg.nl (Postfix) with SMTP id 162FC12772 for ; Sun, 30 Apr 2006 20:25:15 +0200 (CEST) X-T2-Posting-ID: 3brHPWvyEzVNt0QNlxQWsxGJRDYe7rueGgqwO1zxZAg= X-Cloudmark-Score: 0.000000 [] Original-Received: from [83.179.152.93] (HELO localhost) by mailfe03.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 194120522 for ntg-context@ntg.nl; Sun, 30 Apr 2006 20:25:15 +0200 Original-To: "mailing list for ConTeXt users" In-Reply-To: <4454ED09.6090004@wxs.nl> User-Agent: Opera M2/7.54 (FreeBSD, build 955) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:27582 Archived-At: On Sun, 30 Apr 2006 18:59:53 +0200, Hans Hagen wrote: > nico wrote: >> On Sun, 30 Apr 2006 15:22:49 +0200, Hans Hagen wrote: >> >> >>>>> what version of context do you run? i though that i added support for >>>>> that some time ago >>>>> >>>> Version 2006.04.27. >>>> >>>> \dodotypefile checks where the file is, but a following call to >>>> \makelocreadfilename seems to set improperly \readfilename, but I'm >>>> not >>>> sure to understand correctly the code. >>>> >>>> >>> \tracefilestrue >>> >>> >> Hm, verbatim seems not using the file interface: there's no trace about >> file found or not related to typefile. Another thing I did is to patch >> \processfileverbatim to trace what is actually the file used: >> >> \def\processfileverbatim#1% >> {\par >> \bgroup >> \writestatus{jo}{file=#1} >> ... >> >> And doing: >> >> \typefile{list1.tex} % file in the current directory (ok) >> \typefile{test-001.tex} % file in the \usepath directory (nok) >> \typefile{joke} % file that does not exist (ok, an error is printed) >> \typefile{pos2.tex} % again a local existing file (ok) >> >> Gives the traces: >> >> systems : begin file typefile at line 79 >> jo : file=list1.tex >> systems : searching for pdfr-ec on tex path >> systems : pdfr-ec located >> (/usr/local/share/texmf-local/tex/context/base/pdfr-ec.tex) >> jo : file=test-001.tex >> verbatim : file joke does not exist >> jo : file=pos2.tex >> >> So, the actual file path is not used, but it is the argument passed that >> is always used. >> > it's > > \makelocreadfilename{#3}% > > that does the search Really? As far as I understand the code, it sets \readfilename and \locreadfilename in a clean way, and that's all: \def\makelocreadfilename#1% {\sanitizefilename#1\to\readfilename \checkfilename\readfilename \ifcase\kindoffile \edef\locreadfilename{\pathplusfile\f!currentpath{#1}}% \fi} Anyway, if it's that call that should expand the filename, it does not work. In \dodotypefile the search is done previously by a call to \doifinputfileelse that sets \filepath (set again to \readfilename but I don't know why), but this result is not used since \readfilename is re-set to #3 by \makelocreadfilename. But you know this far better than I :-) Regards, BG