emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding consistent extra symbols to input methods (cyrillic-*, croati


From: Juri Linkov
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

> 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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]