Lars Gullik Bjønnes wrote:
> | Garst>
> | http://www.mail-archive.com/[EMAIL PROTECTED]/msg60797.html
>>
> | Thanks. Unfortunately, the patch is a bit large for me. Unless
> | somebody ports and tests it, I will have to politely decline the
> | invitation ;)
> 
> Note that most of the patch deals with other things than making
> lyx2lyx use a temporary file.
> 
> Should be quite easy to extract only that part... I'll see what I
> can do... but I won't test it...

I think it as simple as this. Compiles but otherwise untested.

Garst, over to you...

-- 
Angus
Index: buffer.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v
retrieving revision 1.399.2.4
diff -u -p -r1.399.2.4 buffer.C
--- buffer.C	6 Jun 2003 19:17:59 -0000	1.399.2.4
+++ buffer.C	17 Sep 2003 14:56:55 -0000
@@ -1200,8 +1200,10 @@ bool Buffer::readFile(LyXLex & lex, stri
 							     _("Can't find conversion script."));
 						return false;
 					}
+					string const tmpfile = lyx::tempName();
 					command += " -t"
-						+tostr(LYX_FORMAT) + ' '
+						+ tostr(LYX_FORMAT)
+						+ " -o " + tmpfile + ' '
 						+ QuoteName(filename);
 					lyxerr[Debug::INFO] << "Running '"
 							    << command << '\''
@@ -1213,9 +1215,8 @@ bool Buffer::readFile(LyXLex & lex, stri
 							       "running the conversion script."));
 						return false;
 					}
-					istringstream is(STRCONV(ret.second));
 					LyXLex tmplex(0, 0);
-					tmplex.setStream(is);
+					tmplex.setFile(tmpfile);
 					return readFile(tmplex, string(), par);
 				} else {
 					// This code is reached if lyx2lyx failed (for

Reply via email to