unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Kenichi Handa <handa@m17n.org>
Cc: 9336@debbugs.gnu.org
Subject: bug#9336: 24.0.50; No way to input character #xbb4 using ta-itrans
Date: Fri, 23 Sep 2011 16:51:59 +0530	[thread overview]
Message-ID: <817h4zcxm0.fsf@gmail.com> (raw)
In-Reply-To: <tl7wrd1b9iy.fsf@m17n.org> (Kenichi Handa's message of "Thu, 22 Sep 2011 11:23:01 +0900")

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]


Kenichi

>> Above character has two bindings - "za" or "Ja".
>> We can go with "za".  
>
> Ah, I forgot about my patch.

Yes, there is a pending patch.

> Anyway, please try the attached patch for
> leim/quail/indian.el.  How is the result of C-h C-\
> tamil-itrans RET?  Is it ok now?

The new 2-D table looks pretty good and I am VERY HAPPY with the
changes.

I have made some changes - presentation-wise - on top of your changes. I
have attached 3 screenshots that demonstrates the changes that I have
made [1]. FYI, my FSF copyright assignment number for Emacs is #618390.

I also propose that some additional changes be made to quail.el [2]. I
am unsure how to introduce these changes cleanly.


[-- Attachment #2: indian.el.9336.patch --]
[-- Type: text/x-patch, Size: 6738 bytes --]

--- a/indian.el	2011-09-19 09:06:02.000000000 +0530
+++ c/indian.el	2011-09-23 15:45:35.562500000 +0530
@@ -118,12 +118,188 @@
  indian-mlm-itrans-v5-hash "malayalam-itrans" "Malayalam" "MlmIT"
  "Malayalam transliteration by ITRANS method.")
 
