* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
@ 2021-08-21 9:25 Ramesh Nedunchezian
2021-08-22 7:28 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Ramesh Nedunchezian @ 2021-08-21 9:25 UTC (permalink / raw)
To: 50143
[-- Attachment #1: Type: text/plain, Size: 3854 bytes --]
I am working on `tamil-phonetic.el`, a "Tamil Phonetic Input for
Emacs". See https://github.com/rnchzn/tamil-phonetic and
https://raw.githubusercontent.com/rnchzn/tamil-phonetic/main/tamil-phonetic.el.
I will be submitting this library for inclusion in NON GNU ELPA.
In preparation for that step, I desire fixes for three issues listed
below. Of these first two are bugs, and the last is an API
enhancement request.
1. The `indian-tml-base-table' has no entries for letters ௐ and ஶ.
The fix for this would be to do this:
(setcar (nthcdr (seq-position (nth 2 indian-itrans-v5-table-for-tamil) '("AUM" "OM")
(lambda (s1 s2)
(when (and (consp s1) (consp s2))
(string= (car s1) (car s2)))))
(nth 2 indian-tml-base-table))
?ௐ)
(setcar (nthcdr (seq-position (nth 1 indian-itrans-v5-table-for-tamil) "sh"
(lambda (s1 s2)
(when (and (stringp s1) (stringp s2))
(string= s1 s2))))
(nth 1 indian-tml-base-table))
?ஶ)
I have chosen entry for "sh" above because of the recommendations
in the following link https://github.com/avinash311/itrans and
https://docs.google.com/spreadsheets/d/14wZl8zCa4khZV3El2VGoqurKBLGx21mbS-yORi4w7Qo/edit#gid=0
See the attached screenshot for relevant portions.
2. M-x describe-input-method RET tamil-itrans RET doesn't show the
help table. i.e., instead of saying
> Uses keymap ‘quail-tamil-itrans-syllable-table’, which is not currently defined.
it should display the value of `quail-tamil-itrans-syllable-table'
inline.
The problem is the docstring uses "keymap" syntax, when in actual
fact, that variable in NOT a keymap but a text with some display
properties.
There are two more such variables that have the same issues as
above variable.
See the attached screenshot.
3. `indian-make-hash` ALWAYS installs translation for decimal digits
0-9. Tamil decimal digits are NOT used at all i.e., it is not even
taught in Schools in the state of TamilNadu, India. So, I wanted a
way NOT to insall the translation for digits. I suggest one of the
following:
- Change signature of `(indian-make-hash TABLE TRANS-TABLE)' to
`(indian-make-hash TABLE TRANS-TABLE &optional
DONT-INSTALL-NATIVE-DIGITS)' or some such thing.
`indian-make-hash' is used by many indic scripts, so I am not
sure if other indian language users would have a need for
inputting native decimal digits. I--as a representative of Tamil
speakers--can say that we don't need that ON by default.
- Or provide a new API which honors looks at digits row of
TRANS-TABLE and honor it. This way the caller has more
flexibility in installing mapping of his choice.
In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
of 2021-07-08 built on debian
Repository revision: 7d6d14023a4ad7907c6e10ebdb49d78f9c6393e4
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
'configure -with-imagemagick --with-json --with-xwidgets'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2
M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS
TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB
Important settings:
value of $LANG: en_IN
value of $XMODIFIERS: @im=ibus
locale-coding-system: iso-latin-1-unix
[-- Attachment #2: Screenshot from 2021-08-21 14-50-53.png --]
[-- Type: image/png, Size: 112941 bytes --]
[-- Attachment #3: Screenshot from 2021-08-21 14-17-22.png --]
[-- Type: image/png, Size: 96461 bytes --]
[-- Attachment #4: Screenshot from 2021-08-21 14-18-15.png --]
[-- Type: image/png, Size: 82119 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
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
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2021-08-22 7:28 UTC (permalink / raw)
To: Ramesh Nedunchezian; +Cc: 50143
> From: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
> Date: Sat, 21 Aug 2021 14:55:23 +0530
>
> I am working on `tamil-phonetic.el`, a "Tamil Phonetic Input for
> Emacs". See https://github.com/rnchzn/tamil-phonetic and
> https://raw.githubusercontent.com/rnchzn/tamil-phonetic/main/tamil-phonetic.el.
> I will be submitting this library for inclusion in NON GNU ELPA.
Thanks in advance. is there any reason why you couldn't submit this
to GNU ELPA or even to Emacs itself? Input methods are generally
considered to be the stuff for Emacs core, not for third-party
packages.
> In preparation for that step, I desire fixes for three issues listed
> below. Of these first two are bugs, and the last is an API
> enhancement request.
>
> 1. The `indian-tml-base-table' has no entries for letters ௐ and ஶ.
> The fix for this would be to do this:
>
> (setcar (nthcdr (seq-position (nth 2 indian-itrans-v5-table-for-tamil) '("AUM" "OM")
> (lambda (s1 s2)
> (when (and (consp s1) (consp s2))
> (string= (car s1) (car s2)))))
> (nth 2 indian-tml-base-table))
> ?ௐ)
>
> (setcar (nthcdr (seq-position (nth 1 indian-itrans-v5-table-for-tamil) "sh"
> (lambda (s1 s2)
> (when (and (stringp s1) (stringp s2))
> (string= s1 s2))))
> (nth 1 indian-tml-base-table))
> ?ஶ)
>
> I have chosen entry for "sh" above because of the recommendations
> in the following link https://github.com/avinash311/itrans and
> https://docs.google.com/spreadsheets/d/14wZl8zCa4khZV3El2VGoqurKBLGx21mbS-yORi4w7Qo/edit#gid=0
I'm not sure I understand how changes to
indian-itrans-v5-table-for-tamil could affect indian-tml-base-table.
Could you explain what I missed?
In any case, please propose the changes to do the above in the form of
a patch for lisp/language/ind-util.el.
> 2. M-x describe-input-method RET tamil-itrans RET doesn't show the
> help table. i.e., instead of saying
>
> > Uses keymap ‘quail-tamil-itrans-syllable-table’, which is not currently defined.
>
> it should display the value of `quail-tamil-itrans-syllable-table'
> inline.
>
> The problem is the docstring uses "keymap" syntax, when in actual
> fact, that variable in NOT a keymap but a text with some display
> properties.
>
> There are two more such variables that have the same issues as
> above variable.
>
> See the attached screenshot.
Again, could you please propose a patch to do this?
> 3. `indian-make-hash` ALWAYS installs translation for decimal digits
> 0-9. Tamil decimal digits are NOT used at all i.e., it is not even
> taught in Schools in the state of TamilNadu, India. So, I wanted a
> way NOT to insall the translation for digits. I suggest one of the
> following:
>
> - Change signature of `(indian-make-hash TABLE TRANS-TABLE)' to
> `(indian-make-hash TABLE TRANS-TABLE &optional
> DONT-INSTALL-NATIVE-DIGITS)' or some such thing.
This change of the API is acceptable, so please propose a patch along
these lines.
> `indian-make-hash' is used by many indic scripts, so I am not
> sure if other indian language users would have a need for
> inputting native decimal digits. I--as a representative of Tamil
> speakers--can say that we don't need that ON by default.
We can use this for Tamil only for now, and wait for users of other
languages to chime in.
Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2021-08-22 7:28 ` Eli Zaretskii
@ 2022-02-15 12:01 ` Visuwesh
2022-02-16 17:36 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-02-15 12:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143, Ramesh Nedunchezian
[ஞாயிறு, ஆகஸ்ட் 22 2021] Eli Zaretskii wrote:
Hello, Eli
>> From: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
>> Date: Sat, 21 Aug 2021 14:55:23 +0530
>>
>> I am working on `tamil-phonetic.el`, a "Tamil Phonetic Input for
>> Emacs". See https://github.com/rnchzn/tamil-phonetic and
>> https://raw.githubusercontent.com/rnchzn/tamil-phonetic/main/tamil-phonetic.el.
>> I will be submitting this library for inclusion in NON GNU ELPA.
>> [...]
>> 3. `indian-make-hash` ALWAYS installs translation for decimal digits
>> 0-9. Tamil decimal digits are NOT used at all i.e., it is not even
>> taught in Schools in the state of TamilNadu, India. So, I wanted a
>> way NOT to insall the translation for digits. I suggest one of the
>> following:
>>
>> - Change signature of `(indian-make-hash TABLE TRANS-TABLE)' to
>> `(indian-make-hash TABLE TRANS-TABLE &optional
>> DONT-INSTALL-NATIVE-DIGITS)' or some such thing.
>
> This change of the API is acceptable, so please propose a patch along
> these lines.
>
I wanted to send a patch so I took a quick look at ind-util.el, and ISTM
that the hashtable `indian-tml-itrans-v5-hash' is calculated just once?
Unfortunately, I don't understand the dances in ind-util.el,
lisp/leim/indian.el, etc. so I'm afraid I cannot be of any help here.
[ It should be a simple change if we don't make it a defcustom AFAIU. ]
>> `indian-make-hash' is used by many indic scripts, so I am not
>> sure if other indian language users would have a need for
>> inputting native decimal digits. I--as a representative of Tamil
>> speakers--can say that we don't need that ON by default.
>
> We can use this for Tamil only for now, and wait for users of other
> languages to chime in.
>
> Thanks.
As a native Tamil speaker, I can attest that contemporary text uses the
Arabic numerals (in fact, Tamil digits are mentioned as a matter of fact
in schools). I'm not sure about the situation in Sri Lanka, tho.
I can try asking the native speakers of Kannada, Telugu, Malayalam,
Hindi, Gujrati, and maybe Punjabi, Marathi and Bengali, too. The sample
size will mostly be N=1 for most of these languages however, but given
that they are native speakers, their statement should hold a lot of
weight.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-02-15 12:01 ` Visuwesh
@ 2022-02-16 17:36 ` Eli Zaretskii
2022-02-17 2:14 ` Visuwesh
2022-02-17 10:53 ` Visuwesh
0 siblings, 2 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-02-16 17:36 UTC (permalink / raw)
To: Visuwesh; +Cc: 50143, rameshnedunchezian
> From: Visuwesh <visuweshm@gmail.com>
> Cc: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>,
> 50143@debbugs.gnu.org
> Date: Tue, 15 Feb 2022 17:31:31 +0530
>
> >> 3. `indian-make-hash` ALWAYS installs translation for decimal digits
> >> 0-9. Tamil decimal digits are NOT used at all i.e., it is not even
> >> taught in Schools in the state of TamilNadu, India. So, I wanted a
> >> way NOT to insall the translation for digits. I suggest one of the
> >> following:
> >>
> >> - Change signature of `(indian-make-hash TABLE TRANS-TABLE)' to
> >> `(indian-make-hash TABLE TRANS-TABLE &optional
> >> DONT-INSTALL-NATIVE-DIGITS)' or some such thing.
> >
> > This change of the API is acceptable, so please propose a patch along
> > these lines.
> >
>
> I wanted to send a patch so I took a quick look at ind-util.el, and ISTM
> that the hashtable `indian-tml-itrans-v5-hash' is calculated just once?
> Unfortunately, I don't understand the dances in ind-util.el,
> lisp/leim/indian.el, etc. so I'm afraid I cannot be of any help here.
>
> [ It should be a simple change if we don't make it a defcustom AFAIU. ]
>
> >> `indian-make-hash' is used by many indic scripts, so I am not
> >> sure if other indian language users would have a need for
> >> inputting native decimal digits. I--as a representative of Tamil
> >> speakers--can say that we don't need that ON by default.
> >
> > We can use this for Tamil only for now, and wait for users of other
> > languages to chime in.
> >
> > Thanks.
>
> As a native Tamil speaker, I can attest that contemporary text uses the
> Arabic numerals (in fact, Tamil digits are mentioned as a matter of fact
> in schools). I'm not sure about the situation in Sri Lanka, tho.
It sounds like a better way forward would be to define a separate
input method, so that the existing input method is preserved and can
be used if someone wants the current transliterations.
So my suggestions would be:
1. For your items 1 and 3, just copy indian-tml-base-table to a new
variable, modify it to include the two missing characters and
replace the digits with nil, add a new variable similar to
indian-tml-itrans-v5-hash, and compute its value like we do with
indian-tml-itrans-v5-hash, but using the new table instead of
indian-tml-base-table. Then make a new input method, called, say,
tamil-itrans-alt, which would use the new hash variable instead of
indian-tml-itrans-v5-hash. Submit these changes as patches to
lisp/language/ind-util.el and lisp/leim/quail/indian.el.
2. For your item 2, submit a patch that fixes the docstring of the
relevant input methods.
Would that work for you? Can you prepare such patches?
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
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
1 sibling, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-02-17 2:14 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143, rameshnedunchezian
[புதன், பிப்ரவரி 16 2022] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>,
>> 50143@debbugs.gnu.org
>> Date: Tue, 15 Feb 2022 17:31:31 +0530
>>
>> I wanted to send a patch so I took a quick look at ind-util.el, and ISTM
>> that the hashtable `indian-tml-itrans-v5-hash' is calculated just once?
>> Unfortunately, I don't understand the dances in ind-util.el,
>> lisp/leim/indian.el, etc. so I'm afraid I cannot be of any help here.
>>
>> [ It should be a simple change if we don't make it a defcustom AFAIU. ]
>>
>> >> `indian-make-hash' is used by many indic scripts, so I am not
>> >> sure if other indian language users would have a need for
>> >> inputting native decimal digits. I--as a representative of Tamil
>> >> speakers--can say that we don't need that ON by default.
>> >
>> > We can use this for Tamil only for now, and wait for users of other
>> > languages to chime in.
>> >
>> > Thanks.
>>
>> As a native Tamil speaker, I can attest that contemporary text uses the
>> Arabic numerals (in fact, Tamil digits are mentioned as a matter of fact
>> in schools). I'm not sure about the situation in Sri Lanka, tho.
>
> It sounds like a better way forward would be to define a separate
> input method, so that the existing input method is preserved and can
> be used if someone wants the current transliterations.
>
> So my suggestions would be:
>
> 1. For your items 1 and 3, just copy indian-tml-base-table to a new
> variable, modify it to include the two missing characters and
> replace the digits with nil, add a new variable similar to
> indian-tml-itrans-v5-hash, and compute its value like we do with
> indian-tml-itrans-v5-hash, but using the new table instead of
> indian-tml-base-table. Then make a new input method, called, say,
> tamil-itrans-alt, which would use the new hash variable instead of
> indian-tml-itrans-v5-hash. Submit these changes as patches to
> lisp/language/ind-util.el and lisp/leim/quail/indian.el.
>
Would it alright to change the default input method used in the Tamil
language environment to the new IM without digit translation?
> 2. For your item 2, submit a patch that fixes the docstring of the
> relevant input methods.
>
> Would that work for you? Can you prepare such patches?
Yes, that would be satisfactory. I will look into it in the coming
weekend. Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-02-17 2:14 ` Visuwesh
@ 2022-02-17 6:33 ` Eli Zaretskii
0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-02-17 6:33 UTC (permalink / raw)
To: Visuwesh; +Cc: 50143, rameshnedunchezian
> From: Visuwesh <visuweshm@gmail.com>
> Cc: 50143@debbugs.gnu.org, rameshnedunchezian@outlook.com
> Date: Thu, 17 Feb 2022 07:44:52 +0530
>
> [புதன், பிப்ரவரி 16 2022] Eli Zaretskii wrote:
>
> > It sounds like a better way forward would be to define a separate
> > input method, so that the existing input method is preserved and can
> > be used if someone wants the current transliterations.
> >
> > So my suggestions would be:
> >
> > 1. For your items 1 and 3, just copy indian-tml-base-table to a new
> > variable, modify it to include the two missing characters and
> > replace the digits with nil, add a new variable similar to
> > indian-tml-itrans-v5-hash, and compute its value like we do with
> > indian-tml-itrans-v5-hash, but using the new table instead of
> > indian-tml-base-table. Then make a new input method, called, say,
> > tamil-itrans-alt, which would use the new hash variable instead of
> > indian-tml-itrans-v5-hash. Submit these changes as patches to
> > lisp/language/ind-util.el and lisp/leim/quail/indian.el.
> >
>
> Would it alright to change the default input method used in the Tamil
> language environment to the new IM without digit translation?
Yes, after we make a new input method, it is OK to make it the default
for Tamil. Users who for some reason want the old one can then
customize their Emacs accordingly.
> > 2. For your item 2, submit a patch that fixes the docstring of the
> > relevant input methods.
> >
> > Would that work for you? Can you prepare such patches?
>
> Yes, that would be satisfactory. I will look into it in the coming
> weekend. Thanks.
TIA.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-02-16 17:36 ` Eli Zaretskii
2022-02-17 2:14 ` Visuwesh
@ 2022-02-17 10:53 ` Visuwesh
2022-02-17 17:30 ` Eli Zaretskii
1 sibling, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-02-17 10:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143, rameshnedunchezian
[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]
[புதன், பிப்ரவரி 16 2022] Eli Zaretskii wrote:
Hi Eli,
>> As a native Tamil speaker, I can attest that contemporary text uses the
>> Arabic numerals (in fact, Tamil digits are mentioned as a matter of fact
>> in schools). I'm not sure about the situation in Sri Lanka, tho.
>
> It sounds like a better way forward would be to define a separate
> input method, so that the existing input method is preserved and can
> be used if someone wants the current transliterations.
>
> So my suggestions would be:
>
> 1. For your items 1 and 3, just copy indian-tml-base-table to a new
> variable, modify it to include the two missing characters and
> replace the digits with nil, add a new variable similar to
> indian-tml-itrans-v5-hash, and compute its value like we do with
> indian-tml-itrans-v5-hash, but using the new table instead of
> indian-tml-base-table. Then make a new input method, called, say,
> tamil-itrans-alt, which would use the new hash variable instead of
> indian-tml-itrans-v5-hash. Submit these changes as patches to
> lisp/language/ind-util.el and lisp/leim/quail/indian.el.
>
Does the attached patch look okay to you?
[-- Attachment #2: tamil-nodigs.patch --]
[-- Type: text/x-patch, Size: 4787 bytes --]
diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el
index 8b1c3d69ae..7b11be60d5 100644
--- a/lisp/language/ind-util.el
+++ b/lisp/language/ind-util.el
@@ -277,6 +277,29 @@
(;; Inscript-extra (4) (#, $, ^, *, ])
"்ர" "ர்" "த்ர" nil nil)))
+(defvar indian-tml-no-digits-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-base-table-to-language-alist
'((indian-dev-base-table . "Devanagari")
(indian-pnj-base-table . "Punjabi")
@@ -286,6 +309,7 @@
(indian-tlg-base-table . "Telugu")
(indian-knd-base-table . "Kannada")
(indian-mlm-base-table . "Malayalam")
+ ;; TODO: Change this?
(indian-tml-base-table . "Tamil")))
(defvar indian-itrans-v5-table
@@ -557,6 +581,10 @@
(defvar indian-tml-itrans-v5-hash
(indian-make-hash indian-tml-base-table
indian-itrans-v5-table-for-tamil))
+
+(defvar indian-tml-itrans-no-digits-v5-hash
+ (indian-make-hash indian-tml-no-digits-base-table
+ indian-itrans-v5-table-for-tamil))
)
(defmacro indian-translate-region (from to hashtable encode-p)
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index e0adb0de6c..ec0bcb9be9 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -92,7 +92,7 @@ are supported in this language environment."))
"Tamil" '((charset unicode)
(coding-system utf-8)
(coding-priority utf-8)
- (input-method . "tamil-itrans")
+ (input-method . "tamil-itrans-nodig")
(documentation . "\
South Indian Language Tamil is supported in this language environment."))
'("Indian"))
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
index 23204c0cd3..7788efb941 100644
--- a/lisp/leim/quail/indian.el
+++ b/lisp/leim/quail/indian.el
@@ -284,9 +284,31 @@
(buffer-string))))
(if nil
- (quail-define-package "tamil-itrans" "Tamil" "TmlIT" t "Tamil ITRANS"))
+ (quail-define-package "tamil-itrans" "Tamil" "TmlIT" t "Tamil ITRANS with digits"))
(quail-define-indian-trans-package
indian-tml-itrans-v5-hash "tamil-itrans" "Tamil" "TmlIT"
+ "Tamil transliteration by ITRANS method with Tamil digits.
+
+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>
+
+### 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-nodig" "Tamil" "TmlITN" t "Tamil ITRANS"))
+(quail-define-indian-trans-package
+ indian-tml-itrans-no-digits-v5-hash "tamil-itrans-nodig" "Tamil" "TmlITN"
"Tamil transliteration by ITRANS method.
You can input characters using the following mapping tables.
@@ -473,10 +495,16 @@ Full key sequences are listed below:")
(quail-defrule "X" ?)
(if nil
- (quail-define-package "tamil-inscript" "Tamil" "TmlIS" t "Tamil keyboard Inscript"))
+ (quail-define-package "tamil-inscript" "Tamil" "TmlIS" t "Tamil keyboard Inscript with Tamil digits"))
(quail-define-inscript-package
indian-tml-base-table inscript-tml-keytable
"tamil-inscript" "Tamil" "TmlIS"
+ "Tamil keyboard Inscript with Tamil digits.")
+(if nil
+ (quail-define-package "tamil-inscript-nodig" "Tamil" "TmlISN" t "Tamil keyboard Inscript"))
+(quail-define-inscript-package
+ indian-tml-no-digits-base-table inscript-tml-keytable
+ "tamil-inscript-nodig" "Tamil" "TmlISN"
"Tamil keyboard Inscript.")
;; Probhat Input Method
[-- Attachment #3: Type: text/plain, Size: 1149 bytes --]
The names of the new input methods are bad. IMO, tamil-itrans and
tamil-inscript should ideally be renamed to tamil-itrans-digits and
tamil-inscript-digits, and the new input methods should be tamil-itrans
and tamil-inscript. But I guess such a backwards incompatible change
won't fly?
> 2. For your item 2, submit a patch that fixes the docstring of the
> relevant input methods.
About item 2: according to the docstring of `quail-define-package',
constructs of the form "\<VAR>" should be replaced by the VAR:
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
replaced by a description about how to select a translation from a
list of candidates.
but this is not the case, I checked the code but don't see a
substitution like this happen. Maybe this should be fixed in
`describe-input-method' instead?
>
> Would that work for you? Can you prepare such patches?
^ permalink raw reply related [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-02-17 10:53 ` Visuwesh
@ 2022-02-17 17:30 ` Eli Zaretskii
2022-02-18 1:01 ` Visuwesh
2022-03-13 5:51 ` Visuwesh
0 siblings, 2 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-02-17 17:30 UTC (permalink / raw)
To: Visuwesh; +Cc: 50143, rameshnedunchezian
> From: Visuwesh <visuweshm@gmail.com>
> Cc: rameshnedunchezian@outlook.com, 50143@debbugs.gnu.org
> Date: Thu, 17 Feb 2022 16:23:06 +0530
>
> > 1. For your items 1 and 3, just copy indian-tml-base-table to a new
> > variable, modify it to include the two missing characters and
> > replace the digits with nil, add a new variable similar to
> > indian-tml-itrans-v5-hash, and compute its value like we do with
> > indian-tml-itrans-v5-hash, but using the new table instead of
> > indian-tml-base-table. Then make a new input method, called, say,
> > tamil-itrans-alt, which would use the new hash variable instead of
> > indian-tml-itrans-v5-hash. Submit these changes as patches to
> > lisp/language/ind-util.el and lisp/leim/quail/indian.el.
> >
>
> Does the attached patch look okay to you?
Yes, thanks.
> The names of the new input methods are bad. IMO, tamil-itrans and
> tamil-inscript should ideally be renamed to tamil-itrans-digits and
> tamil-inscript-digits, and the new input methods should be tamil-itrans
> and tamil-inscript. But I guess such a backwards incompatible change
> won't fly?
No, I think you can do the renaming. The change is already
incompatible, because we will be changing the default input method, so
it will need a NEWS entry to tell how to get back old behavior, and in
that NEWS entry we can also tell users to switch to another input
method.
> > 2. For your item 2, submit a patch that fixes the docstring of the
> > relevant input methods.
>
> About item 2: according to the docstring of `quail-define-package',
> constructs of the form "\<VAR>" should be replaced by the VAR:
>
> 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
> replaced by a description about how to select a translation from a
> list of candidates.
>
> but this is not the case, I checked the code but don't see a
> substitution like this happen. Maybe this should be fixed in
> `describe-input-method' instead?
If you can find the problem and fix i there, fine. But fixing only a
small number of input methods with patches specific to those methods
is also fine.
Btw, the patch is already close to the limit of what we can accept
without copyright assignment, so would you like to start your legal
paperwork rolling at this time, so that we could in the future accept
more contributions from you? If yes, I will send you the form to fill
and the instructions to go with that.
Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
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
1 sibling, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-02-18 1:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143, rameshnedunchezian
[வியாழன், பிப்ரவரி 17 2022] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: rameshnedunchezian@outlook.com, 50143@debbugs.gnu.org
>> Date: Thu, 17 Feb 2022 16:23:06 +0530
>>
>> > 1. For your items 1 and 3, just copy indian-tml-base-table to a new
>> > variable, modify it to include the two missing characters and
>> > replace the digits with nil, add a new variable similar to
>> > indian-tml-itrans-v5-hash, and compute its value like we do with
>> > indian-tml-itrans-v5-hash, but using the new table instead of
>> > indian-tml-base-table. Then make a new input method, called, say,
>> > tamil-itrans-alt, which would use the new hash variable instead of
>> > indian-tml-itrans-v5-hash. Submit these changes as patches to
>> > lisp/language/ind-util.el and lisp/leim/quail/indian.el.
>> >
>>
>> Does the attached patch look okay to you?
>
> Yes, thanks.
>
>> The names of the new input methods are bad. IMO, tamil-itrans and
>> tamil-inscript should ideally be renamed to tamil-itrans-digits and
>> tamil-inscript-digits, and the new input methods should be tamil-itrans
>> and tamil-inscript. But I guess such a backwards incompatible change
>> won't fly?
>
> No, I think you can do the renaming. The change is already
> incompatible, because we will be changing the default input method, so
> it will need a NEWS entry to tell how to get back old behavior, and in
> that NEWS entry we can also tell users to switch to another input
> method.
>
Okay, I will do that, thanks.
>> > 2. For your item 2, submit a patch that fixes the docstring of the
>> > relevant input methods.
>>
>> About item 2: according to the docstring of `quail-define-package',
>> constructs of the form "\<VAR>" should be replaced by the VAR:
>>
>> 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
>> replaced by a description about how to select a translation from a
>> list of candidates.
>>
>> but this is not the case, I checked the code but don't see a
>> substitution like this happen. Maybe this should be fixed in
>> `describe-input-method' instead?
>
> If you can find the problem and fix i there, fine. But fixing only a
> small number of input methods with patches specific to those methods
> is also fine.
>
I will see what if I can fix it in the `describe-input-method' level,
and if I cannot figure it out, I will patch the input methods instead.
> Btw, the patch is already close to the limit of what we can accept
> without copyright assignment, so would you like to start your legal
> paperwork rolling at this time, so that we could in the future accept
> more contributions from you? If yes, I will send you the form to fill
> and the instructions to go with that.
>
> Thanks.
Yes, I would appreciate it, thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-02-18 1:01 ` Visuwesh
@ 2022-02-18 7:58 ` Eli Zaretskii
0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-02-18 7:58 UTC (permalink / raw)
To: Visuwesh; +Cc: 50143, rameshnedunchezian
> From: Visuwesh <visuweshm@gmail.com>
> Cc: rameshnedunchezian@outlook.com, 50143@debbugs.gnu.org
> Date: Fri, 18 Feb 2022 06:31:52 +0530
>
> > Btw, the patch is already close to the limit of what we can accept
> > without copyright assignment, so would you like to start your legal
> > paperwork rolling at this time, so that we could in the future accept
> > more contributions from you? If yes, I will send you the form to fill
> > and the instructions to go with that.
> >
> > Thanks.
>
> Yes, I would appreciate it, thanks.
Form sent off-list. Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-02-17 17:30 ` Eli Zaretskii
2022-02-18 1:01 ` Visuwesh
@ 2022-03-13 5:51 ` Visuwesh
2022-03-13 5:59 ` Visuwesh
1 sibling, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-03-13 5:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143, rameshnedunchezian
[-- Attachment #1: Type: text/plain, Size: 2870 bytes --]
[வியாழன், பிப்ரவரி 17 2022] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: rameshnedunchezian@outlook.com, 50143@debbugs.gnu.org
>> Date: Thu, 17 Feb 2022 16:23:06 +0530
>>
>> > 1. For your items 1 and 3, just copy indian-tml-base-table to a new
>> > variable, modify it to include the two missing characters and
>> > replace the digits with nil, add a new variable similar to
>> > indian-tml-itrans-v5-hash, and compute its value like we do with
>> > indian-tml-itrans-v5-hash, but using the new table instead of
>> > indian-tml-base-table. Then make a new input method, called, say,
>> > tamil-itrans-alt, which would use the new hash variable instead of
>> > indian-tml-itrans-v5-hash. Submit these changes as patches to
>> > lisp/language/ind-util.el and lisp/leim/quail/indian.el.
>> >
>>
>> Does the attached patch look okay to you?
>
> Yes, thanks.
>
>> The names of the new input methods are bad. IMO, tamil-itrans and
>> tamil-inscript should ideally be renamed to tamil-itrans-digits and
>> tamil-inscript-digits, and the new input methods should be tamil-itrans
>> and tamil-inscript. But I guess such a backwards incompatible change
>> won't fly?
>
> No, I think you can do the renaming. The change is already
> incompatible, because we will be changing the default input method, so
> it will need a NEWS entry to tell how to get back old behavior, and in
> that NEWS entry we can also tell users to switch to another input
> method.
>
>> > 2. For your item 2, submit a patch that fixes the docstring of the
>> > relevant input methods.
>>
>> About item 2: according to the docstring of `quail-define-package',
>> constructs of the form "\<VAR>" should be replaced by the VAR:
>>
>> 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
>> replaced by a description about how to select a translation from a
>> list of candidates.
>>
>> but this is not the case, I checked the code but don't see a
>> substitution like this happen. Maybe this should be fixed in
>> `describe-input-method' instead?
>
> If you can find the problem and fix i there, fine. But fixing only a
> small number of input methods with patches specific to those methods
> is also fine.
>
I finally decided to procrastinate by working on this patch for once,
please see updated patch below. I'm not really sure if the commit
message's format is okay (C-c C-w barfs at me), so I tried to do it
manually. Also, I think the NEWS entries can be improved but I'm not
sure how.
[-- Attachment #2: 0001-Follow-contemporary-practices-in-the-Tamil-IMs.patch --]
[-- Type: text/x-patch, Size: 6339 bytes --]
From b3a7148d638008d6990693cd3d59972b329c3fac 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 (tamil-itrans-digits)
(tamil-inscript-digits): New input method 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 | 38 ++++++++++++++++++++++++++++++++++----
3 files changed, 75 insertions(+), 4 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..33ad79fce4 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)
@@ -293,16 +293,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 + 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:")
+
+(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>
+
+### 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:")
@@ -479,6 +502,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: 424 bytes --]
> Btw, the patch is already close to the limit of what we can accept
> without copyright assignment, so would you like to start your legal
> paperwork rolling at this time, so that we could in the future accept
> more contributions from you? If yes, I will send you the form to fill
> and the instructions to go with that.
>
BTW, I sent the mail to assign@gnu.org on 23rd Feb, and haven't heard
from them yet.
> Thanks.
^ permalink raw reply related [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-03-13 5:51 ` Visuwesh
@ 2022-03-13 5:59 ` Visuwesh
2022-03-13 6:35 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-03-13 5:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143, rameshnedunchezian
[ஞாயிறு, மார்ச் 13 2022] Visuwesh wrote:
> [வியாழன், பிப்ரவரி 17 2022] Eli Zaretskii wrote:
> [...]
>
> I finally decided to procrastinate by working on this patch for once,
> please see updated patch below. I'm not really sure if the commit
> message's format is okay (C-c C-w barfs at me), so I tried to do it
> manually. Also, I think the NEWS entries can be improved but I'm not
> sure how.
>
> [...]
I forgot to include these two details:
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.
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? WDYT.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-03-13 5:59 ` Visuwesh
@ 2022-03-13 6:35 ` Eli Zaretskii
2022-03-13 7:16 ` Visuwesh
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-03-13 6:35 UTC (permalink / raw)
To: Visuwesh; +Cc: 50143, rameshnedunchezian
> 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.
> 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.
Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-03-13 6:35 ` Eli Zaretskii
@ 2022-03-13 7:16 ` Visuwesh
2022-03-13 8:23 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-03-13 7:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143, rameshnedunchezian
[-- 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.
^ permalink raw reply related [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-03-13 7:16 ` Visuwesh
@ 2022-03-13 8:23 ` Eli Zaretskii
2022-03-13 9:01 ` Visuwesh
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2022-03-13 8:23 UTC (permalink / raw)
To: Visuwesh; +Cc: 50143-done, rameshnedunchezian
> From: Visuwesh <visuweshm@gmail.com>
> Cc: 50143@debbugs.gnu.org, rameshnedunchezian@outlook.com
> Date: Sun, 13 Mar 2022 12:46:52 +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?
LGTM, installed.
> >> 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,
Thanks, installed.
> > Btw, the patch is already close to the limit of what we can accept
> > without copyright assignment, so would you like to start your legal
> > paperwork rolling at this time, so that we could in the future accept
> > more contributions from you? If yes, I will send you the form to fill
> > and the instructions to go with that.
> >
>
> BTW, I sent the mail to assign@gnu.org on 23rd Feb, and haven't heard
> from them yet.
Please send a reminder to them and CC me. Thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-03-13 8:23 ` Eli Zaretskii
@ 2022-03-13 9:01 ` Visuwesh
2022-03-13 9:41 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Visuwesh @ 2022-03-13 9:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 50143-done, rameshnedunchezian
[ஞாயிறு, மார்ச் 13 2022] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: 50143@debbugs.gnu.org, rameshnedunchezian@outlook.com
>> Date: Sun, 13 Mar 2022 12:46:52 +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?
>
> LGTM, installed.
>
>> >> 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,
>
> Thanks, installed.
>
Thanks! BTW, I noticed that I have a typo that you missed,
** 'indian-tml-itrans-v5-hash' no longer translates digits.
Use 'indian-tml-itrans-digits-v5-hash' if you digits translation.
should be
** 'indian-tml-itrans-v5-hash' no longer translates digits.
Use 'indian-tml-itrans-digits-v5-hash' if you want digits
translation.
(i.e., I missed a "want" between "you" and "digits")
>> > Btw, the patch is already close to the limit of what we can accept
>> > without copyright assignment, so would you like to start your legal
>> > paperwork rolling at this time, so that we could in the future accept
>> > more contributions from you? If yes, I will send you the form to fill
>> > and the instructions to go with that.
>> >
>>
>> BTW, I sent the mail to assign@gnu.org on 23rd Feb, and haven't heard
>> from them yet.
>
> Please send a reminder to them and CC me. Thanks.
I have done that, thanks.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#50143: 28.0.50; Various issues with `tamil-itrans' input method
2022-03-13 9:01 ` Visuwesh
@ 2022-03-13 9:41 ` Eli Zaretskii
0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2022-03-13 9:41 UTC (permalink / raw)
To: Visuwesh; +Cc: 50143-done, rameshnedunchezian
> From: Visuwesh <visuweshm@gmail.com>
> Cc: 50143-done@debbugs.gnu.org, rameshnedunchezian@outlook.com
> Date: Sun, 13 Mar 2022 14:31:33 +0530
>
> Thanks! BTW, I noticed that I have a typo that you missed,
>
> ** 'indian-tml-itrans-v5-hash' no longer translates digits.
> Use 'indian-tml-itrans-digits-v5-hash' if you digits translation.
>
> should be
>
> ** 'indian-tml-itrans-v5-hash' no longer translates digits.
> Use 'indian-tml-itrans-digits-v5-hash' if you want digits
> translation.
>
> (i.e., I missed a "want" between "you" and "digits")
Fixed.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2022-03-13 9:41 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-03-13 8:23 ` Eli Zaretskii
2022-03-13 9:01 ` Visuwesh
2022-03-13 9:41 ` Eli Zaretskii
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.