From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#34215: 27.0.50; Provide elisp access to Chinese pinyin-to-character mapping Date: Sun, 27 Jan 2019 11:18:29 -0800 Message-ID: <875zu9gb96.fsf@ericabrahamsen.net> References: <87imyafyts.fsf@ericabrahamsen.net> <83r2cy3y69.fsf@gnu.org> <87a7jmf06v.fsf@ericabrahamsen.net> <83ef8y3r40.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="39367"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 34215@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 27 20:19:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gnpxZ-000A6q-1V for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Jan 2019 20:19:13 +0100 Original-Received: from localhost ([127.0.0.1]:49565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnpxX-0006mQ-N9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Jan 2019 14:19:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnpxP-0006kh-8x for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 14:19:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnpxO-0007Ht-EM for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 14:19:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48690) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnpxO-0007Hp-BA for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 14:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gnpxO-0007A3-3d for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 14:19:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87imyafyts.fsf@ericabrahamsen.net> Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Jan 2019 19:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34215 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154861672927507 (code B ref -1); Sun, 27 Jan 2019 19:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jan 2019 19:18:49 +0000 Original-Received: from localhost ([127.0.0.1]:47971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnpxB-00079b-Ge for submit@debbugs.gnu.org; Sun, 27 Jan 2019 14:18:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnpx9-00079M-Qn for submit@debbugs.gnu.org; Sun, 27 Jan 2019 14:18:48 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:48762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gnpx4-0007BR-4r for submit@debbugs.gnu.org; Sun, 27 Jan 2019 14:18:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnpx3-0006iM-5r for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 14:18:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnpx2-0007Aa-77 for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 14:18:41 -0500 Original-Received: from [195.159.176.226] (port=36534 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gnpx1-0007A8-SP for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 14:18:40 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gnpwz-0009UD-Ca for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 20:18:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:ezC8LoBRQBg/hBv1wYCrhGjq0pY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154825 Archived-At: Eli Zaretskii writes: >> From: Eric Abrahamsen >> Date: Sun, 27 Jan 2019 10:02:48 -0800 >> >> >> I'm not sure this use of `source-directory' is particularly robust, but >> >> I don't know how else to handle it. >> > >> > source-directory might not exist in a given installation. >> > >> > Maybe we should have the data copied into that separate file I >> > mentioned above. >> >> I can imagine a few ways of doing that: >> >> 1. Just manually copy the data into a new file and add it to the repo >> (pinyin.map hasn't been updated in years). >> 2. Do the copy at build time. I'm not quite sure where that function >> would live, or how it would get called. >> 3. Use an `eval-and-compile' form as in the patch I provided. Is working >> back from `load-file-name' more reliable than using >> `source-directory'? > > 2 is what I had in mind. I don't think it matters where the code > lives, it's small enough to not matter. It would be called like the > various *-convert functions we invoke at build time to build the > dictionaries needed for CJK input methods, see the files in the leim/ > directory. Okay, I'll put that together and add it to one of the Makefiles. I suppose it could go in leim/Makefile.in, though it technically isn't part of leim, and I was expecting the resulting file to go to lisp/language/. But it would be convenient to put the generation function in titdic-cnv.el. >> Autoloading a variable seems to copy the value of the variable into the >> loaddefs file, so there's no point to that. I figure we can just ask >> people who want this value to require the library. > > Right. > >> PS: pinyin.map is ancient and is missing a lot of good correspondences. >> Google's pinyin input method uses a much larger map, licensed with >> Apache v2.0. This[1] seems to indicate that Apache 2.0 is okay for Gnu >> projects, maybe we could consider switching to that map? > > Maybe. Unfortunately, I don't know enough about these input methods > to tell whether replacing the file is a good idea. I wonder who can > we ask about this. It's more or less a drop-in replacement -- the format of the data would be the same, only a bit more of it. I'm not sure who is "in charge" of these files, though. Eric