From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: overlays vs text properties Date: Wed, 13 Jul 2011 07:55:51 -0700 Message-ID: References: <87k4bmk8u3.fsf@ericabrahamsen.net> <87tyaqiqz8.fsf@ericabrahamsen.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310576221 10946 80.91.229.12 (13 Jul 2011 16:57:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 16:57:01 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "'Eric Abrahamsen'" , "'Eli Zaretskii'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 13 18:56:57 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qh2k4-0007Aa-AE for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jul 2011 18:56:56 +0200 Original-Received: from localhost ([::1]:48485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh2k2-0008S0-VM for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jul 2011 12:56:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh0rF-0000BD-CU for help-gnu-emacs@gnu.org; Wed, 13 Jul 2011 10:56:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qh0rC-0000Uk-B9 for help-gnu-emacs@gnu.org; Wed, 13 Jul 2011 10:56:13 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:57883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh0r9-0000Tq-1T; Wed, 13 Jul 2011 10:56:07 -0400 Original-Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p6DEtxP4007994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Jul 2011 14:56:01 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p6DEtw89002679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Jul 2011 14:55:58 GMT Original-Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p6DEtqLw018674; Wed, 13 Jul 2011 09:55:52 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Jul 2011 07:55:52 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87tyaqiqz8.fsf@ericabrahamsen.net> Thread-Index: AcxBZTfEmydp0qrcRzKvfxjiANMrtQABrEEg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090206.4E1DB201.00D5:SCFSTAT5015188, ss=1, re=-4.000, fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81571 Archived-At: I don't have much to offer here that hasn't been said already. FWIW - It sounds to me like overlays are best suited for what you want to do. Checking for point movements in/out of the overlay: How often and when do you need to do it? If you need to do it after each user interaction, then maybe do it in `post-command-hook'. If you can avoid using that hook, great (it tends to be overused, in general). But if that's when you need to check, then that's probably the best approach I can think of. (To check, just see whether point is inside the overlay. To know whether that state represents a change you will likely need to save the last in/out state and compare.)