From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/4245 Path: main.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: smallest possible testfile for mpgraph-error? Date: Mon, 26 Feb 2001 22:46:19 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <3A9ACEAB.49163579@quicknet.nl> References: <200102261102.MAA00168@sol.cs.uni-dortmund.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035394926 24087 80.91.224.250 (23 Oct 2002 17:42:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:42:06 +0000 (UTC) Cc: ConTeXt Original-To: unlisted-recipients:;unlisted-recipients: (no To-header on input) Xref: main.gmane.org gmane.comp.tex.context:4245 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:4245 Patrick Gundlach wrote: > > Now I rename simple.mp to mpgraph.mp: > > with \protectbufferstrue, mpgraph.1 is ok. lots of stuff can go wrong with names like mpgraph.mp. (at least one of them is the shell itself: it caches i-node numbers, and I've had similar problems with totally non-TeX related files if and only if the file was opened for writing without actually unlinking it. This may not be the problem here, but it is nevertheless possible). > mpgraph.mp has been renamed to tmpgraph.kep, then overwritten by > something (this I dont know, probably the same as above > (beginfig(1)...) + "end."). This is texexec: in the subroutine 'checkMPlabels' > Then mpto opens mpgraph.mp (55 bytes), writes it to tmpgraph.tex). Then \\end is appended > to tmpgraph.tex. probably mpto > After that, pdftex is called to create tmpgraph.dvi (208 bytes). > !! But just before creating the dvi > file, mpgraph.mp gets overwritten with a single > "end." line. This is context itself, that is called to generate the label. because it doesn't know about protected buffers, it writes mpgraph.mp. Context does this *always* nowadays, even on the following sequence of commands: touch test.tex texexec test [press control-d] The problem is in \initializeMPgraphics, which is part of \everyjob. The following definition would be a lot safer: \def\initializeMPgraphics% { \immediate\openin\scratchread\MPgraphicfile.mp \ifeof\scratchread \immediate\closein\scratchread \else \immediate\openout\MPwrite\MPgraphicfile.mp \immediate\write\MPwrite{end.}% \immediate\closeout\MPwrite \fi \immediate\closein\scratchread } I don't see any obvious reason why \protectbufferstrue shouldn't be the default, btw. Greetings, Taco