emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)]
@ 2024-04-10  7:52 Chang Xiaoduan
  2024-04-10  8:19 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Chang Xiaoduan @ 2024-04-10  7:52 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

Hello,

I am trying to customizing `org-emphasis-alist` so that ` can replace ~ as
the code marker. I use the following code in my configuration file:

``` emacs-lisp
(setq org-emphasis-alist
      '(("*" bold)
        ("/" italic)
        ("_" underline)
        ("=" org-verbatim verbatim)
        ("`" org-code verbatim)
        ("+" (:strike-through t))))
```

After I restart Emacs, things does not work as I expected. Text
surrounded by ` is not rendered using the faces for code, and text
surrounded by ~ is rendered using a different face for code (different
from the faces before the customizing is applied). Also, I have set
`org-hide-emphasis-marker` to `t`, and ~ gets hidden but ` not.

This can be reproduced by launching Emacs using `emacs -Q`. Then
evaluate the code above in the *scratch* buffer. Then open an org-mode
buffer which contains text like "`code`" and "~code~". You can tell the
difference by launching Emacs using `emacs -Q` but does not evaluate the
above code.

Thank you

Emacs  : GNU Emacs 29.2 (build 2, x86_64-w64-mingw32)
 of 2024-02-02
Package: Org mode version 9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)]
  2024-04-10  7:52 [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)] Chang Xiaoduan
@ 2024-04-10  8:19 ` Ihor Radchenko
  2024-04-11 16:44   ` Max Nikulin
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2024-04-10  8:19 UTC (permalink / raw)
  To: Chang Xiaoduan; +Cc: emacs-orgmode

Chang Xiaoduan <drcxd@sina.com> writes:

> I am trying to customizing `org-emphasis-alist` so that ` can replace ~ as
> the code marker. I use the following code in my configuration file:
>
> ``` emacs-lisp
> (setq org-emphasis-alist
>       '(("*" bold)
>         ("/" italic)
>         ("_" underline)
>         ("=" org-verbatim verbatim)
>         ("`" org-code verbatim)
>         ("+" (:strike-through t))))
> ```

Custom markup markers are not supported.
This customization is only useful to change the existing markup faces.

I have updated the docstring to explain this.
Handled, on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=42cdf2a90

-- 
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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)]
  2024-04-10  8:19 ` Ihor Radchenko
@ 2024-04-11 16:44   ` Max Nikulin
  2024-04-11 17:43     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Max Nikulin @ 2024-04-11 16:44 UTC (permalink / raw)
  To: emacs-orgmode

On 10/04/2024 15:19, Ihor Radchenko wrote:
> Chang Xiaoduan writes:
> 
>> I am trying to customizing `org-emphasis-alist` so that ` can replace ~ as
>> the code marker. I use the following code in my configuration file:
> 
> Custom markup markers are not supported.
> This customization is only useful to change the existing markup faces.
> 
> I have updated the docstring to explain this.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=42cdf2a90

Have you decided to discard another variant that warns users?

Ihor Radchenko… [PATCH v5] org.el: Warning for unsupported markers in 
`org-set-emphasis-alist' Thu, 02 Feb 2023 10:53:20 +0000. 
https://list.orgmode.org/87r0v8pcdb.fsf@localhost




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)]
  2024-04-11 16:44   ` Max Nikulin
@ 2024-04-11 17:43     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2024-04-11 17:43 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

Max Nikulin <manikulin@gmail.com> writes:

>> I have updated the docstring to explain this.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=42cdf2a90
>
> Have you decided to discard another variant that warns users?
>
> Ihor Radchenko… [PATCH v5] org.el: Warning for unsupported markers in 
> `org-set-emphasis-alist' Thu, 02 Feb 2023 10:53:20 +0000. 
> https://list.orgmode.org/87r0v8pcdb.fsf@localhost

In that thread, the decision has been made to obsolete
`org-emphasis-alist'. However, I postponed its implementation until
after the new font-lock engine.

-- 
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>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-11 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10  7:52 [BUG] Customizing org-emphasis-alist does not work as expected [9.6.15 (release_9.6.15 @ d:/emacs_home/program/emacs/share/emacs/29.2/lisp/org/)] Chang Xiaoduan
2024-04-10  8:19 ` Ihor Radchenko
2024-04-11 16:44   ` Max Nikulin
2024-04-11 17:43     ` Ihor Radchenko

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).