From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jonas Bernoulli" Newsgroups: gmane.emacs.devel Subject: point-[left|entered] not called when supposed to Date: Wed, 21 May 2008 12:16:41 +0200 Message-ID: <201bac3a0805210316h4b0bd8f3jda904cd4cc7873fc@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211365132 27629 80.91.229.12 (21 May 2008 10:18:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 May 2008 10:18:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 21 12:19:30 2008 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 1JylPm-0003WK-0V for ged-emacs-devel@m.gmane.org; Wed, 21 May 2008 12:19:22 +0200 Original-Received: from localhost ([127.0.0.1]:51630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JylP1-0001is-LH for ged-emacs-devel@m.gmane.org; Wed, 21 May 2008 06:18:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JylNF-0000zH-70 for emacs-devel@gnu.org; Wed, 21 May 2008 06:16:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JylND-0000yW-Cv for emacs-devel@gnu.org; Wed, 21 May 2008 06:16:44 -0400 Original-Received: from [199.232.76.173] (port=42406 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JylND-0000yS-9v for emacs-devel@gnu.org; Wed, 21 May 2008 06:16:43 -0400 Original-Received: from nf-out-0910.google.com ([64.233.182.191]:17425) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JylNC-0004Lf-VE for emacs-devel@gnu.org; Wed, 21 May 2008 06:16:43 -0400 Original-Received: by nf-out-0910.google.com with SMTP id c7so1193887nfi.26 for ; Wed, 21 May 2008 03:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=Omtl6YMbUXXgBoDCPBYNs8XCRR5fCz77zd+3d/N6idA=; b=Qn+C2W5bAxfXoAC3wtj7Iz8PsNE1QAbTgQODjJrF70j3cQO/Vp0ifhl+EvY/twLjPJ+f5hktEaZ0J2ewSiX81/+nKe8KBEbnrMD6Ztaj91ywOILj2d9UzWGygqBVj0PlQxmjPwWvt5pYqfZLGi7vXivzB8+8YOLz7avquyR5YHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=m9thPlF4dRLF2FHJ/WSkDhTlnM2b2nQQjiHhXPg1HjA/A0hepc5F8XamxfSIV8bntzm4t+o/CxIchmbBGdSx8DE3P6uHsE0W9PT2xorO/ASA5KWYt2AgOTK88vmfPmwPTKU+3gQwI5h00hZ2Yq/UOGHCGzB5f07B0elABAa+ahE= Original-Received: by 10.210.77.3 with SMTP id z3mr9105933eba.151.1211365001270; Wed, 21 May 2008 03:16:41 -0700 (PDT) Original-Received: by 10.210.113.7 with HTTP; Wed, 21 May 2008 03:16:41 -0700 (PDT) Content-Disposition: inline X-Google-Sender-Auth: f5f55435b5bc2af1 X-detected-kernel: by monty-python.gnu.org: 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:97476 Archived-At: In the elisp manual I found this: The special properties `point-entered' and `point-left' record hook functions that report motion of point. Each time point moves, Emacs compares these two property values: * the `point-left' property of the character after the old location, and * the `point-entered' property of the character after the new location. However it seams that the `point-left' properties of the two points are being compared not `point-left' to `point-entered'. Here is some code that demonstrates this: (defun left-entered-demo () (interactive) (switch-to-buffer-other-window "*left-entered-demo*") (insert (propertize "12345" 'point-entered (lambda (old new) (message "entered %s" new)) 'point-left (lambda (old new) (message "left %s" old))))) Moving forward one character at the time all the way to the beginning of the buffer I get this: left 6 entered 5 [2 times] left 2 [2 times] entered 1 But from the description above I expect both functions to be called twice every time the cursor moves. I very much hope you fix the code not the documentation because I the current behavior complicates things a lot for me. Thx -- Jonas