Hi Shankar,
Detailed comments are up for Kyle, or someone more qualified than
myself, but I leave one further comment regarding the suggestion I had
made.
On Wed, 24 Jun 2020 at 09:53, Shankar Rao <shankar....@gmail.com> wrote:
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.
You have a good point here. When I made the suggestion I was naively
thinking the featured could be plugged/hooked somewhere in Org, when
fontification is done. But that's not really true, as the feature
requires being run every time the point moves too. So, as far as I can
tell, it seems using post-command-hook is unavoidable, and if so, you
are right in not wanting to add some load to it for everyone, regardless
of whether they want this feature or not. You and Kyle have me
convinced here.
And thanks again!
Best,
Gustavo.