emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Let radio target works well with Chinese
Date: Mon, 25 Feb 2019 11:50:37 -0800	[thread overview]
Message-ID: <87sgwb8x6a.fsf@ericabrahamsen.net> (raw)
In-Reply-To: CANN71N7NX7Y8pH86sZ_tw+j_OFh+V53SjmQNVKObH-Rms=xcAg@mail.gmail.com

Emilio Francesquini <e.francesquini@ufabc.edu.br> writes:

> Hello,
>
>> <<<天空>>>
>> >
>> > 我爱天空和大地
>> >     ^^^^
>>
>> Org doesn't support mid-word radio targets. Is there any strong reason
>> to make a case for Chinese? What about other languages?
>>
>
> My knowledge in Chinese is rather limited, but if it is a little like
> Japanese the problem is that those languages do not use spaces to separate
> words.
>
> I found myself in the same situation writing radio targets in Japanese...
> My workaroud was to insert artificial spaces as needed... :/

I've gotten this information (does-space-separate-words) for specific
characters before using either of these two methods:

(aref (char-category-set ?b) ?|) => nil
(aref (char-category-set ?中) ?|) => t

(aref fill-nospace-between-words-table?b) => nil
(aref fill-nospace-between-words-table ?中) => t

| is the category character for "line breakable". Perhaps adding "\c|"
to the regexp would DTRT?

Eric

  reply	other threads:[~2019-02-25 19:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-24 10:08 [PATCH] Let radio target works well with Chinese Feng Shu
2019-02-25 12:31 ` Nicolas Goaziou
2019-02-25 14:08   ` Emilio Francesquini
2019-02-25 19:50     ` Eric Abrahamsen [this message]
2019-02-26  3:02       ` tumashu
2019-02-28 10:39   ` tumashu
2019-02-28 13:52     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgwb8x6a.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).