From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Is there a sane way to type Hebrew with nikud with Emacs 25/Mac? Date: Thu, 15 Dec 2016 00:05:45 +0200 Organization: LINKOV.NET Message-ID: <87mvfy1806.fsf@mail.linkov.net> References: <1481056342.3486002.810530185.08361AFB@webmail.messagingengine.com> <1481151750.3863289.811957801.45609D8B@webmail.messagingengine.com> <83h96fhysl.fsf@gnu.org> <1481576998.3109775.816718105.3FD7FFFA@webmail.messagingengine.com> <87d1gvh639.fsf@mail.linkov.net> <1481672469.224304.818155361.2AEAC78D@webmail.messagingengine.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1481753270 17306 195.159.176.226 (14 Dec 2016 22:07:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2016 22:07:50 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org To: "Mark H. David" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 14 23:07:45 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHHiB-0003Kv-Pi for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2016 23:07:43 +0100 Original-Received: from localhost ([::1]:50537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHHiE-0007qM-41 for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2016 17:07:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHHhd-0007gJ-ED for emacs-devel@gnu.org; Wed, 14 Dec 2016 17:07:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHHhX-0007DU-KU for emacs-devel@gnu.org; Wed, 14 Dec 2016 17:07:09 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:58202 helo=homiemail-a15.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cHHhS-0007Bv-Ta; Wed, 14 Dec 2016 17:06:59 -0500 Original-Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id 392C176C06B; Wed, 14 Dec 2016 14:06:53 -0800 (PST) Original-Received: from localhost.linkov.net (m77-218-55-160.cust.tele2.ee [77.218.55.160]) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id EBF8F76C065; Wed, 14 Dec 2016 14:06:51 -0800 (PST) In-Reply-To: <1481672469.224304.818155361.2AEAC78D@webmail.messagingengine.com> (Mark H. David's message of "Tue, 13 Dec 2016 15:41:09 -0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 69.163.253.7 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210467 Archived-At: >> Give to this command the name of the Emacs input method >> that works correctly for your keyboard > > so I don't see how this applies to the case I'm describing, > that is, using the built-in input method (built into the OS) > rather than Emacs's input method, not using any input method > of Emacs's. Can you help me understand? Emacs doesn't know about key mappings of the OS built-in input method, so one way to get some mappings is from the input methods in the Quail package. After you review and confirm that one of available Quail input methods corresponds to your OS input method, you can use it to create an inverse mapping. So you only get the information about key mappings from the input method, not directly using it. Have you tried the proposed command? What happens? > ----- Original message ----- > From: Juri Linkov > To: "Mark H. David" > Cc: Eli Zaretskii , rms@gnu.org, emacs-devel@gnu.org > Subject: Re: Is there a sane way to type Hebrew with nikud with Emacs 25/Mac? > Date: Tue, 13 Dec 2016 23:27:15 +0200 > > We already solved the same problem for Cyrillic: > https://debbugs.gnu.org/9751#85 > > You can use the same solution for Hebrew as well. > Give to this command the name of the Emacs input method > that works correctly for your keyboard, and it will create > a reverse mapping converting all entered keys with modifiers > to ASCII without the need to activate the Emacs input method: > > (defun reverse-input-method (input-method) > "Build the reverse mapping of single letters from INPUT-METHOD." > (interactive > (list (read-input-method-name "Use input method (default current): "))) > (if (and input-method (symbolp input-method)) > (setq input-method (symbol-name input-method))) > (let ((current current-input-method) > (modifiers '(nil (control) (meta) (control meta)))) > (when input-method > (activate-input-method input-method)) > (when (and current-input-method quail-keyboard-layout) > (dolist (map (cdr (quail-map))) > (let* ((to (car map)) > (from (quail-get-translation > (cadr map) (char-to-string to) 1))) > (when (and (characterp from) (characterp to)) > (dolist (mod modifiers) > (define-key local-function-key-map > (vector (append mod (list from))) > (vector (append mod (list to))))))))) > (when input-method > (activate-input-method current)))) > > If a list of modifiers '(control) (meta) (control meta)' is not enough, > then you can add more combinations of modifiers with: > > (defun powerset (S) > (let ((x (car S))) > (if (cdr S) > (let ((y (powerset (remove x S)))) > (append (list (list x)) > (mapcar (lambda (e) (cons x e)) y) > y)) > (list (list x))))) > > and > > (powerset '(control meta super hyper))