Richard Heck wrote:
Georg Baum wrote:
Am Samstag, 19. Mai 2007 18:45 schrieb Richard Heck:
So resultdir should be set if and only if the
converter creates a directory by itself. Please make sure that this does
work in combination with usetempdir, or make these two flags mutually
exclusive (since usetempdir is not really needed if the converter creates
a directory itself one could ignore usetempdir if resultdir is set).
I'll ignore usetempdir and send a note to lyxerr.
The HTML converter, for example,
dumps about a billion files but there is going to be one that the viewer
wants, and it's that FileName I want to return, since there's no general
way in which to recover it. The temporary directory, on the other hand,
can be recovered as the path portion of the file name. Then again, I
suppose I could return a std::pair<FileName, bool> or a
std::pair<FileName, FileName>, with the latter being the temporary
directory if one was created, rather than have a bool & as an argument.
Advice welcome. My intuitions aren't always great here.
If you do that I think the <FileName, bool> would be better. But I also
think that the simple bool as return value is expressive. What confused me
was the fact that there were two signatures. If there is only one, and the
name of the converted file is always set by the converter, then I think it
is clear.
The two signatures were really a temporary thing, allowing me not to
mess with the other calls while fixing this one.
I wonder whether I should just commit the patch as-is, thus fixing HTML
output and View>HTML for 1.5.0, and do something about cleaning this
code up more generally after 1.5.0 is out. My thought is just that
changing how convert() works more extensively could lead to problems and
would need testing, whereas I know that the current patch only changes
the behavior of originaldir/usetempdir and so is safe. Thoughts?
I think your approach is sound if you promise to do the proper cleanup
after 1.5.0 ;-)
I would really like to have a fully functional html export in 1.5.0. I
always have to export to LateX first and run htlatex on it. This is very
annoying.
Abdel.