unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Perry E. Metzger" <perry@piermont.com>
To: emacs-devel@gnu.org
Subject: not quite understanding input methods
Date: Mon, 30 Aug 2021 13:24:27 -0400	[thread overview]
Message-ID: <231adc63-77f0-037a-365c-28db98f684cf@piermont.com> (raw)

So I've built a small input method to test out my understanding, and 
I've hit a bit of a wall.

I would like to prefix my translations with a special character. I've 
mapped my caps lock key to send F19 (I don't use the caps lock key ever 
and using it as a compose key seems reasonable) and I've set Emacs to 
insert a special character for me when I hit that key, like so:

(global-set-key (kbd "<f19>")
                 (lambda (n)
                   (interactive "p")
                   (self-insert-command n ?⎄)))

(That special character happens to be the unicode "COMPOSE SYMBOL", 
which seemed intuitively appropriate.)

I've also created a small input method, and which has the following rules:

(quail-define-rules
  ("⎄gl" ?λ)
  ("⎄gL" ?Λ)
  ("⎄iA" ?∀)
  ("⎄iE" ?∃)
   ("xx" ?Π)
)

Now, if I hit "xx", Π is inserted as expected, but if I hit "<F19> g l", 
the buffer shows me "⎄gl" and not "λ" as I would expect.

My guess is that something in the belly of Quail is reading events and 
not the characters in the buffer, but as there's no documentation I'm 
not really clear on what is going on.


Perry





             reply	other threads:[~2021-08-30 17:24 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 17:24 Perry E. Metzger [this message]
2021-08-30 17:37 ` not quite understanding input methods Stefan Monnier
2021-08-30 17:45   ` Perry E. Metzger
2021-08-30 18:00     ` Stefan Monnier
2021-08-30 18:22       ` Eli Zaretskii
2021-08-30 18:34         ` Perry E. Metzger
2021-08-30 18:39           ` Eli Zaretskii
2021-08-30 18:43             ` Perry E. Metzger
2021-08-30 18:37       ` Perry E. Metzger
2021-08-30 19:00         ` Perry E. Metzger
2021-08-30 19:08           ` Eli Zaretskii
2021-08-30 19:13             ` Perry E. Metzger
2021-08-30 19:19               ` Stefan Monnier
2021-08-30 19:26                 ` Perry E. Metzger
2021-08-30 19:31                   ` Eli Zaretskii
2021-08-30 20:12                     ` Stefan Monnier
2021-08-30 19:28               ` Eli Zaretskii
2021-08-30 20:29               ` André A. Gomes
2021-09-01  5:44 ` Yuri Khan
2021-09-01  7:23   ` Juri Linkov
2021-09-01  7:43     ` Yuri Khan
2021-09-01  8:37       ` tomas
2021-09-01  9:14       ` Joost Kremers
2021-09-01 13:17         ` Perry E. Metzger
2021-09-01 12:05       ` Eli Zaretskii
2021-09-01 12:35         ` João Távora
2021-09-01 13:19           ` André A. Gomes
2021-09-01 14:05             ` João Távora
2021-09-01 13:03         ` André A. Gomes
2021-09-01 13:02       ` Perry E. Metzger
2021-09-02 12:00       ` Maxim Nikulin
2021-09-02 13:03       ` Filipp Gunbin
2021-09-01 12:58     ` Perry E. Metzger
2021-09-01 12:51   ` Perry E. Metzger
2021-09-01 13:29 ` Partially answering my own question (was Re: not quite understanding input methods) Perry E. Metzger

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=231adc63-77f0-037a-365c-28db98f684cf@piermont.com \
    --to=perry@piermont.com \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).