unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Overlay tree. Stuck again
@ 2017-01-12 21:10 Joakim Jalap
  2017-01-13  8:12 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Joakim Jalap @ 2017-01-12 21:10 UTC (permalink / raw)
  To: emacs-devel

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
again.

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-02-03 12:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-12 21:10 Overlay tree. Stuck again Joakim Jalap
2017-01-13  8:12 ` Eli Zaretskii
2017-01-13 11:56   ` Joakim Jalap
2017-01-13 13:22     ` Fabrice Popineau
2017-01-13 14:20       ` Joakim Jalap
2017-01-13 13:54     ` Eli Zaretskii
2017-01-13 14:26       ` Joakim Jalap
2017-02-03  8:27     ` Andreas Politz
2017-02-03  8:28     ` Andreas Politz
2017-02-03 12:35       ` Joakim Jalap
2017-02-03  8:28     ` Andreas Politz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).