GNU bug report logs - #15312
Info (point-entered, point-left): Doc incomplete, hence incorrect

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Mon, 9 Sep 2013 13:34:02 UTC

Severity: minor

Done: Jambunathan K <kjambunathan <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 15312 <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15312 <at> debbugs.gnu.org
Subject: Re: bug#15312: Info (point-entered, point-left): Doc incomplete,
 hence incorrect
Date: Tue, 10 Sep 2013 09:03:56 +0530
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Jambunathan K <kjambunathan <at> gmail.com>
>> Date: Mon, 09 Sep 2013 19:04:59 +0530
>> 
>> 
>> The info doc (see below) makes no mention of intervals/text properties.
>> It should mention what intervals.c actually does.
>
> What exactly does it not mention now, 

About text properties.  They need to be different.

> and under which circumstances will a Lisp programmer see that?

Does this question mean when will point-entered and point-left hook be
used (or used at all)?  I suggest that you look at table.el, gomoku.el,
landmark.el et.al.
----------------------------------------------------------------

Copy the snippet below to *scratch* buffer and eval them.  (I assume
that your *scratch* buffer is in emacs-lisp-mode and is colorful)

Keep C-f-ing and C-b-ing and see what happens.

You will see that entered and left get triggered when you move from a
text that has one face to another, NOT when they have the same faces.

    (defun --point-entered (&rest args)
      (message "entered: %s" args))

    (defun --point-left (&rest args)
      (message "left: %s" args))

    (add-text-properties (point-min) (point-max) 
                         '(point-left --point-left
                                      point-entered --point-entered))

----------------------------------------------------------------

Doc (makes) an (incomplete and) incorrect claim that the triggering of
hook depends SOLELY on the value of point-left and point-entered
properties.  It is NOT so.  The values of TEXT PROPERTIES should be
DIFFERENT at the transition point.




This bug report was last modified 11 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.