[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cursor-invisible-mode
From: |
Stefan Monnier |
Subject: |
Re: cursor-invisible-mode |
Date: |
Wed, 22 May 2019 17:18:30 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> There is cursor-intangible-mode in cursor-sensor.el, but I wonder why
> it has no cursor-invisible-mode?
Because the purpose of cursor-intangible-mode and cursor-sensor-mode is
to make the `intangible`, `point-entered`, and `point-left` properties
(along with inhibit-point-motion-hooks variable) obsolete.
> When implemented it could treat the text that has the 'invisible'
> property by expanding when cursor moves inside, and then contracting
> when it's out again like is demonstrated in
> https://debbugs.gnu.org/35624#104
It's called `reveal-mode` (and no, currently it doesn't work with
text-properties, only with overlays. Still waiting for someone to
write the code for that).
> Another case where such mode could help that comes to mind is the
> grep-find-abbreviate feature, where instead of pushing the button
> to expand/contract the hidden part enabling cursor-invisible-mode
> could expand/contract it when the cursor moves inside.
It seems cursor-sensor-mode could also be a good fit for this one.
Stefan