bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Drew Adams
Subject: 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]