emacs-devel
[Top][All Lists]
Advanced

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

Re: Is there a sane way to type Hebrew with nikud with Emacs 25/Mac?


From: Mark H. David
Subject: Re: Is there a sane way to type Hebrew with nikud with Emacs 25/Mac?
Date: Mon, 12 Dec 2016 13:09:58 -0800

No, using an Emacs input method is not acceptable in this case. 

The goal of this exercise is to allow one to use the built-in input method
(here, Hebrew keyboard MacOS (or Windows or GNU/Linux)), without needing
Emacs's input methods.  Nowadays, built-in input methods involve very little
setup work on all the platforms. And then you have a uniform way to enter your
text in many apps, e.g., firefox, chrome, safari, terminal, mail, what have you.
So, just want Emacs to behave like these apps.  It kind of does, as far as
self-inserting characters are concerned, but having to switch back to US 
keyboard
just to type C-x, C-c, C-s, et al, is "insane". How to fix it?

First approximation: when a key K comes in to Emacs, and not using US keyboard
and K is not defined in Emacs, reinterpret K with corresponding character in US 
keyboard
combined with modifier bits of of K.

Example:

User types C-<keycap for S> when in Hebrew input method. I.e.,
it looks like they typed C-s, but since the Hebrew input method
is on, Emacs is going to get a different key event.

So, Emacs gets a key whose modifier bits are for the control key,
and character is ד (daled), a Hebrew character that is assigned
to key cap S.  So, Emacs initially sees that as C-ד.

So, Emacs decides that C-ד is not defined. So, Emacs
looks up the corresponding character in the US keyboard, which
is "s".  So, reinterpret the keystroke as C-s.

I think this should be an optional switch, although I would want it to be the 
default.
In any case, if this does not work out for you -- e.g., you're really winning
with Emacs input methods, or whatever, you can just turn it off.

Thanks,

Mark



----- Original message -----
From: Eli Zaretskii <address@hidden>
To: "Mark H. David" <address@hidden>
Cc: address@hidden, address@hidden
Subject: Re: Is there a sane way to type Hebrew with nikud with Emacs 25/Mac?
Date: Thu, 08 Dec 2016 05:42:18 +0200

> From: "Mark H. David" <address@hidden>
> Date: Wed, 07 Dec 2016 15:02:30 -0800
> Cc: address@hidden
> 
> It's similarly a bummer on GNU/Linux with a PC keyboard.
> 
> Straightforward way to try it:
>   Add Hebrew language keyboard in your modern GUI in the GNU/Linux-y way.
>   Fire up emacs, go to scratch buffer
>   Switch keyboard to "he" (Hebrew keyboard)
>   Type keys with caps: ASDF - 4 Hebrew letters show up: שדגכ
>   Type ctrl+b, meaning backward-char. Doesn't work, you get: "C-נ is 
> undefined".
> 
> נ is the Hebrew character you get when you type the keycap B.
> 
> I tried this on Emacs 24. I'm sure it's the same on Emacs 25 in this respect.

It's not an Emacs issue, it's how keyboard works on X.  (Ironically,
MS-Windows gets it right, so keys with Ctrl modifier are still ASCII
when I switch the keyboard to Hebrew.)

May I suggest to try one of the Emacs's own built-in Hebrew input
methods instead?



reply via email to

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