From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-devel@gnu.org
Subject: [conversion fails] (was: quail input methods and conversion functions)
Date: Sat, 10 Feb 2018 15:18:07 +0100 [thread overview]
Message-ID: <8760750vz4.fsf_-_@mat.ucm.es> (raw)
In-Reply-To: 87wozmnhny.fsf@md5i.com
> Uwe Brauer <oub@mat.ucm.es> writes:
> 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).
Actually taking iso-accentuate and un accuate as a reference it is the
accentuate part which I want to implement, for example
for the greek-ibycus
I want to replace a) by ἀ
> The accentuate case looks more difficult. Quail allows more than one
> translation candidate for a single key sequence, which leaves no good
I am puzzled now, I thought any input method should be an bijection. So
the old iso method was, wasn't it?
> way handle these characters. A simple example from the ipa input
> method: tsh can translate into ʧ, tʃ, or t⁀ʃ.
I tried that out, but I obtain ʧ none of the others.
> 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.
I boldly took the code from iso accentuate/accentuate
And define
(defun ibycus4-translate-conventions (from to trans-tab)
"Translate between FROM and TO using the translation table TRANS-TAB.
Based on iso-cvt"
(save-excursion
(save-restriction
(narrow-to-region from to)
(goto-char from)
(let ((work-tab trans-tab)
(buffer-read-only nil)
(case-fold-search nil))
(while work-tab
(save-excursion
(let ((trans-this (car work-tab)))
(while (re-search-forward (car trans-this) nil t)
(replace-match (car (cdr trans-this)) t nil)))
(setq work-tab (cdr work-tab)))))
(point-max))))
Then my table starts like this
(defvar ibycus4-ibycus4-to-utf8-trans-tab
'(
("a)" "ἀ")
("a(" "ἁ")
("a)`" "ἂ")
("a(`" "ἃ")
("a)'" "ἄ")
("a('" "ἅ")))
But now surprise, surprise
("ἀ" "ἀ") correct
("ἁ" "ἁ") correct
("ἀ‘" "ἂ")wrong
("ἁ‘" "ἃ")wrong
("ἀ’" "ἄ")wrong
("ἁ’" "ἅ") wrong
So what is up here and what shall I do? Any help is now strongly
appreciated.
next prev parent reply other threads:[~2018-02-10 14:18 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
2018-02-10 14:18 ` Uwe Brauer [this message]
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=8760750vz4.fsf_-_@mat.ucm.es \
--to=oub@mat.ucm.es \
--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.