From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: adding consistent extra symbols to input methods (cyrillic-*, croatian-*, slov*, czech-* etc.) input methods Date: Sun, 06 Jul 2008 21:40:44 +0300 Organization: JURTA Message-ID: <87ej66ubkv.fsf@jurta.org> References: <86lk19mmua.fsf@lifelogs.com> <485298A4.30000@gnu.org> <867ict8awn.fsf@lifelogs.com> <87tzfvj16y.fsf@uwakimon.sk.tsukuba.ac.jp> <86lk12zee7.fsf@lifelogs.com> <86r6acqbif.fsf@lifelogs.com> <864p76lp60.fsf_-_@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1215369940 31453 80.91.229.12 (6 Jul 2008 18:45:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jul 2008 18:45:40 +0000 (UTC) Cc: Ted Zlatanov , emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 06 20:46:26 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KFZFe-0004rd-F9 for ged-emacs-devel@m.gmane.org; Sun, 06 Jul 2008 20:46:22 +0200 Original-Received: from localhost ([127.0.0.1]:40263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFZEn-0006SH-6h for ged-emacs-devel@m.gmane.org; Sun, 06 Jul 2008 14:45:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KFZEj-0006S0-1D for emacs-devel@gnu.org; Sun, 06 Jul 2008 14:45:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KFZEg-0006Rg-Lj for emacs-devel@gnu.org; Sun, 06 Jul 2008 14:45:23 -0400 Original-Received: from [199.232.76.173] (port=43923 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFZEg-0006Rd-FF for emacs-devel@gnu.org; Sun, 06 Jul 2008 14:45:22 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]:1964) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KFZEf-0000sC-V0 for emacs-devel@gnu.org; Sun, 06 Jul 2008 14:45:22 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1KFZEb-000Hhe-N6; Sun, 06 Jul 2008 21:45:18 +0300 In-Reply-To: (Kenichi Handa's message of "Sat, 05 Jul 2008 21:54:21 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: fa1e9f04260dd27375e84b1224048298 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 4235s [July 6 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Method: white ip list X-SpamTest-Rate: 0 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100388 Archived-At: > But, I'm now thiking about introducing this variable to > avoid eval-after-load in leim-ext.el: > > ;;;###autoload > (defvar quail-additional-rule-alist nil > "Alist of Quail package names vs. the rules to add after loading the package. > Each element has the form (PACKAGE-NAME RULE ...), where > PACKAGE-NAME is a Quail package name (string representing an input method), > and RULE is a translation rule of the form (KEY TRANSLATION APPEND). > See the documentaion of the function `quail-defrule' for the meanings > or KEY, TRANSLATION, and APPEND.") > > With this, you can do: > > (mapc (lambda(m) > (let ((name (car m))) > (when (string-match "cyrillic" name) > (message "Defining rules for method %s" method) > (push (list name '(",," ?„)) quail-additional-rule-alist)))) > input-method-alist) Since a list of necessary Unicode characters is too large and it is not limited to Cyrillic, what do you think about creating a new input method that could be activated simultaneously with language specific input method? In case of conflicting rules we could specify the priority by using the order of active input methods e.g. "unicode-map,cyrillic-translit" vs "cyrillic-translit,unicode-map" in a new variable like `quail-additional-input-methods'. As I see now there are at least two main types of input methods: 1. mapping a keyboard layout to language letters (like `cyrillic-jcuken'); 2. multi-key input methods to compose letters of one specific language. What is missing is a multi-key input method to input arbitrary Unicode characters in addition to the active language specific input method. The closest Unicode character input method I see is `sgml-input.el' but it relies on remembering the names of SGML entities. A better method could use mnemonics, and a good candidate is X11/locale/en_US.UTF-8/Compose for the X Window Input Method. For example, it uses the following mnemonic rules for quotation marks: << "«" LEFT-POINTING DOUBLE ANGLE QUOTATION MARK >> "»" RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK '< "‘" LEFT SINGLE QUOTATION MARK '> "’" RIGHT SINGLE QUOTATION MARK ', "‚" SINGLE LOW-9 QUOTATION MARK "< "“" LEFT DOUBLE QUOTATION MARK "> "”" RIGHT DOUBLE QUOTATION MARK ", "„" DOUBLE LOW-9 QUOTATION MARK and ~5000 other rules for many Unicode characters. Do you know a better method to input Unicode characters? -- Juri Linkov http://www.jurta.org/emacs/