+(defvar quail-tamil-itrans-syllable-table
+  (let ((vowels
+	 '(("அ" nil "a")
+	   ("ஆ" "ா" "A")
+	   ("இ" "ி" "i")
+	   ("ஈ" "ீ" "I")
+	   ("உ" "ு" "u")
+	   ("ஊ" "ூ" "U")
+	   ("எ" "ெ" "e")
+	   ("ஏ" "ே" "E")
+	   ("ஐ" "ை" "ai")
+	   ("ஒ" "ொ" "o")
+	   ("ஓ" "ோ" "O")
+	   ("ஔ" "ௌ" "au")))
+	(consonants
+	 '(("க" "k")			; U+0B95
+	   ("ங" "N^")			; U+0B99
+	   ("ச" "ch")			; U+0B9A
+	   ("ஞ" "JN")			; U+0B9E
+	   ("ட" "T")			; U+0B9F
+	   ("ண" "N")			; U+0BA3
+	   ("த" "t")			; U+0BA4
+	   ("ந" "n")			; U+0BA8
+	   ("ப" "p")			; U+0BAA
+	   ("ம" "m")			; U+0BAE
+	   ("ய" "y")			; U+0BAF
+	   ("ர" "r")			; U+0BB0
+	   ("ல" "l")			; U+0BB2
+	   ("வ" "v")			; U+0BB5
+	   ("ழ" "z")			; U+0BB4
+	   ("ள" "L")			; U+0BB3
+	   ("ற" "rh")			; U+0BB1
+	   ("ன" "nh")			; U+0BA9
+	   ("ஜ" "j")			; U+0B9C
+	   ("ஶ" nil)			; U+0BB6
+	   ("ஷ" "Sh")			; U+0BB7
+	   ("ஸ" "s")			; U+0BB8
+	   ("ஹ" "h")			; U+0BB9
+	   ("க்ஷ" "x" )			; U+0B95
+	   ))
+	(virama #x0BCD)
+	clm)
+    (with-temp-buffer
+      (insert "\n")
+      (insert "    +")
+      (insert-char ?- 74)
+      (insert "\n    |")
+      (setq clm 6)
+      (dolist (v vowels)
+	(insert (propertize "\t" 'display (list 'space :align-to clm))
+		(car v))
+	(setq clm (+ clm 6)))
+      (insert "\n    |")
+      (setq clm 6)
+      (dolist (v vowels)
+	(insert (propertize "\t" 'display (list 'space :align-to clm))
+		(nth 2 v))
+	(setq clm (+ clm 6)))
+      (dolist (c consonants)
+	(insert "\n----+")
+	(insert-char ?- 74)
+	(insert "\n")
+	(insert (car c) virama
+		(propertize "\t" 'display '(space :align-to 4))
+		"|")
+	(setq clm 6)
+	(dolist (v vowels)
+	  (insert (propertize "\t" 'display (list 'space :align-to clm))
+		  (car c) (or (nth 1 v) ""))
+	  (setq clm (+ clm 6)))
+	(insert "\n" (or (nth 1 c) "")
+		(propertize "\t" 'display '(space :align-to 4))
+		"|")
+	(setq clm 6)
+
+	(dolist (v vowels)
+	  (apply 'insert (propertize "\t" 'display (list 'space :align-to clm))
+		 (if (nth 1 c) (list (nth 1 c) (nth 2 v)) (list "")))
+	  (setq clm (+ clm 6))))
+      (insert "\n")
+      (insert "----+")
+      (insert-char ?- 74)
+      (insert "\n")
+      (buffer-string))))
+
+(defvar quail-tamil-itrans-numerics-and-symbols-table
+  (let ((symbols '((?௳ . "நாள்") (?௴ . "மாதம்") (?௵ . "வருடம்")
+		 (?௶ . "பற்று") (?௷ . "வரவு") (?௸ . "மேற்படி")
+		 (?௹ . "ரூபாய்") (?௺ . "எண்")))
+	(numerics '((?௰ . "பத்து") (?௱ . "நூறு") (?௲ . "ஆயிரம்")))
+	(width 6) clm)
+    (with-temp-buffer
+      (insert "\n" (make-string 18 ?-) "+" (make-string 50 ?-) "\n")
+      (insert
+       (propertize "\t" 'display (list 'space :align-to 5)) "numerics"
+       (propertize "\t" 'display (list 'space :align-to 18)) "|"
+       (propertize "\t" 'display (list 'space :align-to 38)) "symbols")
+      (insert "\n" (make-string 18 ?-) "+" (make-string 50 ?-) "\n")
+      (setq clm 0)
+      (dolist (symbols (list numerics symbols))
+	(unless (eq symbols numerics)
+	  (insert (propertize "\t" 'display (list 'space :align-to clm)) "|")
+	  (setq clm (+ clm width)))
+	(dolist (elm symbols)
+	  (insert (propertize "\t" 'display (list 'space :align-to clm))
+		  (car elm))
+	  (setq clm (+ clm width))))
+      (insert "\n")
+      (setq clm 0)
+      (dolist (symbols (list numerics symbols))
+	(unless (eq symbols numerics)
+	  (insert (propertize "\t" 'display (list 'space :align-to clm)) "|")
+	  (setq clm (+ clm width)))
+	(dolist (elm symbols)
+	  (insert (propertize "\t" 'display (list 'space :align-to clm))
+		  (or (cdr elm) ""))
+	  (setq clm (+ clm width))))
+      (insert "\n" (make-string 18 ?-) "+" (make-string 50 ?-) "\n")
+      (insert "\n")
+      (buffer-string))))
+
+(defvar quail-tamil-itrans-various-signs-and-digits-table
+  (let ((various '((?ஃ . "H") ("ஸ்ரீ" . "srii") (?ௐ)))
+	(digits "௦௧௨௩௪௫௬௭௮௯")
+	(width 6) clm)
+    (with-temp-buffer
+      (insert "\n" (make-string 18 ?-) "+" (make-string 60 ?-) "\n")
+      (insert
+       (propertize "\t" 'display (list 'space :align-to 5)) "various"
+       (propertize "\t" 'display (list 'space :align-to 18)) "|"
+       (propertize "\t" 'display (list 'space :align-to 45)) "digits")
+
+      (insert "\n" (make-string 18 ?-) "+" (make-string 60 ?-) "\n")
+      (setq clm 0 )
+
+      (dotimes (i (length various))
+	(insert (propertize "\t" 'display (list 'space :align-to clm))
+		(car (nth i various)))
+	(setq clm (+ clm width)))
+      (insert (propertize "\t" 'display (list 'space :align-to clm)) "|")
+      (setq clm (+ clm width))
+      (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))
+	(insert (propertize "\t" 'display (list 'space :align-to clm))
+		(or (cdr (nth i various)) ""))
+	(setq clm (+ clm width)))
+      (insert (propertize "\t" 'display (list 'space :align-to clm)) "|")
+      (setq clm (+ clm width))
+      (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")
+      (buffer-string))))
+
 (if nil
     (quail-define-package "tamil-itrans" "Tamil" "TmlIT" t "Tamil ITRANS"))
 (quail-define-indian-trans-package
  indian-tml-itrans-v5-hash "tamil-itrans" "Tamil" "TmlIT"
- "Tamil transliteration by ITRANS method.")
+ "Tamil transliteration by ITRANS method.
+
+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:")
 
 ;;;
 ;;; Input by Inscript

