From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [PATCH] Let radio target works well with Chinese Date: Mon, 25 Feb 2019 11:50:37 -0800 Message-ID: <87sgwb8x6a.fsf@ericabrahamsen.net> References: <87ftsdjy7s.fsf@163.com> <87a7ikf3s3.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:46849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyMHP-0004Gu-DC for emacs-orgmode@gnu.org; Mon, 25 Feb 2019 14:51:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyMHM-0001ja-LU for emacs-orgmode@gnu.org; Mon, 25 Feb 2019 14:51:11 -0500 Received: from [195.159.176.226] (port=53434 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyMHG-0001Lj-Ee for emacs-orgmode@gnu.org; Mon, 25 Feb 2019 14:51:05 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gyMH4-000jVL-3v for emacs-orgmode@gnu.org; Mon, 25 Feb 2019 20:50:50 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Emilio Francesquini 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