bug#81598: [PATCH] Add new input method for toki pona
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> From: Joshua Murphy <[email protected]> > Date: Tue, 11 Aug 2026 19:20:32 +0000 > > This adds an input method for Toki Pona that allows typing sitelen pona > characters using sitelen lasina (Latin script). You need a font that > supports the UCSUR range that sitelen pona covers to view the glyphs. > GNU Unifont covers it as well as some other more specialized free > software fonts [1]. > > I haven't added an etc/NEWS entry yet because I didn't know the best > header to put it under. Thanks. Unfortunately, I don't think we can accept this patch. The main reason is that the characters of this script are not yet part of Unicode. Emacs uses a lot of character properties defined by Unicode, lifted from the Unicode data file UnicodeData.txt, and that file does not currently have any data for codepoints in Private Use Areas (PUA) which this script uses. Without this data, many Emacs features will not handle these characters correctly. For example, the default syntax for characters is word-constituent, so all of the codepoints in PUA have this syntax, which AFAIU is wrong for the characters of this script. Also, AFAIU there are certain character-composition rules for these characters (like when a noun is followed by an adjective), but the shaping engines will not generally work with PUA codepoints (and your patch doesn't define any composition rules to begin with). Filling features will likely not work correctly as well. And that is just the tip of a very large iceberg. So I'm afraid we need to wait for this script to be added to Unicode. If and when the script is officially part of the Unicode Standard, there's more to supporting it in Emacs than just adding an input method. We need to have a suitable language environment, defined by its info (see language-info-alist); the input method then becomes the default for that language environment. We also should add a line to etc/HELLO showing the script. If there are composition rules for this script, they should be added to the appropriate file under lisp/language, as we have for other supported languages. Last, but not least, lisp/international/fontset.el should be updated with suitable settings for the script (representative characters etc.), so that Emacs would be able to search and find fonts suitable for displaying the characters of this script. If you want to have this support in Emacs before the script is officially adopted by Unicode, may I suggest to do this as a GNU ELPA package instead? You will still need to provide at least some of the information mentioned above, like your own data to replace the missing information in UnicodeData.txt, but at least it will only affect the enthusiasts of this script and no one else.