GNU bug report logs - #33664
26.1; Document vars and functions in `cursor-sensor.el'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 7 Dec 2018 15:16:02 UTC

Severity: wishlist

Found in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 33664 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: RE: bug#33664: 26.1; Document vars and functions in `cursor-sensor.el'
Date: Sun, 9 Dec 2018 12:56:51 -0800 (PST)
> > Specifically, I'd like to know some behavior
> > differences - examples of when `intangible' text
> 
> With `intangible` you can have a situation where a chunk of code does
> 
>     (goto-char POS)
>     BLAH
>     BLAH
>     BLAH
> 
> and it misbehaves because BLAH BLAH BLAH expects to run with point at
> POS,
> but some other package added an `intangible` property so the goto-char
> actually ended up putting point somewhere else.
> 
> IOW `intangible` breaks all kinds of invariants like
> 
>     (point) == (progn (forward-char N) (forward-char -N) (point))
>     (+ N (point)) == (progn (forward-char N) (point))
> 
> [ Admittedly these invariants aren't true when you bump into EOB but
>   a lot of code is prepared to deal with odd cases at EOB but is not
>   prepared for such surprises happening virtually anywhere.  ]

Thank you.  I think it would be good if you would
add this info (exactly what you wrote is fine) to
the Commentary.

Besides the difference in positions, aren't there
other important differences that come from the
`intangible' property changing Emacs behavior at
a low level rather than in pre-display?  Is it
possible that someone might take advantage of that
earlier, or lower-level, reaction?

It seems (to me, so far) like maybe the behavior
difference you described should not be cause for
deprecating text property `intangible'.  It might
be cause for recommending to generally use
`cursor-intangible-mode' instead.  It sounds like
both should probably be offered, with a description
of the differences.

Just one, hardly informed, opinion.




This bug report was last modified 5 years and 224 days ago.

Previous Next


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