From: James Thomas <jimjoe@gmx.net>
To: Rahguzar <rahguzar@zohomail.eu>
Cc: help-gnu-emacs@gnu.org
Subject: Re: quail-define-package and guidance string
Date: Sun, 15 Oct 2023 18:37:45 +0530 [thread overview]
Message-ID: <87zg0km3tq.fsf@gmx.net> (raw)
In-Reply-To: <87ttqymni1.fsf@zohomail.eu> (rahguzar@zohomail.eu's message of "Tue, 10 Oct 2023 18:34:41 +0200")
Rahguzar wrote:
> Hi,
> I want to write and contribute to Emacs a couple of input methods for
> Urdu. Looking around the already defined ones, it seems like
> `quail-define-package` is the standard way to define these. One of the
> input method uses phonetic transliteration. However Urdu has a bigger
> alphabet than English and standard transliteration is quite lossy, so
> there is a need to pick one of the translations and assign them to a key
> and the others to a different key combination. As a result I want to
> show such confusables in the echo area. It seems like it should be able
> to use GUIDANCE arg of `quail-define-package` but setting it to an alist
> has no effect for me. Specifically let say I have this code,
>
> (quail-define-package
> "urdu-phonetic" "Urdu" "اردو صوتی"
> `((?a . "a → ا , A → آ , ax → أ , u → ع"))
> "Intuitive transliteration keyboard layout for Urdu."
> nil t t t t nil nil nil nil nil t)
>
> (quail-define-rules
> ("a" ?ا)
> ("u" ?ع)
> ("i" ?ئ)
> ("A" ?آ)
> ("ax" ?أ))
>
> Evaluating it defines the `urdu-phonetic` input method and I activate
> and use it to input the characters above. However if I type 'a' the echo
> area shows 'a[x]' i.e. the default behavior if the GUIDANCE arg was 't'
> and the alist I passed to it is just ignored. Am I missing something in
> the doc string? And is what I am trying to do possible?
My guess: It was probably meant that:
If it is an alist, the element has the form (CHAR . STRING). Each
character in the current key is searched in the list and the
corresponding string is shown *in its place*.
I don't think that the program meant to allow you to display arbitrary
strings.
--
prev parent reply other threads:[~2023-10-15 13:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 16:34 quail-define-package and guidance string Rahguzar
2023-10-10 19:11 ` Emanuel Berg
2023-10-14 8:39 ` Eli Zaretskii
2023-10-15 13:07 ` James Thomas [this message]
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=87zg0km3tq.fsf@gmx.net \
--to=jimjoe@gmx.net \
--cc=help-gnu-emacs@gnu.org \
--cc=rahguzar@zohomail.eu \
/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.
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).