A while ago, skimming through emacs-orgmode mailing list, I read this message by Stefan Monnier:
I'm on a crusade to eradicate the `intangible' property, which happens to rub me the wrong way because it's implemented at too-low a level (it affects every point movement) which incurs a significant performance penalty (even when not used) and affects a lot of code which then needs to be fixed by binding inhibit-point-motion-hooks (which I'm considering defaulting to t).
Got me wondering about this inhibit-point-motion-hooks
variable. In what particular cases is it used?
Assuming Stefan's statement about "defaulting it to t" isn't motivated by weariness, does it make a difference to change its value globally? What about performance-wise?
point-entered
andpoint-left
in the same node of the manual.inhibit-point-motion-hooks
lets you prevent the associated hooks from running.(point-min)
and(point-max)
), Emacs now has to check if the underlying text has some magic text properties and, if so, ensure that the point is updated. This 1) is inefficient and 2) would confuse a lot of code that don't expect someone else to move the point. Fixing this can be done by either wrapping all those pieces of code with(let ((inhibit-point-motion-hooks t)) ...)
or by killing the feature.