[-- Attachment #3: Type: text/plain, Size: 48 bytes --]


Footnotes: 
[1]  Summary of ta-itrans changes


[-- Attachment #4: ta-itrans-1.png --]
[-- Type: image/png, Size: 25759 bytes --]

[-- Attachment #5: ta-itrans-2.png --]
[-- Type: image/png, Size: 31716 bytes --]

[-- Attachment #6: ta-itrans-3.png --]
[-- Type: image/png, Size: 24823 bytes --]

[-- Attachment #7: Type: text/plain, Size: 2663 bytes --]


+ ta-itrans-1.png
  - I have introduced horizontal grid lines

  - I have added #0BB6 to the table. The character has no input method
    available. So the input row is left empty.

    Note: Furthermore, the associated glyphs are not available. (I have
    Tamil Lohit 2.4.5 - Thanks for suggesting this font!). So the tamil
    characters in that row looks malformed.

+ ta-itrans-2.png
  - I have split the single misc table used in your patch and split it
    in to two tables - "signs and digits table" and "numerics and
    symbols table".

    In the first table, 
    - I have removed Virama (0BCD) and Anusvara (0B82).
    - I have added TAMIL OM (0BD0) and the compound character `srii'.

    In the second table,
    - The characters have no input method. So I have included a
      description in native language to denote the purpose they serve. I
      believe there are advantages to including this table. For example,
      - It completes the catalogue and one can easily find out whether
        once font needs to be upgraded to display these (rarely used)
        characters.
      - Should there be a future request for assigning input methods to
        them, one need not work on it afresh.

[2] Additional hacks to quail.el

+ ta-itrans-3.png
  - Removed the old table (about which I had complaints). I don't know
    how to do this cleanly. Here is a quick hack I cooked up (marked
    with @@@)

,---- In quail.el (around line 2550 or so)
| 	(let* ((decode-map (list 'decode-map))
|                (num (quail-build-decode-map (list (quail-map)) "" decode-map
|                                             ;; We used to use 512 here, but
|                                             ;; TeX has more than 1000 and
|                                             ;; it's good to see the list.
|                                             0 5120 done-list)))
|@@@@@ 	  (when (and nil (> num 0)) 
| 	    (insert "
| KEY SEQUENCE
| ------------
| ")
| 	    (if (quail-show-layout)
| 		(insert "You can also input more characters")
| 	      (insert "You can input characters"))
| 	    (insert " by the following key sequences:\n")
| 	    (quail-insert-decode-map decode-map)))
`----

  - Place the cursor at the BEGINNING of help buffer rather than the end
    of it. There are more interesting things at the beginning of the
    buffer than the end of the buffer.

,---- In quail.el (around line 2575)
|       ;; Resize the help window again, now that it has all its contents.
|       (save-selected-window
|@@@ 	(goto-char (point-min))
|  	(select-window (get-buffer-window (current-buffer) t))
| 	(run-hooks 'temp-buffer-show-hook))
`----


  reply	other threads:[~2011-09-23 11:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21 16:47 bug#9336: 24.0.50; No way to input character #xbb4 using ta-itrans Jambunathan K
2011-08-23  4:18 ` Kenichi Handa
2011-08-23  7:23   ` Jambunathan K
2011-08-23  7:55     ` Jambunathan K
2011-08-25  4:27     ` Kenichi Handa
2011-09-15 12:55 ` Jambunathan K
2011-09-16  7:26   ` Kenichi Handa
2011-09-20 10:51     ` Jambunathan K
2011-09-21  3:45       ` Vijay Lakshminarayanan
2011-09-21  4:14         ` Jambunathan K
2011-09-22  2:42           ` Kenichi Handa
2011-09-22  3:27           ` Vijay Lakshminarayanan
2011-09-22  2:23       ` Kenichi Handa
2011-09-23 11:21         ` Jambunathan K [this message]
2011-09-23 11:24           ` Jambunathan K
2011-09-26  7:08           ` Kenichi Handa
2011-09-26 13:53 ` Jambunathan K
2011-09-27  4:50   ` Kenichi Handa
2011-09-28 13:00 ` Jambunathan K
2011-09-29  1:46   ` Kenichi Handa
2011-09-29  1:51   ` Kenichi Handa

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=817h4zcxm0.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=9336@debbugs.gnu.org \
    --cc=handa@m17n.org \
    /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).