all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Welsh Duggan <mwd@md5i.com>
To: emacs-devel@gnu.org
Subject: Re: quail input methods and conversion functions
Date: Fri, 09 Feb 2018 13:26:25 -0500	[thread overview]
Message-ID: <87wozmnhny.fsf@md5i.com> (raw)
In-Reply-To: <87tvurldff.fsf@mat.ucm.es> (Uwe Brauer's message of "Thu, 08 Feb 2018 16:16:20 +0100")

Uwe Brauer <oub@mat.ucm.es> writes:

>>>> "Michael" == Michael Welsh Duggan <mwd@md5i.com> writes:
>
>    > Uwe Brauer <oub@mat.ucm.es> writes:
>    >> In ancient pre Mule times, there was iso-unacentuate which for example
>    >> would translatex ä to "a
>    >> 
>    >> 
>    >> Does something like this exist for all, or some quail input methods?
>
>    > It seems to exist.  The interactive version is `M-x quail-show-key', and
>    > the programmatic version is `quail-find-key'.  For example, using the
>    > latin-1-prefix input method, M-x quail-show-key on ä outputs:
>
>    >   To input ‘ä’, type ""a"
>
>    > and (quail-find-key ?ä) -> ("\"a")
>
>    > Both of these depend on the current input method, of course.
>
> Thanks, but these functions do not convert globally, that is for a
> region or file, between the two sets.
>
> I mean suppose I have
>
>  Über den Wolken, unter dem Öl,
>
> Should give when converted
>
> "Uber den Wolken, unter dem "Ol.
>
> And vice versa, same way as iso-accentuate and iso-unaccentuate
> worked/s.

In the unaccentuate case (which is what your original question), it
should be easy to write that functionality using `quail-find-key' as a
base.  You would have to decide how to handle failures (character can't
be typed using the current input method).

The accentuate case looks more difficult.  Quail allows more than one
translation candidate for a single key sequence, which leaves no good
way handle these characters.  A simple example from the ipa input
method: tsh can translate into ʧ, tʃ, or t⁀ʃ.  Something that works with
input methods that do not have this ambiguity is possible, though my
initial look through the code leads me to believe that this is still
going to be more difficult to write then the (fairly trivial)
unaccentuate case.

-- 
Michael Welsh Duggan
(md5i@md5i.com)



  reply	other threads:[~2018-02-09 18:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 21:58 quail input methods and conversion functions Uwe Brauer
2018-02-08  4:08 ` Michael Welsh Duggan
2018-02-08 15:16   ` Uwe Brauer
2018-02-09 18:26     ` Michael Welsh Duggan [this message]
2018-02-10 14:18       ` [conversion fails] (was: quail input methods and conversion functions) Uwe Brauer
2018-02-12  3:53         ` [conversion fails] Michael Welsh Duggan
2018-02-12 10:07           ` Uwe Brauer
2018-02-12 10:40           ` Uwe Brauer
2018-02-13  3:43             ` Michael Welsh Duggan
2018-02-13  8:43               ` Uwe Brauer
2018-02-13  8:51               ` Uwe Brauer
2018-02-13 20:58                 ` Michael Welsh Duggan
2018-02-13 21:41                   ` Uwe Brauer
2018-02-14  0:21                     ` Michael Welsh Duggan
2018-02-14  9:08                       ` Uwe Brauer
2018-02-19 21:26                       ` [MELPA] (was: [conversion fails]) Uwe Brauer
2018-02-20  2:12                         ` [MELPA] Michael Welsh Duggan

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=87wozmnhny.fsf@md5i.com \
    --to=mwd@md5i.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 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.