[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch: hiding org emphasis markers
From: |
Ihor Radchenko |
Subject: |
Re: Patch: hiding org emphasis markers |
Date: |
Thu, 14 Sep 2023 12:47:38 +0000 |
Tommy Phillips <tphil98@gmail.com> writes:
> Here is a suggested small patch for how org hides emphasis markers.
> It's my first patch so hopefully I'm submitting it correctly.
The patch is ok. Thanks for submitting!
> Subject: [PATCH] lisp/org.el: Only hide-emphasis-markers that are in
> org-emphasis-alist
>
> * lisp/org.el (org-do-emphasis-faces): Add additional predicate to the
> 'and' clause that determines whether emphasis markers are hidden.
>
> Problem:
> Want to hide only the emphasis markers mentioned in org-emphasis-alist.
> After removing "underline" from org-emphasis-alist, '_underline_' is not
> underlined (correct behaviour), but the '_'s are hidden (incorrect behaviour).
Currently, `org-emphasis-alist' works independently from
`org-hide-emphasis-markers'.
Your patch will constitute a breaking change for users who removed
entries from `org-emphasis-alist', but still expect the markers to be
hidden.
You may instead introduce a new allowed value for
`org-hide-emphasis-markers' to hide markers for non-nil entries in
`org-emphasis-alist'. Maybe even allow the value to be an explicit list
of the markers to be hidden '("*" "_" ...).
And do note that the effect of `org-emphasis-alist' is purely visual -
Org still considers entries removed from the alist as markup. It is just
the display in Org buffers that is changed.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>