I agree that adding this functionality as additional options to
org-hide-emphasis-markers would be more intuitive and elegant for
users, as
they wouldn't have to perform (add-hook 'org-mode
#'org-auto-emphasis-mode) in order to enable this mode. I didn't
implement
it this way first because I wanted to make the simplest, least
disruptive
way possible, and secondly because I didn't quite know how to
implement it
:-). As you can see in the patch, besides the additional functions and
variables, my code only modifies one preexisting org function,
replacing
four lines with my new eight lines.
To implement this functionality in the way Gustavo suggests, we would
have
to for all users add org-auto-emphasis--post-command-hook to
post-command-hook, and modify it so that it only operates when
org-hide-emphasis-markers is 'not-at-point or
'not-at-point-right-edge. I
can try to implement this if you think it would be a good idea, but I
have
one concern. Even if a user is not interested in
org-auto-emphasis-mode,
this implementation would add a small amount of code to
post-command-hook,
so would have the effect of slightly slowing down their system.