On 09/18/2012 07:07 PM, Andrew Parsloe wrote:
On 19/09/2012 9:49 a.m., Scott Kostyshak wrote:
On Mon, Sep 17, 2012 at 12:54 AM, Andrew Parsloe
<apars...@clear.net.nz> wrote:
I would love to be able to insert a pause between buffer-export
lyxtabsort
and buffer-reload, and found myself searching, alas forlornly, for a
pause
LFUN (e.g. pause 500 = do nothing for half a second).
It would be easy to make an LFUN_SLEEP (see QThread::usleep), but I
wonder if it's a good idea. I have also at times wondered if this
would be a useful LFUN, but all of the times I have wanted it it's
been for a workaround. Maybe it's better not to have it so that the
root problem gets fixed (?).
Can someone think of a non-workaround need for it?
If an experienced LyX developer says it would be useful, I would be
happy to submit a patch.
Scott
It was only a "wistful" suggestion -- it would allow a tinkerer like
me to tinker a little more. The real problem (in the original post)
was that the command-sequence code doesn't wait for buffer-export to
finish before invoking the next command in the sequence
(buffer-reload). The GUI does know -- the greyed-out buffer-reload
button becomes enabled only after buffer-export is complete.
The reason for this, I'd assume, is that the export is done in the
background, i.e., in a separate thread. Probably that is a mistake. When
we're processing the command line, threaded export should probably be
disabled. I'd suggest you file a bug report about this. Shouldn't be
hard to fix.
rh