From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34215: 27.0.50; Provide elisp access to Chinese pinyin-to-character mapping Date: Sun, 27 Jan 2019 20:14:23 +0200 Message-ID: <83ef8y3r40.fsf@gnu.org> References: <87imyafyts.fsf@ericabrahamsen.net> <83r2cy3y69.fsf@gnu.org> <87a7jmf06v.fsf@ericabrahamsen.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="21967"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34215@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 27 19:15:12 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 1gnoxc-0005ab-CQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Jan 2019 19:15:12 +0100 Original-Received: from localhost ([127.0.0.1]:48900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnoxb-0002gd-90 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Jan 2019 13:15:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnoxS-0002g7-S7 for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 13:15:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnoxS-0000Lb-3w for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 13:15:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48637) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnoxS-0000LP-0q for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 13:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gnoxR-0005SJ-RR for bug-gnu-emacs@gnu.org; Sun, 27 Jan 2019 13:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Jan 2019 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34215 X-GNU-PR-Package: emacs Original-Received: via spool by 34215-submit@debbugs.gnu.org id=B34215.154861289220946 (code B ref 34215); Sun, 27 Jan 2019 18:15:01 +0000 Original-Received: (at 34215) by debbugs.gnu.org; 27 Jan 2019 18:14:52 +0000 Original-Received: from localhost ([127.0.0.1]:47918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnoxI-0005Rm-3M for submit@debbugs.gnu.org; Sun, 27 Jan 2019 13:14:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gnoxF-0005RW-LP for 34215@debbugs.gnu.org; Sun, 27 Jan 2019 13:14:50 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnox6-00005E-Ra; Sun, 27 Jan 2019 13:14:43 -0500 Original-Received: from [176.228.60.248] (port=1232 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gnox5-0006BF-Ol; Sun, 27 Jan 2019 13:14:40 -0500 In-reply-to: <87a7jmf06v.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Sun, 27 Jan 2019 10:02:48 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:154823 Archived-At: > 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. > 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.