From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34899 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: endlinechar redefinition Date: Mon, 04 Jun 2007 23:02:43 +0200 Message-ID: <46647DF3.8080309@wxs.nl> References: <465FCDD9.6030904@seznam.cz> <4661D9F3.8070402@wxs.nl> <4663F9B7.5010403@seznam.cz> <466414EE.501@wxs.nl> <466420A3.1090300@seznam.cz> <466422D4.6080909@wxs.nl> <466434C8.5050609@seznam.cz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1180991158 28466 80.91.229.12 (4 Jun 2007 21:05:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Jun 2007 21:05:58 +0000 (UTC) Cc: ConTeXt , hajtmar@gyza.cz To: vit.zyka@seznam.cz Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 04 23:05:54 2007 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 lo.gmane.org with esmtp (Exim 4.50) id 1HvJkD-0000Yo-6e for gctc-ntg-context-518@m.gmane.org; Mon, 04 Jun 2007 23:05:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7D4A61FDF7; Mon, 4 Jun 2007 23:05:38 +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 17955-01; Mon, 4 Jun 2007 23:05:33 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C02591FBCB; Mon, 4 Jun 2007 23:03:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 033E31FA55 for ; Mon, 4 Jun 2007 23:03:04 +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 17331-05 for ; Mon, 4 Jun 2007 23:02:51 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id 3EBA81FBCB for ; Mon, 4 Jun 2007 23:02:48 +0200 (CEST) Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 26333 for multiple; Mon, 04 Jun 2007 23:02:43 +0200 User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) In-Reply-To: <466434C8.5050609@seznam.cz> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:34899 Archived-At: Vit Zyka wrote: > Hans Hagen wrote: >> Vit Zyka wrote: >>> Hans Hagen wrote: >>>> Vit Zyka wrote: >>>>> >>>>> thanks for a remmembering. As I said: this mail is a suggestion to >>>>> solve a general problem by systemic way. >>>>> >>>> sure, but \input cannot be redefined in a robust way because of its >>>> scanning nature; ok, in luatex we can intercept things, but not in >>>> mkii >>>> Hans >>> >>> I thought that the number of calling \input inside text state is >>> limited---(only?) one example is a loading encoding definition file. >>> Why not to incorporate the cleverness of setting a default >>> \endinputchar to a macro that invokes \input? >>> >>>> \startreadingfile ... \stopreadingfile is an option then >>> >>> understand as a solution bypassing \input redefinition >> it all depends on the usage ... >> - most commands use \readfile, or \readjobfile or alike - when loading > > yes, in this case \readsysfile inside: > > \def\dododoincludepdffontresource#1% encoding > {\bgroup > \edef\currentencoding{#1}% > \doifvaluesomething\pdffontfileresource > {\startreadingfile > \ignorelines % just in case \par is redefined; > > \readsysfile{pdfr-\getvalue\pdffontfileresource}\donothing\donothing > \stopreadingfile > \letgvalue\pdffontfileresource\empty}% > \egroup} > >> modules of system files , we revert to tex catcode regimes etc >> user files ... well, here tex (context) does not know what is dealt >> with; take xml, in that case we want to stay in xml mode; or >> verbatim, which needs to set up verbatim >> actually this is all arranged already (and always has been) > > catcodes yes, but \endlinechar not: > > \def\startreadingfile% beter een every en \setnormalcatcodes > {\doglobal\increment\readingfilelevel > \the\everystartreadingfile > \beginrestorecatcodes > \setcatcodetable\prtcatcodes} > > why not introduce something like > > \beginrestoreendlinechar \def\startreadingfile {\doglobal\increment\readingfilelevel \the\everystartreadingfile \pushendofline \restoreendofline \beginrestorecatcodes \setcatcodetable\prtcatcodes} \def\stopreadingfile {\endrestorecatcodes \popendofline \the\everystopreadingfile \doglobal\decrement\readingfilelevel} \let\normalstartreadingfile\startreadingfile \let\normalstopreadingfile \stopreadingfile there must have been a reason for not adding this, probably because when we are in line by line mode we don;t want this; in the otr the endlinechar is restored anyway i'm a bit reluctant to just change these defaults because i cannot forsee where it fails me Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________