emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Gustavo Barros
Subject: Re: [PATCH] Add mode for automatically unhiding emphasis markers in the current region
Date: Wed, 24 Jun 2020 14:27:49 -0300
User-agent: mu4e 1.4.10; emacs 27.0.91

Hi Nicolas,

On Wed, 24 Jun 2020 at 12:46, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

Hello,

Gustavo Barros <gusbrs.2016@gmail.com> 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.  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.

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 do agree with what you said, as you have stated it: It'd be good if the user of `org-hide-emphasis-markers' didn't need to display the invisible character to edit them efficiently. And it is true that I argued in favor of this proposed patch giving the related editing inconveniences as a main point. But the feature is the equivalent of `prettify-symbols-unprettify-at-point' for `org-hide-emphasis-markers' and it does have an appeal in itself, for the visual cue it offers, besides the editing improvement, which is a byproduct. I like `org-hide-emphasis-markers', but if I was not "given the opportunity to display them" or if I could not edit them directly even if invisible, as a word processor does, I would probably not consider ever hiding them in the first place.

I think we should upgrade `org-emphasize' command instead, so it handles
both marker visibility states in a DWIM, or in a word processor,
fashion. Indeed, since emphasis markers of a given type cannot be nested in Org, the WIM part is usually easy to guess, according to the context,
i.e., the syntax at point, and the region. I have some draft lying
somewhere in that direction.

WDYT?

I think that it would be great independently of the proposed patch. Indeed, that would be very useful including for users which set `org-hide-emphasis-markers' to nil. On the other hand, even with a more capable dwim `org-empasize', I'm pretty sure many users will still add emphasis markers by directly typing them, even if occasionally, or they will delete them inadvertently if invisible, in which case, the proposed patch remains very useful for this reason too.

If I may, `TeX-font' in AUCTeX would be my dream `org-emphasize'. Two things it does that `org-emphasize' doesn't (as far as I know of): i) when there is no region selected, and point is within a font macro, it operates on the imediate enclosing font macro, not requiring region selection, so that we can change the font macro by calling `TeX-font' with a prefix, or remove the font macro with "C-c C-f C-d"; ii) `LaTeX-font-list' is customizable, allowing for better key bindings; it's easier to type "b" than "*", "s" than "+" etc., anyway, it gives choice.

Again, just an user here, just offering a data point. (And I was quoted ;-).

Best,
Gustavo.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]