On Sun, Apr 21, 2013 at 3:22 PM, Georg Baum
<georg.b...@post.rwth-aachen.de> wrote:
> Richard Heck wrote:
>
>> There are a couple issues here. One is the problem of branches.
>> Previously, we'd have "pasted" the copied paragraphs into the temporary
>> Buffer, and with it whatever branch insets were in the copied material,
>> not paying any attention at all to whether those branches existed, etc.
>> I'm not sure what that would mean for what would end up on the
>> clipboard. Probably we can just add a flag to the signature of
>> pasteSelectionHelper() that means: don't ask about this, just do it (or
>> not, which would be the old behavior).
>
> I'd simply create the branches. Does it have any drawback?
>
>> The other issue is the sigsev. Here the problem is that the temporary
>> Buffer we are using in putClipboard is static. So what we do to it
>> remains from call to call. We clear the paragraphs, at the end of that
>> routine, but we don't fully reset the Buffer's InsetText, which is why
>> we get the crash.
>>
>> So if you remove the static keyword, the crash vanishes, but that does
>> give a bit of a performance hit every time you copy something, because
>> we have to create a new Buffer, with a new tempdir, and so forth. What
>> we might want instead is a way to completely reset this temporary
>> Buffer. Another option would be to keep the static (empty) Buffer and
>> clone it each time, which ought to be cheap.
>
> I did this, and it works fine.
>
>> By the way, I note that this copy is also very slow, because we are
>> converting images to formats suitable for XHTML export, which never get
>> used. We probably need another flag that means: don't do that, or bother
>> creating math images, etc. We might also want to force math to be export
>> as HTML, since the clipboard probably does not know what to do with
>> MathML.
>
> I changed it to use MathML. Before copying HTML, only plaintext was copied,
> which did not play well to formulas at all. Now, there is at least the
> chance to recover formulas by applications that understand MathML (MS Office
> is supposed to understand it). If MathML is not understood, some
> applications (e.g. libreoffice) are still able to display the pure text,
> which is very similar to the plain text export.
>
> BTW, thanks for fixing the update problem.

Is this still being worked on or is it supposed to be fixed? I still
get SIGSEGVs. To reproduce, open Help > Introduction, select all, and
do "ctrl + c" and then "ctrl + c" again quickly after the first one.
Or do "ctrl + c", wait for the copy to finish, and then do "ctrl + c"
twice more.

Scott

Reply via email to