awth13 / org-appear

Toggle visibility of hidden Org mode element parts upon entering and leaving an element
MIT License
375 stars 19 forks source link

emphasis toggled off when editing #56

Open tomibennett opened 11 months ago

tomibennett commented 11 months ago

Hello,

Thank you for your work.

I encounter an issue when upon edition of an emphasis text, the markers disappear, only to reappear when moving the pointer.

I have org-hide-emphasis-markers set to t and org-appear-mode enabled. If I set org-appear-trigger to 'on-change, then the markers are never shown.

Did I misconfigured the package or is it a bug? I would like them to be displayed as long as my pointer is in the range of emphasis markers. Much like what is shown on the README.

awth13 commented 4 months ago

Hello, @tomibennett!

I am sorry it took me a while to respond. The 'on-change mode of toggling means that elements are toggled only when an element is clicked with a mouse or when the buffer is modified. What the latter means depends on whether you use evil but by default nothing is going to be toggled until you start inserting or deleting characters.

Let me know if this helps!

Roger-Roger-debug commented 4 days ago

I think I just stumbled on the same issue. I'm using evil (and the evil hook), maybe that plays into it?

I think the only way I have found to reliably trigger the bug is to add highlighting in a table, so something like this:

| /minimal/ | *case* |

When I type a letter while inside either of the emphasis markers said markers get shown for a moment and then vanish again. The same can happen outside of tables but I don't know how I'm triggering the bug there. If I manage to trigger it the bug will persist until I delete all emphasis markers in the buffer (I think?).