Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-07-07 Thread Shankar Rao
Thank you for your hard work on this. It's definitely easier to compare two concrete blocks of code rather than abstract ideas. > I agree with you that my solution is somewhat intrusive. Ideally, I would > > have preferred that my solution could leverage advice functions or some > Org > > hook,

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-07-06 Thread Gustavo Barros
Hi Nicolas, Hi All, On Sun, 05 Jul 2020 at 17:49, Gustavo Barros wrote: A fourth issue is point placement after the emphasis is added. `org-emphasis' takes a stance here and places point within the emphasis. I do agree with this option, but it is still true that sometimes, one might want

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-07-05 Thread Gustavo Barros
Hi Nicolas, Hi All, On Sun, 05 Jul 2020 at 07:50, Nicolas Goaziou wrote: The problem is not your implementation, really. It's just that I don't think it should be the _built-in_ way to solve emphasis management. IOW, we shouldn't need to activate a minor mode to make that management

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-07-05 Thread Nicolas Goaziou
Hello, Shankar Rao writes: > I agree with you that my solution is somewhat intrusive. Ideally, I would > have preferred that my solution could leverage advice functions or some Org > hook, so that I wouldn't have to modify org.el, but it doesn't seem like > there is a straightforward way to do

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-07-03 Thread Shankar Rao
Hi, I wrote my message in a hurry. Let me clarify it. > > I'm only talking about built-in tooling. I don't mind if a user have the > feature you're proposing, of course, as it is not wrong per se. > > However, I believe that's not the best solution for the problem we're > trying to solve. I think

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-26 Thread Nicolas Goaziou
Hello, Shankar Rao writes: > I agree that if org-emphasize handled marker visibility states in a DWIM > fashion, then a user should not need to display them, but why do you > believe they shouldn't have the opportunity, especially given that this is > the exact behavior of

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-24 Thread Gustavo Barros
Hi Nicolas, On Wed, 24 Jun 2020 at 12:46, Nicolas Goaziou wrote: Hello, Gustavo Barros writes: 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,

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-24 Thread Shankar Rao
> Sorry for being late to the party, but, IMO, this doesn't sound like > a right approach to the problem of invisible emphasis markers. A user > choosing to hide emphasis markers should not need to—or even be given > the opportunity to—display them in order to edit them efficiently. > I agree

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-24 Thread Nicolas Goaziou
Hello, Gustavo Barros writes: > 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.

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-24 Thread Gustavo Barros
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 wrote: I agree that adding this functionality as additional options to

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-24 Thread Shankar Rao
Kyle, Gustavo, Thank you both for your detailed feedback. Attached is a new version of the patch that incorporates most of your suggestions. >> I have not yet signed the papers assigning copyright to the FSF. I sent > a > >> request for the papers to ass...@gnu.org, but have not yet received a

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-22 Thread Kyle Meyer
Gustavo Barros writes: > Just an user here, but I'd like to leave my +1 to this proposed feature. > [...] Thanks. That's very useful feedback. > I can add another thought on the matter. While prettify-symbols is a > mode, org-hide-emphasis-markers is an option/variable. So I wonder if > the

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-22 Thread Gustavo Barros
Hi Kyle, Hi Shankar, On Mon, 22 Jun 2020 at 05:40, Kyle Meyer wrote: > Shankar Rao writes: > >> This patch adds a minor mode that makes emphasis markers be automatically >> unhidden when the point is inside the region of emphasis and then the >> markers are rehidden when the point is moved

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-21 Thread Kyle Meyer
t;> This code was adapted from prettify-symbols-mode in prog-mode.el >> >> I have not yet signed the papers assigning copyright to the FSF. I sent a >> request for the papers to ass...@gnu.org, but have not yet received a >> response. Are you still waiting for a response

Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-01 Thread Shankar Rao
Sorry, I've never submitted a patch before. Looking through this mailing list, I see that you're supposed to attach the .patch file to the e-mail, so here it is. This patch adds a minor mode that makes emphasis markers be automatically unhidden when the point is inside the region of emphasis and

[PATCH] Add mode for automatically unhiding emphasis markers in the current region

2020-06-01 Thread Shankar Rao
* lisp/org.el: (org-auto-emphasis-unhide-at-point): Parameter that controls the behavior of Org Auto Emphasis mode. It can be one of the values nil, t, and 'right-edge, and works similarly to the parameter `prettify-symbols-unprettify-at-point' for `prettify-symbols-mode'.