On Mon, Dec 14, 1998 at 11:40:20PM +0100, Lars Gullik Bjønnes wrote:
>
> Anyway I think that making LyX able to read from stdin is the wrong
> solution (I am not even sure that it would work). This kind of problem
> should be solved with something similar to popen(3), will most likely
> be most elegantly solved from the script interpreter.
>
> How hard would it be to make reLyX output the generated file to
> stdout? (as an option)
>
> Then we could do something like this:
I'm a bit confused. Is there supposed to be a method here that does use popen?
In any case, it seems to me that it would be easier to implement
"-o outfile" than writing to stdout, although both are of course possible.
Actually, writing to stdout might not be harder.
However, note that we still need to write the temporary files. We *can* write
them in /tmp, but alternatively, we can just write them to tmp_dir. Since
they're erased anyway (unless you're running with -d), there should be no
problem. (Except that foo.preamble will be overwritten if it exists! I think I
may change this so that it names that file foo.relyx* like the other temp
files.)
> Not using popen(3):
>
> make reLyX have an option -o <outputfile>
>
> then when we call reLyX from LyX we could specify the lyx tmp
> directory.
>
[diff snipped]
>
> And the user would have to use save as to put it somewhere sensible.
Wow! This seems really easy. Should I add the -o option?
-Amir