[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overlay tree. Stuck again

From: Joakim Jalap
Subject: Overlay tree. Stuck again
Date: Thu, 12 Jan 2017 22:10:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (berkeley-unix)

Hello Emacs Devs.

As ever, I've been hacking on the overlay tree branch. Now it's turned
sour again though.

For those it may concern this is the problem: The overlays in the tree
are ordered first by their start position, if that is the same we look
at the end position, if that is also equal we order by memory address.

However the nodes can be updated "externally" from the trees point of
view. For example if there is a delete in the buffer those overlays
which were in the deleted portion of the buffer will now be crowded at
the from_char of the delete. But those could have any address, so they
will probably be out of order. The problem is how to get them in order

As far as I've gotten is to gather all the affected nodes (which I think
are only those of length zero which start (and end) at from_char) into
an array and sort that. But I can't figure out how to get them into the
tree again while keeping all the pointers correct.

My feeble attempts can be seen at
https://github.com/jockej/emacs-mirror1, branch arne-without-parent.

I've been wrestling with this for a while now. I'm starting to think
this whole approach is... not so good. But if anyone has a brilliant
idea I'd be glad to hear it :)

Happy hacking!

-- Joakim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]