From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66470: 29.1; Provide Urdu input method Date: Sat, 14 Oct 2023 13:53:53 +0300 Message-ID: <83zg0lqxtq.fsf@gnu.org> References: <87pm1lm23l.fsf@zohomail.eu> <87lec9m12g.fsf@zohomail.eu> <837cnpshz2.fsf@gnu.org> <877cnp1ojf.fsf@zohomail.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66470@debbugs.gnu.org To: Rahguzar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 14 12:54:55 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qrcII-0003er-JS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Oct 2023 12:54:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrcI5-00036a-MN; Sat, 14 Oct 2023 06:54:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrcI4-00035i-4u for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 06:54:40 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrcI3-0005ay-SK for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 06:54:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrcIQ-0006ci-FF for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 06:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Oct 2023 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66470 X-GNU-PR-Package: emacs Original-Received: via spool by 66470-submit@debbugs.gnu.org id=B66470.169728086725408 (code B ref 66470); Sat, 14 Oct 2023 10:55:02 +0000 Original-Received: (at 66470) by debbugs.gnu.org; 14 Oct 2023 10:54:27 +0000 Original-Received: from localhost ([127.0.0.1]:47982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrcHq-0006bj-Pp for submit@debbugs.gnu.org; Sat, 14 Oct 2023 06:54:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrcHn-0006bQ-CQ for 66470@debbugs.gnu.org; Sat, 14 Oct 2023 06:54:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrcHJ-0005X6-T0; Sat, 14 Oct 2023 06:53:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=e8YcT0tUjsWmKhCly9C7VaiDjOHsUO6AgpWVdHX6HHs=; b=A7BSg5ZcesJcxNYE4Wdc kzBTn2wAXfbQ3k6HSzbioGpkEyMl2s7HwXbcGmuZGGpqvlu/e6XLkJ6rYpTGGz8sgXZO0naaU6FD+ jl7ddsTf86v1otdVt6mzn6Bf2D2z3/JjzaxCpO4tnPyV6CctfQyTk1pptoWDV7CHOck5+22rJTwwp Eame3RJbZ3CK1Q3SXBYTDQWzzWUo5sbp7XD4HnX6av7ub14OZ8G9NDlAbBrT3WbBI9yY3NNhMqXDh 2omprXnF1eSTsgWT41jA/oINt4KQlHf9vXXgELha0yh55IJlpoRi9mn4TrH4QiX7ykcRCP8r+ZqaB lIsEOEpCexpGMQ==; In-Reply-To: <877cnp1ojf.fsf@zohomail.eu> (message from Rahguzar on Sat, 14 Oct 2023 11:50:42 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272404 Archived-At: > From: Rahguzar > Cc: 66470@debbugs.gnu.org > Date: Sat, 14 Oct 2023 11:50:42 +0200 > > Eli Zaretskii writes: > > > I responded to your question on help-gnu-emacs. > > Thanks a lot! But changing ` to ' doesn't seem to make a difference. It works in other input methods, such as chinese-array30, so maybe you should study what they do there. Or maybe there really is a bug in quail.el, because this behavior seems to be rarely if ever used. > > >> 1) Better coverage of Urdu zabta takhti > >> http://www.unicode.org/L2/L2002/02004-uzt.pdf It is a code page > >> developed for Urdu and supposedly was the basis of current Urdu support > >> of Unicode. However I can't figure out exactly what is the mapping from > >> UZT to Unicode. If anyone has pointers please share. > > > > What are the specific issues you cannot figure out? > > The paper I referenced describes the UZT code page but it is uses hand > drawn characters and I can't figure out what what Unicode code points > those characters correspond to. The shapes should tell you. But I asked about specific issues. Are you saying that you are unable to track the mapping of _all_ the characters between UZT and Unicode? > > Anyway, a better place to ask about Unicode mapping is on the Unicode > > mailing list, unicode@corp.unicode.org. > > Thanks, I will ask there. That's probably the best. > >> 2) Another input method for the common Urdu keyboard support. Despite > >> Urdu being my mother tongue I never learned to type in it which is why I > >> prefer a phonetic keyboard. However I will like to make an input method > >> with the layout of a physical Urdu keyboard. If a keyboard layout was > >> standardized in Pakistan or India, I can't find the specification. If > >> such a document exists and anyone can point me to it, I will be happy to > >> use it as a basis for addition to the `urdu.el` in attached patch. > >> Otherwise I will use the layout of Urdu keyboard from some free software > >> project. But this will probably be closer to Emacs 30 than now. > > > > Does https://www.branah.com/urdu help? > > I found that keyboard, but I also wanted to see if there was some > institutional standardization in Pakistan or India so as to find a > canonical resource. Web searches didn't reveal anything so if nothing > comes up, I will go with the one found on that page. OK. > However I don't find the phonetic keyboard there that useful since it > has to put every character on one key. Using a combination of two > keys which Emacs can do is more systematic and easy to remember (at > least for me). We could have both an input method reflected in the keyboard on that page and what you think is a better way. There are no limitations. > >> 3) The key for 'w' is unused in the input method for now. I am tempted > >> to bind a version of `insert-char` but restricted to Arabic range of > >> Unicode to cover the rare cases not covered by the input method now. Any > >> opinions about that? > > > > That key is assigned characters in the above keyboard page. > > This was for the input method in the attached file which is my attempt at > building a phonetic input method for Urdu taking some inspiration from > farsi-transliterate-banan in Emacs. > > However if you and other maintainers prefer to replicate more widely used > keyboards (e.g. those on mobile devices) I will provide them instead. I think it is best to support the layouts shown on the Internet, but we could also have alternative input methods with other layouts, to let users pick what they like best. > >> lisp/leim/quail/urdu.el | 193 ++++++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 193 insertions(+) > >> create mode 100644 lisp/leim/quail/urdu.el > > > > Thanks, but I'd prefer not to create a new file. How about adding > > this to persian.el instead? > > That is an option and another better one might be indian.el which is > where input methods for languages from Indo-Pakistan subcontinent are > now. Adding to indian.el is fine by me. > Another consideration for where it should go is that other major > languages in Pakistan are also not represented among input methods. > These include Punjabi (which I can speak a little but not write) which > has two scripts: Emacs has a input methods for gurmukhi but not > shahmukhi https://en.wikipedia.org/wiki/Shahmukhi , although Wikipedia > indicates that an Urdu input method should be sufficient. There are also > > Saraiki: https://en.wikipedia.org/wiki/Saraiki_language > Sindhi: https://en.wikipedia.org/wiki/Sindhi_language > Pashto: https://en.wikipedia.org/wiki/Pashto_alphabet > Balochi: https://en.wikipedia.org/wiki/Balochi_Standard_Alphabet > > Which all use a script similar to Urdu/Farsi/Arabic one but with > variation that might benefit from a different input method. If you intend to work on these other scripts soon, we could start a new file for languages in Pakistan. What I would like to avoid is having a separate file with just one or two methods, if for some reason the rest will never materialize in Emacs. > >> +(quail-define-package > >> + "urdu-phonetic" "Urdu" "اردو صوتی" > >> + `((?a . "a → ا , A → آ , ax → أ , u → ع") > >> + (?y . "y → ی , e → ے , i → ئ") > >> + (?r . "r → ر , R → ڑ") > > > > Besides the ` vs ' issue, I doubt that this kind of GUIDANCE is a good > > idea. Emacs input methods have a standardized way of showing > > candidates and the keys to select them, so I would prefer to stick to > > the standardized guidance format instead. In particular, showing the > > translations of both upper- and lower-case keys is not a good idea, I > > think. > > I am a native Urdu speaker but I have never typed Urdu seriously until > recently which is why I tried to make an input method for it. I think > for a phonetic input method such disambiguation from guidance string > will be very helpful for me at least while I need these training wheels. > So if possible I would like to have it at least for my personal use. But > as I said earlier I can't make it work with either ` or '. I suggest to try similar input methods, for example tamil-phonetic. I find this guidance very simple to use and understand, so I think we should try to stick to it where possible.