Jens Schmidt <[email protected]> writes:

> Upfront: Thanks for your changes.  You haven't pushed them yet, have
> you?  At least I'm still up-to-date on e3ccd22 after a pull.

Apologies, I had forgotten to push; done.

> That is my problem as well - I know that having o-i-t-h feels good on
> C-c C-c, but I'm not sure how it feels in the org-reveal context.

Yes!  It feels super natural on C-c C-c.  I think I'll put it there and
see how people like it; done now.

>> Indeed, I have seen that behavior too.  Exit overlays are important for
>> things like links that are more than one hidden char on each side.  Font
>> lock does not remove the overlay, and it isn't really the place to look
>> for entities gone bad.
>>
>> I think I have a solution.  I have now implemented an overlay
>> modifications-hooks function, which I use to detect (using org-element)
>> when the overlay should "self destruct".  Please give a try.  Looks good
>> in my tests.
>
> Will test after I get the latest commits.  Here is another idea I came
> up with.  It is completely untested and it may not even work.  Plus I
> cannot say how it in practice compares to your solution.  If it worked
> it would have probably the advantage of not using yet another hook type:
>
> - In `org-inside--sensor' and on enter, add another cursor sensor
>   function `org-inside--detect-removal' to the text property span just
>   entered - and only to that, do not add it to the overlay.
>
> - Now when font-locking removes the text property because markers or
>   link markup have changed, I expect `org-inside--detect-removal' to get
>   called with exit direction, what could be used to remove the overlay.

In my testing removing a cursor-sensor property unfortunately does not
call the sensor function(s) at all; if it did I think we'd be able to
get away with adding nothing.  Give my modification-hooks version a
test; it's a fairly simple addition to the overlay.  It only ever fires
when you are "inside" (and hence the overlay is brought into the
buffer).

> Thanks for working on these, too, but here I'm also interested to see
> what exactly you have implemented, so I'll postpone my comments.

Take a look, thanks for all the careful attention.

Reply via email to