all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "Mark H. David" <mhd@yv.org>
Cc: Eli Zaretskii <eliz@gnu.org>, rms@gnu.org, emacs-devel@gnu.org
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	[thread overview]
Message-ID: <87mvfy1806.fsf@mail.linkov.net> (raw)
In-Reply-To: <1481672469.224304.818155361.2AEAC78D@webmail.messagingengine.com> (Mark H. David's message of "Tue, 13 Dec 2016 15:41:09 -0800")

>> 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 <juri@linkov.net>
> To: "Mark H. David" <mhd@yv.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 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))



  reply	other threads:[~2016-12-14 22:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 20:32 Is there a sane way to type Hebrew with nikud with Emacs 25/Mac? Mark H. David
2016-12-06 21:10 ` David Caldwell
2016-12-06 22:04   ` Mark H. David
2016-12-07 20:54 ` Richard Stallman
2016-12-07 23:02   ` Mark H. David
2016-12-08  3:42     ` Eli Zaretskii
2016-12-12 21:09       ` Mark H. David
2016-12-13  3:44         ` Eli Zaretskii
2016-12-13 21:27         ` Juri Linkov
2016-12-13 23:41           ` Mark H. David
2016-12-14 22:05             ` Juri Linkov [this message]
2016-12-08 20:36     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvfy1806.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mhd@yv.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.