From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Overalays and point-entered Date: Thu, 24 Sep 2009 10:07:17 +0900 Message-ID: <87k4zpywu2.fsf@uwakimon.sk.tsukuba.ac.jp> References: <5e3a506e0909101709u2259d56h25f3ef1ec67326aa@mail.gmail.com> <5e3a506e0909101902h72747299u2e306830ce63b11d@mail.gmail.com> <5e3a506e0909102108h381957cahfcaa681baa4abf@mail.gmail.com> <5e3a506e0909130947m1669cda0y25d13a5e8dcd85df@mail.gmail.com> <5e3a506e0909140810r38a83a84l387fb6bafeb962c1@mail.gmail.com> <5e3a506e0909161346w1d5a8bebp84f1d51f0f446f28@mail.gmail.com> <5e3a506e0909230841i1d87b7ep397f2809e2cbdef9@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253753905 2483 80.91.229.12 (24 Sep 2009 00:58:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2009 00:58:25 +0000 (UTC) Cc: Nathaniel Flath , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 24 02:58:18 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mqcf3-0005el-S1 for ged-emacs-devel@m.gmane.org; Thu, 24 Sep 2009 02:58:18 +0200 Original-Received: from localhost ([127.0.0.1]:56404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mqcf3-0000nu-2j for ged-emacs-devel@m.gmane.org; Wed, 23 Sep 2009 20:58:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mqcex-0000nX-Lz for emacs-devel@gnu.org; Wed, 23 Sep 2009 20:58:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mqces-0000n4-B6 for emacs-devel@gnu.org; Wed, 23 Sep 2009 20:58:10 -0400 Original-Received: from [199.232.76.173] (port=42623 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mqces-0000n1-1V for emacs-devel@gnu.org; Wed, 23 Sep 2009 20:58:06 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:39822) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mqcer-0006uC-IO for emacs-devel@gnu.org; Wed, 23 Sep 2009 20:58:05 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 5D550820F; Thu, 24 Sep 2009 09:58:02 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 610FA1A27EE; Thu, 24 Sep 2009 10:07:18 +0900 (JST) In-Reply-To: X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" 02b7c7189041+ XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115567 Archived-At: Stefan Monnier writes: > Yes, you'd need to implement a get-overlays-at-pos. This is non-trivial to implement efficiently. The XEmacs implementation is so (perhaps unnecessarily) complex that Richard once wrote: I looked at the Lucid Intervals code, intending to merge it in, but changed my mind because I couldn't understand it. (Presumably this should be understood as a cost vs. benefit tradeoff, not an absolute impossibility, of course.) It may not be as hard as Jamie? and Ben have made it, but I assure you performance of this function will be important. The best I've been able to think of in alternative implementations is (I hope) O(log buffersize) for this function, but the space cost is quite large, O(buffersize). (The constant for XEmacs, which implements text properties using these objects, is at least 0.25 in regex.c in CC Mode on a 32-bit machine, and would be nearly twice as much on a 64-bit machine because the additional data structures contain many pointers.)