bug#81598: [PATCH] Add new input method for toki pona
Joshua Murphy <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
I added to etc/HELLO as a future reference for myself, and also added a proper language environment. I'll combine the language environment and IME stuff into a single file when I make it into a package. What specifically would need to be done in a package to get font selection working? I see that I can do something like (set-fontset-font t '(? . ?) "sitelen seli kiwen mono juniko") to get a specific font to work, but having it automatically pick one would of course be better. Does adding to UnicodeData.txt fix the font selection or is something else needed? If that is the problem, what's a reasonable way to handle that in a package? I'm guessing a package can't just override or append to that file. Thanks, -- Joshua Murphy [email protected]
0001-Add-new-input-method-for-toki-pona.patch
(text/x-patch, 6.7 KB)
From deb466de54a328c97a08d9e57e0d6b04fef73948 Mon Sep 17 00:00:00 2001 From: Joshua Murphy <[email protected]> Date: Tue, 11 Aug 2026 15:03:18 -0400 Subject: [PATCH] Add new input method for toki pona * lisp/leim/quail/tokipona.el: Define new input method. * lisp/language/misc-lang.el ("Toki Pona"): New language environment. * etc/HELLO: Add Toki Pona greeting. --- etc/HELLO | 1 + lisp/language/misc-lang.el | 13 ++ lisp/leim/quail/tokipona.el | 231 ++++++++++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 lisp/leim/quail/tokipona.el diff --git a/etc/HELLO b/etc/HELLO index fdbca768b44..6e4478bacaf 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -118,6 +118,7 @@ Tibetan (བོད་སྐད་) བཀྲ་ཤིས་བདེ་ལེག Tifinagh (ⵜⵉⴼⵉⵏⴰⵖ) ⴰⵣⵓⵍ Tigrigna (ትግርኛ) ሰላማት Tirhuta (𑒞𑒱𑒩𑒯𑒳𑒞𑒰) 𑒣𑓂𑒩𑒢𑒰𑒧 / 𑒮𑒲𑒞𑒰𑒩𑒰𑒧 +Toki Pona () Turkish (Türkçe) Esenlikler / Merhaba Ukrainian (українська) Вітаю / Добрий день! / Привіт Vietnamese (tiếng Việt) Chào bạn diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el index 8942c86ea1b..de3f603038e 100644 --- a/lisp/language/misc-lang.el +++ b/lisp/language/misc-lang.el @@ -394,6 +394,19 @@ language environment.")) (documentation . "Tifinagh a script used to write the Berber languages.")) '("Misc")) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Toki Pona +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(set-language-info-alist + "Toki Pona" + '((charset unicode) + (coding-system utf-8) + (coding-priority utf-8) + (input-method . "tokipona") + (sample-text . "Toki Pona () ") + (documentation . "Language environment for Toki Pona using the sitelen pona script.")) + '("Misc")) + (provide 'misc-lang) ;;; misc-lang.el ends here diff --git a/lisp/leim/quail/tokipona.el b/lisp/leim/quail/tokipona.el new file mode 100644 index 00000000000..aeb83f9267a --- /dev/null +++ b/lisp/leim/quail/tokipona.el @@ -0,0 +1,231 @@ +;;; tokipona.el --- Quail package for Toki Pona character composition -*- lexical-binding: t -*- + +;; Copyright (C) 2026 Free Software Foundation, Inc. + +;; Author: Joshua Murphy <[email protected]> +;; Keywords: multilingual, input method, Toki Pona + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This input method allows you to type sitelen pona using +;; sitelen lasina. + +;;; Code: + +(require 'quail) + +(quail-define-package + "tokipona" "UTF-8" "" t + "Toki Pona input method using sitelen lasina to sitelen pona conversion. + +In addition to the standard sitelen lasina to sitelen pona +conversions, the following keys can be used to type extra +glyphs that act as modifiers for existing glyphs. + +[ start cartouche +] end cartouche +^ stack joiner +* scale joiner +( start long glyph +) end long glyph +. middle dot +: colon +, tally mark +- zero width joiner" + nil t nil nil nil nil nil nil nil nil t) + +(quail-define-rules + ("a" ?) + ("akesi" ?) + ("ala" ?) + ("alasa" ?) + ("ale" ?) + ("anpa" ?) + ("ante" ?) + ("anu" ?) + ("awen" ?) + ("e" ?) + ("en" ?) + ("esun" ?) + ("ijo" ?) + ("ike" ?) + ("ilo" ?) + ("insa" ?) + ("jaki" ?) + ("jan" ?) + ("jelo" ?) + ("jo" ?) + ("kala" ?) + ("kalama" ?) + ("kama" ?) + ("kasi" ?) + ("ken" ?) + ("kepeken" ?) + ("kili" ?) + ("kiwen" ?) + ("ko" ?) + ("kon" ?) + ("kule" ?) + ("kulupu" ?) + ("kute" ?) + ("la" ?) + ("lape" ?) + ("laso" ?) + ("lawa" ?) + ("len" ?) + ("lete" ?) + ("li" ?) + ("lili" ?) + ("linja" ?) + ("lipu" ?) + ("loje" ?) + ("lon" ?) + ("luka" ?) + ("lukin" ?) + ("lupa" ?) + ("ma" ?) + ("mama" ?) + ("mani" ?) + ("meli" ?) + ("mi" ?) + ("mije" ?) + ("moku" ?) + ("moli" ?) + ("monsi" ?) + ("mu" ?) + ("mun" ?) + ("musi" ?) + ("mute" ?) + ("nanpa" ?) + ("nasa" ?) + ("nasin" ?) + ("nena" ?) + ("ni" [? ? ? ?]) + ("nimi" ?) + ("noka" ?) + ("o" ?) + ("olin" ?) + ("ona" ?) + ("open" ?) + ("pakala" ?) + ("pali" ?) + ("palisa" ?) + ("pan" ?) + ("pana" ?) + ("pi" ?) + ("pilin" ?) + ("pimeja" ?) + ("pini" ?) + ("pipi" ?) + ("poka" ?) + ("poki" ?) + ("pona" ?) + ("pu" ?) + ("sama" ?) + ("seli" ?) + ("selo" ?) + ("seme" ?) + ("sewi" [? ?]) + ("sijelo" ?) + ("sike" ?) + ("sin" ?) + ("sina" ?) + ("sinpin" ?) + ("sitelen" ?) + ("sona" ?) + ("soweli" ?) + ("suli" ?) + ("suno" ?) + ("supa" ?) + ("suwi" ?) + ("tan" ?) + ("taso" ?) + ("tawa" ?) + ("telo" ?) + ("tenpo" ?) + ("toki" ?) + ("tomo" ?) + ("tu" ?) + ("unpa" ?) + ("uta" ?) + ("utala" ?) + ("walo" ?) + ("wan" ?) + ("waso" ?) + ("wawa" ?) + ("weka" ?) + ("wile" ?) + ("namako" ?) + ("kin" ?) + ("oko" ?) + ("kipisi" ?) + ("leko" ?) + ("monsuta" ?) + ("tonsi" ?) + ("jasima" ?) + ("kijetesantakalu" ?) + ("soko" ?) + ("meso" ?) + ("epiku" ?) + ("kokosila" ?) + ("lanpan" ?) + ("n" ?) + ("misikeke" ?) + ("ku" ?) + ("[" ?) + ("]" ?) + ("^" ?) + ("*" ?) + ("(" ?) + (")" ?) + ("." ?) + (":" ?) + ("," ?) + ("-" ?) + ("|" ? ) + ("pake" ?) + ("apeja" ?) + ("majuna" ?) + ("powe" ?) + ("linluwi" ?) + ("kiki" ?) + ("su" ?) + ("isipin" ?) + ("kamalawala" ?) + ("kapesi" ?) + ("melome" ?) + ("mijomi" ?) + ("misa" ?) + ("nimisin" ?) + ("nja" ?) + ("oke" ?) + ("omekapo" ?) + ("puwa" ?) + ("san" ?) + ("taki" ?) + ("te" ?) + ("to" ?) + ("unu" ?) + ("usawi" ?) + ("wa" ?) + ("wuwojiti" ?) + ("yupekosi" ?)) + +(provide 'tokipona) + +;;; tokipona.el ends here -- 2.55.0