[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Language selection in speechd-el
From: |
Milan Zamazal |
Subject: |
Language selection in speechd-el |
Date: |
Mon, 10 Mar 2008 11:25:49 +0100 |
>>>>> "PL" == Pierre Lorenzon <devel at pollock-nageoire.net> writes:
PL> 1. If I'am not wrong current-input-method is something that must
PL> be selected manually by the user. Simply tell me if I read emacs
PL> documentation too fast !!!
I personally set input method mostly automatically in my mode hooks,
based (indeed) on the buffer coding, file names etc.
PL> But for instance coding systems is something that is guessed by
PL> emacs with respect to the buffer content and more or less
PL> reflecting the language you are using. I would consider as
PL> natural then to offer a mapping between coding systems and
PL> languages in speechd-el. I think that I is not something very
PL> complicated to implement, simply creating an alis just like
PL> speechd-speak-input-method-languages but mapping coding systems
PL> on languages and that must be checked at the appropriate
PL> location in the code.
I think that although this would be easy to implement it would be out of
speechd-el scope. There are more things you may want to set based on
buffer coding (language), for example an input method or a spell checker
dictionary. So IMHO it would be better to provide a general mechanism,
not specific to speechd-el, for language guessing. Then you could set
speechd-language easily within this mechanism.
PL> 2. More surprisingly I tried to use mapping between faces and
PL> voices via speechd-face-voices variable. When I change
PL> (manually) current-input-method in a buffer, language is changed
PL> accordingly speechd-speak-input-method-languages but not for
PL> pieces of text displayed whith faces mapped to special voices !
PL> Why ? I must confess that I do not understand this priority
PL> schedule. In my opinion, face does not depend on the language as
PL> input-method do : hence language determined by input-method
PL> should override that determined by face.
The idea is that it may help handling multilingual buffers. For
instance Emacs doesn't provide general mechanism for message
translations so you may encounter English pieces of text in non-English
buffers. A typical examples might be Info or w3m-el. In such cases you
can map faces known to contain English texts to English. speechd-el
does something similar with echo area where only English texts are
expected.
But if you'd prefer to override face language settings with
speechd-speak-input-method-languages settings, I can add an option for
it. Just tell me.
Regards,
Milan Zamazal