Georg Baum wrote: >> I didn't. I meant it should copy it to the NEW temporary directory, e.g.: >> /tmp/lyx_098weras/lyx_tmpbuf0/file.html.conversion/ >> which is where the converted files will be dumped. >> > Why not do that in LyX (with the copier to fix paths of included files) and > call the converter with the copied file, with the current working directory > being the new temp dir? In fact I assumed that you did that. In theory it > wastes some disk space and time for copying, but I believe that you won't > notice that in practice and the benefit of not having to create a wrapper > script outweighs the disadvantage. > That's the approach I'm now taking, more or less, as Enrico found yet further problems. He also suggested a simpler way, namely: note the time when we start the conversion; then look at the modification times of the files after the conversion to see which ones got generated. There could be an issue if the converter runs really fast, so I'll probably end up also having to keep a simple list of what files were there in the first place. In any event, the idea is then to have convert() return the list of generated files as a vector<FileName> (thus implementing an earlier suggestion of yours, though more generally), and the Exporter can do with that list as it will. This is indeed simpler, since if we copy everything to the new tempdir, then we still need to know what we put there and what the converter put there, and of course it's possible the converter will over-write some of the files we put there, which may then need to be copied back to the tempdir for the next converter to use, so we need to check the modification times anyway.
There is an issue here about the copiers, since they expect to get a single file to play with. (At this point, it seems pretty obvious this won't make 1.5.0, by the way. This was supposed to be a lot simpler! And there are other bugs to fix that are more pressing.) Files with the right extension can be passed to the copier for the relevant format. But other generated files---e.g., png's in the case of htlatex---would need either just to be copied directly or passed to copier for some format associated with that extension. I think the former may be enough, as "associated files" will probably not be the kinds of files that need internal stuff changed, though they could be, in principle. Thoughts? Input always welcome. Richard -- ================================================================== Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ ================================================================== Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto