"J.D. Smith" <[email protected]> writes:

> The approach:
>
> 1. Apply `rear-nonsticky=(... invisible)' to both the front and back
>    hidden markers.

> 2. Change cursor (from box to bar), when edits would occur /inside/ the
>    markers of the emphasized text.  This requires placing cursor sensor
>    functions on the entire emphasized text (save the leftmost marker).
>
> The `rear-nonsticky' property causes the display engine to place point
> on the RHS/LHS of the hidden markers depending on what side they are
> /approached from/ (from outside direction: stay out; from inside
> direction: stay in).  The video linked below should make this clearer.
>
> This could potentially be a minor-mode — `org-hidden-cursor-mode' or so
> — which could allow customizing the "inside" cursor type/color, etc.  It
> could apply to keywords, links, etc. as well.  It would need to turn on
> `cursor-sensor-mode'.
>
> Find more details, the several lines of code implementing this for
> emphasized text, and a video demo, here:
>
>   https://gist.github.com/jdtsmith/87ce361830466dd9ab2e304d17ddc2e4
>
> Happy to contribute some code for this if you think it could be a good
> fit for Org.

Sounds interesting.
I have been thinking to incorporate org-appear approach itself (maybe
with an option to reveal the whole line at point), but I can see how
your approach can be less distracting.
Maybe it can also be a basis to have multiple ways to handle
invisible boundaries - cursor change, org-appear-like reveal of the link
at point, relealing the whole line.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to