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: Wed, 08 Feb 2017 09:18:23 +0100 Message-ID: <87inolm6y8.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> <87d1evod6x.fsf@fastmail.com> <877f53ftab.fsf@hochschule-trier.de> <878tpiqiuc.fsf@hochschule-trier.de> <87shnppspb.fsf@hochschule-trier.de> <87lgthplhr.fsf@hochschule-trier.de> <87mvdxmavi.fsf@fastmail.com> <874m05p252.fsf@hochschule-trier.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486541926 19872 195.159.176.226 (8 Feb 2017 08:18:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 8 Feb 2017 08:18:46 +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 Wed Feb 08 09:18:38 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 1cbNSX-0004fX-W5 for ged-emacs-devel@m.gmane.org; Wed, 08 Feb 2017 09:18:38 +0100 Original-Received: from localhost ([::1]:58226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbNSa-0000nW-6E for ged-emacs-devel@m.gmane.org; Wed, 08 Feb 2017 03:18:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbNSR-0000nF-72 for emacs-devel@gnu.org; Wed, 08 Feb 2017 03:18:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbNSM-0006hI-BR for emacs-devel@gnu.org; Wed, 08 Feb 2017 03:18:31 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:48206) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cbNSM-0006gu-4P for emacs-devel@gnu.org; Wed, 08 Feb 2017 03:18:26 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 6C49520A4C; Wed, 8 Feb 2017 03:18:25 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 08 Feb 2017 03:18:25 -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=9tB1BIMI2QYHbxakeVn033lYWXY=; b=GPjcav IwHIvMOU0GQB//4oM4bu+EZMfb0clDe0i0uX8e0hwNEpJ5c3rXK73kdCg8lxGGQ9 l7B/ZM/+rgqH0WSLvdte6CwEP1TGYdpQQDE3Yl9cLUJsByfcm2yMFs3cfgs9w7dq IryTv0YvcUtJmjIX4ymCeouJY/pgeCtU8WomM= 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=9tB1BIMI2QYHbx akeVn033lYWXY=; b=B7G0ZjdcKjzzTvx+lzZ21D9qxJ1GnAbrVBWyyDOZ4uEXCl YKfrVwaWSakICHIteejSwQpHfZrlgjqXo1bgyK0LzfnkKC3VzvxiCP8CPBbj2N/h QAy9z0OFUEW0p/ni3k1NHXrh+d26by5QsPneJkL+5/hVmzD49tAqhP7KnhxrY= X-ME-Sender: X-Sasl-enc: IQLhM0lmO/Xp4LV1FpfPAw+VNTL7yCcw2F7BuL3BizHG 1486541905 Original-Received: from genserv (unknown [5.150.202.248]) by mail.messagingengine.com (Postfix) with ESMTPA id ADCF77E34E; Wed, 8 Feb 2017 03:18:24 -0500 (EST) In-Reply-To: <874m05p252.fsf@hochschule-trier.de> (Andreas Politz's message of "Wed, 08 Feb 2017 08:34:01 +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:212127 Archived-At: Andreas Politz writes: > Joakim Jalap writes: > >> Andreas Politz writes: >> >>> [...] wading through the current overlay code [...] > >> FWIW I've allready all this boring stuff. I you want you can look at my >> branch at https://github.com/jockej/emacs-mirror2 branch >> arne-without-parent. > > I already did, although briefly. I think its even in the upstream repository (?). Which upstream repository are we talking about? >> The interface is always the same*: Gather all the interesting overlays in >> a vector. [...] > > Yes, but I'm trying to get a little bit behind that. For example there > is a common idiom of > > 1. gather overlays in a vector > 2. sort by prioriy > 3. determine the effective value of some property at some position Actually I think 2 is not that common. Anyway I decided to keep the existing function for sorting overlays, since that seemed simpler. > So there should be a function answering question No. 3 without necessarily going > through steps 1 and 2 . I think I have done that. For example there are the next_ptr and prev_ptr arguments to overlays_at. I got rid of those and instead introduced separat functions to find next overlay start/end. I also got rid of the extend argument to overlays_at and friends. In my version the vector is always extended if necessary. Anyway, I will leave you to it. -- Joakim