unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* cursor-invisible-mode
@ 2019-05-22 20:45 Juri Linkov
  2019-05-22 21:18 ` cursor-invisible-mode Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2019-05-22 20:45 UTC (permalink / raw)
  To: emacs-devel

There is cursor-intangible-mode in cursor-sensor.el, but I wonder why
it has no cursor-invisible-mode?  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

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.

Maybe also cursor-invisible-mode could simplify the handling of 'open'
value of 'search-invisible' in isearch, not sure about that.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cursor-invisible-mode
  2019-05-22 20:45 cursor-invisible-mode Juri Linkov
@ 2019-05-22 21:18 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2019-05-22 21:18 UTC (permalink / raw)
  To: emacs-devel

> 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-22 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-22 20:45 cursor-invisible-mode Juri Linkov
2019-05-22 21:18 ` cursor-invisible-mode Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).