From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joakim Jalap Newsgroups: gmane.emacs.devel Subject: Re: Overlays as an AA-tree Date: Mon, 06 Feb 2017 10:56:06 +0100 Message-ID: <87d1evod6x.fsf@fastmail.com> References: <87d1jylv43.fsf@fastmail.com> <87fujv64mn.fsf@hochschule-trier.de> <87fujvpkzc.fsf@fastmail.com> <87vasr5tqd.fsf@hochschule-trier.de> <87d1ex4kon.fsf@hochschule-trier.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486374987 11740 195.159.176.226 (6 Feb 2017 09:56:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2017 09:56:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (berkeley-unix) Cc: Stefan Monnier , emacs-devel@gnu.org To: Andreas Politz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 10:56:21 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cag20-0002jG-2V for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 10:56:20 +0100 Original-Received: from localhost ([::1]:46378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cag25-0000Th-IO for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 04:56:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cag1u-0000Re-8n for emacs-devel@gnu.org; Mon, 06 Feb 2017 04:56:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cag1r-00078Z-1W for emacs-devel@gnu.org; Mon, 06 Feb 2017 04:56:14 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52093) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cag1q-00077u-QT for emacs-devel@gnu.org; Mon, 06 Feb 2017 04:56:10 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C09A32086F; Mon, 6 Feb 2017 04:56:08 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 06 Feb 2017 04:56:08 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Cnw3PiUtKiPhQSUs6T+4WOAsBaI=; b=kfWP9E Ei1fAI1qKy/dvNgJmgTzDV/dQvH4P2i8fCH30vzPnZyzmf5sQd1mp9fLbdKoGTrO LoUOdBO/3y02QazHdCNAgi8DGDRjBptF7wqtCUoVbtp75j8Q+MzJdxg6xbLofP0W 3ze5gGFCYSOz0XGYp2CqMl/nspCsS3RKsuyO0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Cnw3PiUtKiPhQS Us6T+4WOAsBaI=; b=Rlbv1voLIZNR5jmZVGq5VV21WaDMdLJvwy3DXMNeCDOtkp MEhUOGjeLxy+N4xVz8536lxE7MVmxtNkZmpDf6EYrm2RoYimc+xnP1hBJKV+wJ8Q kqwZ7sxYaC7l6E+CoDJ3bKpKBk8o7j4qGvv5eL/ieuYznhhoRUE60tx/hxn6Y= X-ME-Sender: X-Sasl-enc: CRCOsBv+xRC2lNd9gqTVQ7ovkrKcOnY2OoJy4dERFKsX 1486374968 Original-Received: from genserv (unknown [5.150.202.248]) by mail.messagingengine.com (Postfix) with ESMTPA id F30537E6F6; Mon, 6 Feb 2017 04:56:07 -0500 (EST) In-Reply-To: <87d1ex4kon.fsf@hochschule-trier.de> (Andreas Politz's message of "Sun, 05 Feb 2017 00:10:00 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212022 Archived-At: Andreas Politz writes: > Stefan Monnier writes: > >>> If I'm right, we *could* use [two trees] [...] >> >> But I don't think this one is an efficient solution. I'm not even sure >> it will lead to simpler code (at least I'm pretty sure it will lead to >> more code). > > Yes, I'm not in favour of it either. > And here I thought it was rather an elegant solution :) (to the problem of one overlay's beg going past another's because of an insert). What's a better way? When adjusting for an insert at an overlay with front-advance non nil, first delete it from the tree, then reinsert it? Isn't there a risk the tree becomes unbalanced otherwise?