Yue Yi <[email protected]> writes:

> 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|\\|$]

I am not sure what is the problem here. Could you please elaborate?

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

We are far from there. I am mostly toying around whether this syntax is
going to break Org or not.

There are still problems with the proposed approach. In particular,
using Po Unicode character category might be problematic.
"!?.," are all Po, but we currently just allow them as right boundary.
This makes sense since !* is probably intentional - in English, ! is
end of sentence and should be followed by a space. So, it is unlikely to
be expected as a left boundary of emphasis.
、 。 ! , . ? are also Po, but I am not sure whether one may expect
to write 您好。*我*叫Ihor。


-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Reply via email to