From: Gustavo Barros <gusbrs.2016@gmail.com>
To: Shankar Rao <shankar.rao@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region
Date: Wed, 24 Jun 2020 10:49:30 -0300 [thread overview]
Message-ID: <87mu4svaj9.fsf@gmail.com> (raw)
In-Reply-To: <CAGEgU=httRszKo_Yj=X+U4UYKwWtbQMPCunfyM187B+QzWodKw@mail.gmail.com>
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.rao@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.
next prev parent reply other threads:[~2020-06-24 14:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 14:14 [PATCH] Add mode for automatically unhiding emphasis markers in the current region Shankar Rao
2020-06-01 15:33 ` Shankar Rao
2020-06-22 5:40 ` Kyle Meyer
2020-06-22 11:25 ` Gustavo Barros
2020-06-23 0:07 ` Kyle Meyer
2020-06-24 12:53 ` Shankar Rao
2020-06-24 13:49 ` Gustavo Barros [this message]
2020-06-24 15:46 ` Nicolas Goaziou
2020-06-24 16:34 ` Shankar Rao
2020-06-26 7:32 ` Nicolas Goaziou
2020-07-03 15:19 ` Shankar Rao
2020-07-05 10:50 ` Nicolas Goaziou
2020-07-05 20:49 ` Gustavo Barros
2020-07-06 14:01 ` Gustavo Barros
2020-07-07 15:57 ` Shankar Rao
2020-06-24 17:27 ` Gustavo Barros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mu4svaj9.fsf@gmail.com \
--to=gusbrs.2016@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=shankar.rao@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).