Ihor Radchenko <[email protected]> 2025/12/25 20:46 UTC+8 writes

> Try the attached.
> This variant is slower (uses parser), but more accurate.

It works, thanks! See the attached catch.png.

I still have some minor doubts regarding the regexp part in
org-set-emph-re, as I mentioned in my previous email. After all,
standard regex character classes [...] should not contain \\| to
represent alternation (logical OR). But the value of `org-emph-re' is:

"\\(^\\|[[:space:]]\\|\\c{\\|\\c[\\|\\c-\\|\\c,\\|\\c|\\)\\(\\([*/_+]\\)\\([^[:space:]]\\|[^[:space:]].*?\\(?:
.*?\\)\\{0,1\\}[^[:space:]]\\)\\3\\)\\([[[:space:]]\\|\\c}\\|\\c]\\|\\c-\\|\\c,\\|\\c|\\|$]\\|$\\)"

Specifically, I mean the final part of this regexp:

[[[:space:]]\\|\\c}\\|\\c]\\|\\c-\\|\\c,\\|\\c|\\|$]

Apart from that, your code works great. I look forward to using this in
Emacs 31 to get rid of the annoying ZWS. Though we'll still need them
for English text (like a*b*c), that's a separate discussion.

Thanks very much again.

Reply via email to