From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathaniel Flath Newsgroups: gmane.emacs.devel Subject: Re: Overalays and point-entered Date: Thu, 24 Sep 2009 09:47:27 -0400 Message-ID: <5e3a506e0909240647k18368e10o6e5391a70a79e8@mail.gmail.com> References: <5e3a506e0909101709u2259d56h25f3ef1ec67326aa@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: multipart/alternative; boundary=000e0cd153e6791c3004745312b4 X-Trace: ger.gmane.org 1253800071 26979 80.91.229.12 (24 Sep 2009 13:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2009 13:47:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 24 15:47:44 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 1Mqofd-0001JD-Vw for ged-emacs-devel@m.gmane.org; Thu, 24 Sep 2009 15:47:42 +0200 Original-Received: from localhost ([127.0.0.1]:49355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mqofd-0006Mb-IU for ged-emacs-devel@m.gmane.org; Thu, 24 Sep 2009 09:47:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqofX-0006Li-Lh for emacs-devel@gnu.org; Thu, 24 Sep 2009 09:47:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqofR-0006Jm-Hw for emacs-devel@gnu.org; Thu, 24 Sep 2009 09:47:33 -0400 Original-Received: from [199.232.76.173] (port=50231 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqofR-0006Ji-Ac for emacs-devel@gnu.org; Thu, 24 Sep 2009 09:47:29 -0400 Original-Received: from mail-px0-f202.google.com ([209.85.216.202]:51622) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqofQ-0006bE-SJ for emacs-devel@gnu.org; Thu, 24 Sep 2009 09:47:29 -0400 Original-Received: by pxi40 with SMTP id 40so1788533pxi.24 for ; Thu, 24 Sep 2009 06:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=RoU2shOGlm6OW5Yx9cogTBUkCHYZiPvcaEnrZux+qi4=; b=BTUxhfLyq31muM/c/9wR3nJ2G89gCOw+FAm+7iq75WnGtIu3MiuLf5vR8YfAnzzgXN LcepiC+rJ1z0df9d7CFAwxmndIQd/Q/++vNkGH8tDDRxl33DN8Ul518/xvChQuZiopjP VWN+Tfa7T62AwPurePQcdYMkHNnKFkdt6sfho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ZZMIGm/oBLTaOMYmwWHd1l62E0l6UqPGNQ8bgO5jfH+TrLz198ChIN3KwMd2imi57Y NoHXLgROyqsljGwALah7VfGfl+7wYhQR/yOM6boGl9OwoEiMDch70bIBTE28IwhtQBAO OmZYgMJqt6JbHpiv5dHo1P6rsVAQIFW1QG6Lw= Original-Received: by 10.140.192.18 with SMTP id p18mr11032rvf.168.1253800047876; Thu, 24 Sep 2009 06:47:27 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:115577 Archived-At: --000e0cd153e6791c3004745312b4 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Sep 23, 2009 at 4:55 PM, Stefan Monnier wrote: > > Since the main point I was implementing this was so I could add these > > properties to overlay, I'd prefer a solution that works better with them. > > Yes, I understand that, and I agree it should work well with overlays > as well. > > > Would it be better to store overlays at point at the end of this loop, > and > > use this instead of looking up old points? > > Might be, yes. > > > To solve the boundary-control issue, I could look at get-pos-property > > and use the same mechanism it does for controlling boundary behaviour. > > Yes, you'd need to implement a get-overlays-at-pos. > Stefan > Actually, instead of this, why not add an extra optional argument that defaults to nil to get-pos-property? If the argument is non-nil, get-pos-property would return a list of the values named property at pos instead of just one of them. This way wouldn't duplicate boundary-checking functionality. Thanks, Nathaniel Flath --000e0cd153e6791c3004745312b4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Wed, Sep 23, 2009 at 4:55 PM, Stefan = Monnier <m= onnier@iro.umontreal.ca> wrote:
> Since the main point I was implementing this was so = I could add these
> properties to overlay, I'd prefer a solution that works better wit= h them.

Yes, I understand that, and I agree it should work well with overlays=
as well.

> Would it be better to store overlays at point at the end of this loop,= and
> use this instead of looking up old points?

Might be, yes.

> To solve the boundary-control issue, I could look at get-pos-property<= br> > and use the same mechanism it does for controlling boundary behaviour.=

Yes, you'd need to implement a get-overlays-at-pos.
=A0 =A0 =A0 =A0Stefan
Actually, instead of this, why not add an extra o= ptional argument that defaults to nil to get-pos-property?=A0 If the argume= nt is non-nil, get-pos-property would return a list of the values named pro= perty at pos instead of just one of them.=A0 This way wouldn't=A0 dupli= cate boundary-checking functionality.

Thanks,
Nathaniel Flath
--000e0cd153e6791c3004745312b4--