John Levon wrote:

>around insets/figinset.C:675, where we do the execlp
>
>Again, I wouldn't bother spending too much time on obsolete code ...
>
I think I'd only do it in a 1.2 tree.

I guess I'd have to modify converters.C somewhere around line 643:

+            command = string("nice ") + command;
            lyxerr[Debug::FILES] << "Calling " << command << endl;
            if (buffer)
                ShowMessage(buffer, _("Executing command:"), command);

            Systemcalls::Starttype type = (dummy)
                ? Systemcalls::SystemDontWait : Systemcalls::System;
            Systemcalls one;
            int res;
            if (conv.original_dir && buffer) {
                Path p(buffer->filepath);
                res = one.startscript(type, command);
            } else
                res = one.startscript(type, command);

But this would have the side effect of lowering the priority of LaTeX 
runs, which we probably don't want.

Perhaps an extra argument to convert would be in order?

Converters::convert( <blah blah> , bool priority_nice = false )

if( priority_nice )
        command = string("nice ") + command;

This would avoid disturbing existing calls to Converters::convert while 
allowing the new behaviour to be triggered from the previewers in 
insetgraphics.C: InsetGraphics::prepareFile()

static const bool use_priority_nice = true;

    converters.convert(buf, params.filename, outfile, extension, 
image_target,use_priority_nice);

or maybe an enum would be a better way to achieve the argument naming.

Ben


Reply via email to