From: Visuwesh <visuweshm@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 50143@debbugs.gnu.org, rameshnedunchezian@outlook.com
Subject: bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
Date: Sun, 13 Mar 2022 12:46:52 +0530 [thread overview]
Message-ID: <87cziqgw4b.fsf@gmail.com> (raw)
In-Reply-To: <83y21el5qb.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 13 Mar 2022 08:35:40 +0200")
[-- Attachment #1: Type: text/plain, Size: 932 bytes --]
[ஞாயிறு, மார்ச் 13 2022] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: 50143@debbugs.gnu.org, rameshnedunchezian@outlook.com
>> Date: Sun, 13 Mar 2022 11:29:53 +0530
>>
>> 1. There's still a problem with tamil-itrans docstring. It
>> currently leads the user into thinking that they can input the
>> Tamil digits. The problem is that I am not sure how I can split
>> `quail-tamil-itrans-various-signs-and-digits-table' into two
>> cleanly. Ideas are welcome.
>
> I'd split into two parts the code that computes
> quail-tamil-itrans-various-signs-and-digits-table, such that the Tamil
> digits are in a separate part. Then change the doc strings of the two
> input methods so that the digits part is only included in the
> documentation of the input method that supports their insertion.
>
How does the updated patch look?
[-- Attachment #2: 0001-Follow-contemporary-practices-in-the-Tamil-IMs.patch --]
[-- Type: text/x-patch, Size: 9494 bytes --]
From 26af6d5fb04f683225d1d751f9e1b2a7902ad8a9 Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
Date: Sun, 13 Mar 2022 11:16:38 +0530
Subject: [PATCH] Follow contemporary practices in the Tamil IMs
* lisp/language/ind-util.el (indian-tml-base-digits-table): New table
to translates digits.
(indian-tml-base-table): Don't translate digits.
(indian-tml-itrans-digits-v5-hash): Hashtable that translates digits.
* lisp/leim/quail/indian.el (quail-tamil-itrans-compute-signs-table)
(quail-tamil-itrans-various-signs-table)
(quail-tamil-itrans-various-signs-and-digits-table): Separate out the
digits from the signs table using the function
'quail-tamil-itrans-compute-signs-table'.
(tamil-itrans-digits, tamil-inscript-digits): New input methods that
translates digits.
(tamil-itrans, tamil-inscript): Fix table inclusion.
* etc/NEWS: Announce the change.
---
etc/NEWS | 14 +++++++
lisp/language/ind-util.el | 27 ++++++++++++
lisp/leim/quail/indian.el | 88 ++++++++++++++++++++++++++++++---------
3 files changed, 109 insertions(+), 20 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index faac1fbc91..273fa77640 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -158,6 +158,13 @@ beginning.
An autoload definition appears just as a '(defun . NAME)' and the
'(t . NAME)' entries are not generated any more.
+---
+** The Tamil input methods do not insert Tamil digits anymore.
+The input methods 'tamil-itrans' and 'tamil-inscript' no longer insert
+the Tamil digit. To get back the previous behaviour, use the
+'tamil-itrans-digits' and 'tamil-inscript-digits' input methods
+instead.
+
\f
* Changes in Emacs 29.1
@@ -1656,6 +1663,13 @@ when used as part of a property list specification for the
** 'defalias' records a more precise history of definitions.
This is recorded in the `function-history` symbol property.
+---
+** 'indian-tml-base-table' no longer translates digits.
+Use 'indian-tml-base-digits-table' if you want digits translation.
+
+--
+** 'indian-tml-itrans-v5-hash' no longer translates digits.
+Use 'indian-tml-itrans-digits-v5-hash' if you digits translation.
\f
* Changes in Emacs 29.1 on Non-Free Operating Systems
diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el
index 8b1c3d69ae..60ada03fa2 100644
--- a/lisp/language/ind-util.el
+++ b/lisp/language/ind-util.el
@@ -255,6 +255,29 @@
"ണ്" ?ൺ "ന്" ?ൻ "ര്" ?ർ "ല്" ?ൽ "ള്" ?ൾ)))
(defvar indian-tml-base-table
+ '(
+ (;; VOWELS
+ (?அ nil) (?ஆ ?ா) (?இ ?ி) (?ஈ ?ீ) (?உ ?ு) (?ஊ ?ூ)
+ nil nil nil (?ஏ ?ே) (?எ ?ெ) (?ஐ ?ை)
+ nil (?ஓ ?ோ) (?ஒ ?ொ) (?ஔ ?ௌ) nil nil)
+ (;; CONSONANTS
+ ?க nil nil nil ?ங ;; GUTTRULS
+ ?ச nil ?ஜ nil ?ஞ ;; PALATALS
+ ?ட nil nil nil ?ண ;; CEREBRALS
+ ?த nil nil nil ?ந ?ன ;; DENTALS
+ ?ப nil nil nil ?ம ;; LABIALS
+ ?ய ?ர ?ற ?ல ?ள ?ழ ?வ ;; SEMIVOWELS
+ nil ?ஷ ?ஸ ?ஹ ;; SIBILANTS
+ nil nil nil nil nil nil nil nil ;; NUKTAS
+ "ஜ்ஞ" "க்ஷ")
+ (;; Misc Symbols
+ nil ?ஂ ?ஃ nil ?் nil nil)
+ (;; Digits
+ nil nil nil nil nil nil nil nil nil nil)
+ (;; Inscript-extra (4) (#, $, ^, *, ])
+ "்ர" "ர்" "த்ர" nil nil)))
+
+(defvar indian-tml-base-digits-table
'(
(;; VOWELS
(?அ nil) (?ஆ ?ா) (?இ ?ி) (?ஈ ?ீ) (?உ ?ு) (?ஊ ?ூ)
@@ -557,6 +580,10 @@
(defvar indian-tml-itrans-v5-hash
(indian-make-hash indian-tml-base-table
indian-itrans-v5-table-for-tamil))
+
+(defvar indian-tml-itrans-digits-v5-hash
+ (indian-make-hash indian-tml-base-digits-table
+ indian-itrans-v5-table-for-tamil))
)
(defmacro indian-translate-region (from to hashtable encode-p)
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
index 23204c0cd3..6641aa6b2e 100644
--- a/lisp/leim/quail/indian.el
+++ b/lisp/leim/quail/indian.el
@@ -171,7 +171,7 @@
clm)
(with-temp-buffer
(insert "\n")
- (insert " +")
+ (insert "----+")
(insert-char ?- 74)
(insert "\n |")
(setq clm 6)
@@ -244,19 +244,27 @@
(insert "\n")
(buffer-string))))
-(defvar quail-tamil-itrans-various-signs-and-digits-table
+(defun quail-tamil-itrans-compute-signs-table (digitp)
+ "Compute the signs table for the tamil-itrans input method.
+If DIGITP is non-nil, include the digits translation as well."
(let ((various '((?ஃ . "H") ("ஸ்ரீ" . "srii") (?ௐ)))
(digits "௦௧௨௩௪௫௬௭௮௯")
(width 6) clm)
(with-temp-buffer
- (insert "\n" (make-string 18 ?-) "+" (make-string 60 ?-) "\n")
+ (insert "\n" (make-string 18 ?-) "+")
+ (when digitp (insert (make-string 60 ?-)))
+ (insert "\n")
(insert
(propertize "\t" 'display '(space :align-to 5)) "various"
- (propertize "\t" 'display '(space :align-to 18)) "|"
- (propertize "\t" 'display '(space :align-to 45)) "digits")
-
- (insert "\n" (make-string 18 ?-) "+" (make-string 60 ?-) "\n")
- (setq clm 0 )
+ (propertize "\t" 'display '(space :align-to 18)) "|")
+ (when digitp
+ (insert
+ (propertize "\t" 'display '(space :align-to 45)) "digits"))
+ (insert "\n" (make-string 18 ?-) "+")
+ (when digitp
+ (insert (make-string 60 ?-)))
+ (insert "\n")
+ (setq clm 0)
(dotimes (i (length various))
(insert (propertize "\t" 'display (list 'space :align-to clm))
@@ -264,10 +272,11 @@
(setq clm (+ clm width)))
(insert (propertize "\t" 'display '(space :align-to 18)) "|")
(setq clm 20)
- (dotimes (i 10)
- (insert (propertize "\t" 'display (list 'space :align-to clm))
- (aref digits i))
- (setq clm (+ clm width)))
+ (when digitp
+ (dotimes (i 10)
+ (insert (propertize "\t" 'display (list 'space :align-to clm))
+ (aref digits i))
+ (setq clm (+ clm width))))
(insert "\n")
(setq clm 0)
(dotimes (i (length various))
@@ -276,13 +285,22 @@
(setq clm (+ clm width)))
(insert (propertize "\t" 'display '(space :align-to 18)) "|")
(setq clm 20)
- (dotimes (i 10)
- (insert (propertize "\t" 'display (list 'space :align-to clm))
- (format "%d" i))
- (setq clm (+ clm width)))
- (insert "\n" (make-string 18 ?-) "+" (make-string 60 ?-) "\n")
+ (when digitp
+ (dotimes (i 10)
+ (insert (propertize "\t" 'display (list 'space :align-to clm))
+ (format "%d" i))
+ (setq clm (+ clm width))))
+ (insert "\n" (make-string 18 ?-) "+")
+ (when digitp
+ (insert (make-string 60 ?-) "\n"))
(buffer-string))))
+(defvar quail-tamil-itrans-various-signs-and-digits-table
+ (quail-tamil-itrans-compute-signs-table t))
+
+(defvar quail-tamil-itrans-various-signs-table
+ (quail-tamil-itrans-compute-signs-table nil))
+
(if nil
(quail-define-package "tamil-itrans" "Tamil" "TmlIT" t "Tamil ITRANS"))
(quail-define-indian-trans-package
@@ -293,16 +311,39 @@ You can input characters using the following mapping tables.
Example: To enter வணக்கம், type vaNakkam.
### Basic syllables (consonants + vowels) ###
-\\<quail-tamil-itrans-syllable-table>
+\\=\\<quail-tamil-itrans-syllable-table>
+
+### Miscellaneous (various signs) ###
+\\=\\<quail-tamil-itrans-various-signs-table>
+
+### Others (numerics + symbols) ###
+
+Characters below have no ITRANS method associated with them.
+Their descriptions are included for easy reference.
+\\=\\<quail-tamil-itrans-numerics-and-symbols-table>
+
+Full key sequences are listed below:")
+
+(if nil
+ (quail-define-package "tamil-itrans-digits" "Tamil" "TmlITD" t "Tamil ITRANS with digits"))
+(quail-define-indian-trans-package
+ indian-tml-itrans-digits-v5-hash "tamil-itrans-digits" "Tamil" "TmlITD"
+ "Tamil transliteration by ITRANS method with Tamil digits support.
+
+You can input characters using the following mapping tables.
+ Example: To enter வணக்கம், type vaNakkam.
+
+### Basic syllables (consonants + vowels) ###
+\\=\\<quail-tamil-itrans-syllable-table>
### Miscellaneous (various signs + digits) ###
-\\<quail-tamil-itrans-various-signs-and-digits-table>
+\\=\\<quail-tamil-itrans-various-signs-and-digits-table>
### Others (numerics + symbols) ###
Characters below have no ITRANS method associated with them.
Their descriptions are included for easy reference.
-\\<quail-tamil-itrans-numerics-and-symbols-table>
+\\=\\<quail-tamil-itrans-numerics-and-symbols-table>
Full key sequences are listed below:")
@@ -479,6 +520,13 @@ Full key sequences are listed below:")
"tamil-inscript" "Tamil" "TmlIS"
"Tamil keyboard Inscript.")
+(if nil
+ (quail-define-package "tamil-inscript-digits" "Tamil" "TmlISD" t "Tamil keyboard Inscript with digits."))
+(quail-define-inscript-package
+ indian-tml-base-digits-table inscript-tml-keytable
+ "tamil-inscript-digits" "Tamil" "TmlISD"
+ "Tamil keyboard Inscript with Tamil digits support.")
+
;; Probhat Input Method
(quail-define-package
"bengali-probhat" "Bengali" "BngPB" t
--
2.33.1
[-- Attachment #3: Type: text/plain, Size: 431 bytes --]
>> 2. The problem with the include variable syntax is because `quail-help'
>> (which is used eventually by `describe-input-method') calls
>> `substitute-command-keys' on the docstring so to get the intended
>> behaviour, one has to write \\=\\<VAR> not \\<VAR>. The logic,
>> otherwise, is fine. Maybe this needs to be documented?
>
> Yes, please.
>
I tried to fix this, please see attached patch,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0001-quail.el-quail-define-package-Describe-VAR-form-in-D.patch --]
[-- Type: text/x-patch, Size: 1103 bytes --]
From 883f6f504ef10b846af54f057dd3bc3de5bb8971 Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
Date: Sun, 13 Mar 2022 12:31:16 +0530
Subject: [PATCH] * quail.el (quail-define-package): Describe VAR form in
DOCSTRING better
---
lisp/international/quail.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 14d4c383b2..529cf97215 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -412,8 +412,8 @@ If it is nil, the current key is shown.
DOCSTRING is the documentation string of this package. The command
`describe-input-method' shows this string while replacing the form
-\\=\\<VAR> in the string by the value of VAR. That value should be a
-string. For instance, the form \\=\\<quail-translation-docstring> is
+\\=\\=\\=\\<VAR> in the string by the value of VAR. That value should be a
+string. For instance, the form \\=\\=\\=\\<quail-translation-docstring> is
replaced by a description about how to select a translation from a
list of candidates.
--
2.33.1
[-- Attachment #5: Type: text/plain, Size: 12 bytes --]
> Thanks.
next prev parent reply other threads:[~2022-03-13 7:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-21 9:25 bug#50143: 28.0.50; Various issues with `tamil-itrans' input method Ramesh Nedunchezian
2021-08-22 7:28 ` Eli Zaretskii
2022-02-15 12:01 ` Visuwesh
2022-02-16 17:36 ` Eli Zaretskii
2022-02-17 2:14 ` Visuwesh
2022-02-17 6:33 ` Eli Zaretskii
2022-02-17 10:53 ` Visuwesh
2022-02-17 17:30 ` Eli Zaretskii
2022-02-18 1:01 ` Visuwesh
2022-02-18 7:58 ` Eli Zaretskii
2022-03-13 5:51 ` Visuwesh
2022-03-13 5:59 ` Visuwesh
2022-03-13 6:35 ` Eli Zaretskii
2022-03-13 7:16 ` Visuwesh [this message]
2022-03-13 8:23 ` Eli Zaretskii
2022-03-13 9:01 ` Visuwesh
2022-03-13 9:41 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cziqgw4b.fsf@gmail.com \
--to=visuweshm@gmail.com \
--cc=50143@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rameshnedunchezian@outlook.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).