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


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15312 <at> debbugs.gnu.org, kjambunathan <at> gmail.com
Subject: bug#15312: Info (point-entered, point-left): Doc incomplete, hence incorrect
Date: Fri, 13 Sep 2013 12:28:14 -0400
> Sorry, I'm still in the dark.  Does the code presented in
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15312#11 work correctly
> and as expected, or does it not?

AFAICT, yes, it works fine.  The problem is one of documentation.

>> Clearly, this disagrees with:
>> ,----  (info "(elisp) Not Intervals")
>> | "What are the properties of this character?"  So we have decided these
>> | are the only questions that make sense; we have not implemented asking
>> | questions about where intervals start or end.
>> `----
>> And actually the above text is incorrect/incomplete in the sense that
>> next-single-property-change clearly implements a functionality that lets
>> you "ask questions about where intervals start or end".
> Actually, it doesn't disagree, if you keep in mind what RMS meant when
> he wrote that text (intervals can and do overlap, while runs of text
> properties cannot).

Right.  But it just goes to show that the situation is more subtle.
We should describe it more fully.

> But IMO that is a completely different issue.

IMO it is this exact issue.

Jambunathan wrote:
>    (mapc
>     (lambda (s)
>       (insert (propertize s  'mouse-face font-lock-comment-face)))
>     '("ab" "cd"))

you mean
     
    (dolist (s '("ab" "cd"))
      (insert (propertize s  'mouse-face font-lock-comment-face)))

> The intention of the programmer in the above case MAY have been to treat
> "ab" and "cd" differently.  
> But the way Emacs deals with them, it considers "abcd" as a single
> stretch and they are highlighted together.

Yes, exactly.  If you want them to appear separate you need to arrange
for the value to be non-eq, e.g.:

    (dolist (s '("ab" "cd"))
      (insert (propertize s  'mouse-face (list font-lock-comment-face))))


-- Stefan




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

Previous Next


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