Ed Gatzke wrote:
It is an odd behavior to lose the error dialog under a window.
It gets buried because I tell Lyx to export pdf then switch to another
application. The error dialog takes a while to pop up and ends up under
the other application.
This sort of thing occurs to me occasionally with other applications.
In fact, I've had one or two instances where the error dialog was hidden
behind the window of the application that generated it (don't ask me how
this happened, probably Windows being Windows). That's more difficult
to recover from, since (assuming the dialog is modal) you can't move the
top (parent) window because it can't receive focus until you exit the
dialog, which you can't do because it's hidden.
I tried putting something like
"rm -f $$o; ps2pdf $$i $$o"
in my lyxrc.defaults for ps conversion to pdf. This does not get executed
like a normal bash command for me so it does not act like two separate
commands.
I tried writing a single shell script that would remove the pdf before
calling ps2pdf but I now realize lyx is calling stuff in a sandbox /tmp
directory and then movinig the file to the working directory. I see my
script executing, but the pdf in the working directory never gets erased
and I get the silly error dialog.
Correct. There is a way, using custom export, to have LyX convert to
PDF and then pass the PDF to a script you would write (which
hypothetically could delete the old PDF and then store the new one).
The problem is that I cannot find a way to communicate, through custom
export, the working directory (where the old file lives and where the
new file is to be written). So unless you wanted the script to prompt
you for the target directory each time (which is probably more work than
manually deleting the old PDF), that seems to be no help.
You might file this as a feature request in bugzilla.
/Paul