unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 56323@debbugs.gnu.org
Subject: bug#56323: 29.0.50; [v2] Add new customisable phonetic Tamil input method
Date: Fri, 01 Jul 2022 19:17:18 +0530	[thread overview]
Message-ID: <87tu81osgp.fsf@gmail.com> (raw)
In-Reply-To: <83fsjldl2b.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 Jul 2022 16:22:36 +0300")

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

[வெள்ளி ஜூலை 01, 2022] Eli Zaretskii wrote:

>> From: Visuwesh <visuweshm@gmail.com>
>> Date: Fri, 01 Jul 2022 18:29:00 +0530
>> 
>> Also, can someone guide me to write a sort function for
>> quail-tamil-itrans-compute-syllable-table please?  The ideal order of
>> consonants should be the same as the one in the default value of
>> tamil-consonant-translation, same for tamil-vowel-translation.  I tried
>> the following
>> 
>>     (sort (reverse (mapcar #'car tamil-consonant-translation))
>>           (lambda (x y) (let ((lx (length x))
>>                               (ly (length y)))
>>                            (if (= lx ly) (string-lessp x y) (< lx ly)))))
>> 
>> 
>> but that definitely doesn't do what I want.  The idea was to sort the
>> list so that the basic consonants (க் ங் ச் etc.) first then the composite
>> ones (க்‌ஷ் க்ஷ் etc.) but `string-lessp' does not even sort the basic
>> consonants in the right order (the right order being the order in the
>> default value of `tamil-consonant-translation').
>
> Then you'll need to write your own comparison function and use it
> instead string-lessp.
>

I suppose so.  How does the following look?

    (sort
     '("க்" "ங்" "ச்" "ஞ்" "ட்" "ண்" "ற்ற்" "ந்" "ப்" "ய்"
       "ம்" "த்" "ர்" "ல்" "வ்" "ள்" "ற்" "ழ்" "ன்"
       "ஸ்" "ஜ்" "க்ஷ்" "ஷ்" "ஹ்" "க்‌ஷ்" "ஶ்")
     (lambda (x y)
       (let* ((cp '(("க்" . 0) ("ங்" . 1) ("ச்" . 2) ("ஞ்" . 3) ("ட்" . 4) ("ண்" . 5)
                    ("த்" . 6) ("ந்" . 7) ("ப்" . 8) ("ம்" . 9) ("ய்" . 10) ("ர்" . 11)
                    ("ல்" . 12) ("வ்" . 13) ("ழ்" . 14) ("ள்" . 15) ("ற்" . 16) ("ன்" . 17)
                    ("ஜ்" . 18) ("ஸ்" . 19) ("ஷ்" . 20) ("ஹ்" . 21) ("க்ஷ்" . 22)
                    ("க்‌ஷ்" . 23) ("ஶ்" . 24)))
              (xp (or (assoc-default x cp nil) 10000))
              (yp (or (assoc-default y cp nil) 10000)))
         (< xp yp))))

[ I won't have the unnecessary let in the final version.  ]

>> Can I use the min-width property in buffer text?
>
> Why do you need that?  Please tell more about what you want to
> accomplish.

Currently we don't try too hard to ensure that text don't bump into each
other in the tables we calculate.  If you are unlucky, then the table
will be incomprehensible so I thought about putting a reasonable
min-width value on the text in signs table at least.  Of course, finding
a reasonable value is a headache in of itself; the better solution would
be probably pulling in the vtable library but I'm not too sure about
that.

I also attached a screenshot comparing my running Emacs session and
emacs -Q (yellow window is my current Emacs session) to get the point
across better.


[-- Attachment #2: screenshot_202207011914.png --]
[-- Type: image/png, Size: 61371 bytes --]

  reply	other threads:[~2022-07-01 13:47 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 12:13 bug#56323: 29.0.50; Add new customisable phonetic Tamil input method Visuwesh
2022-06-30 14:08 ` Visuwesh
2022-06-30 15:53 ` Visuwesh
2022-07-01 12:59 ` bug#56323: 29.0.50; [v2] " Visuwesh
2022-07-01 13:01   ` Visuwesh
2022-07-01 13:22   ` Eli Zaretskii
2022-07-01 13:47     ` Visuwesh [this message]
2022-07-01 14:06       ` Eli Zaretskii
2022-07-01 14:30         ` Visuwesh
2022-07-01 16:09           ` Eli Zaretskii
2022-07-01 16:37             ` Visuwesh
2022-07-01 18:16               ` Eli Zaretskii
2022-07-02  4:02                 ` Visuwesh
2022-07-02  6:35                   ` Eli Zaretskii
2022-07-02  6:54                     ` Visuwesh
2022-07-02  7:17                       ` Eli Zaretskii
2022-07-02  7:35                         ` Eli Zaretskii
2022-07-02  7:46                           ` Eli Zaretskii
2022-07-02  8:11                         ` Visuwesh
2022-07-02  8:29                           ` Eli Zaretskii
2022-07-02  8:40                             ` Visuwesh
2022-07-02  8:54                               ` Eli Zaretskii
2022-07-02  9:33                                 ` Visuwesh
2022-07-02  9:38                                   ` Eli Zaretskii
2022-07-02 10:31                                     ` Visuwesh
2022-07-02 10:46                                       ` Eli Zaretskii
2022-07-02 12:08                                         ` Visuwesh
2022-07-02 11:05                                       ` समीर सिंह Sameer Singh
2022-07-02 12:04                                         ` Visuwesh
2022-07-02 12:23                                         ` Eli Zaretskii
2022-07-02  6:58               ` Eli Zaretskii
2022-07-02  7:58                 ` Visuwesh
2022-07-02  8:39                   ` Eli Zaretskii
2022-07-02  9:28                     ` Visuwesh
2022-07-10  3:56                       ` Visuwesh
2022-07-10  5:34                         ` Eli Zaretskii
2022-07-10  6:42                           ` Visuwesh
2022-07-10  7:32                             ` Visuwesh
2022-07-14  6:34                               ` Eli Zaretskii
2022-07-14  7:11                                 ` Visuwesh
2022-07-02 12:15             ` Visuwesh
2022-07-03  3:57               ` Visuwesh

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=87tu81osgp.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=56323@debbugs.gnu.org \
    --cc=eliz@gnu.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).