From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#56323: 29.0.50; [v2] Add new customisable phonetic Tamil input method Date: Sat, 02 Jul 2022 14:10:07 +0530 Message-ID: <874jzzkivs.fsf@gmail.com> References: <87pmiqe4da.fsf@gmail.com> <878rpdq99n.fsf@gmail.com> <83fsjldl2b.fsf@gnu.org> <87tu81osgp.fsf@gmail.com> <83czepdj0z.fsf@gnu.org> <87pmioq51w.fsf@gmail.com> <831qv4erwf.fsf@gnu.org> <87r134aiwd.fsf@gmail.com> <83wncwd7gy.fsf@gnu.org> <8735fkkvqd.fsf@gmail.com> <83o7y8c983.fsf@gnu.org> <87letcj974.fsf@gmail.com> <83k08wc7a3.fsf@gnu.org> <878rpcj5ne.fsf@gmail.com> <83fsjjdiik.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12674"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56323@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 02 10:41:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7Ygh-00039L-7q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 10:41:11 +0200 Original-Received: from localhost ([::1]:36488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7Ygf-0006tk-UM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 04:41:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7YgY-0006rL-Fs for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 04:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7YgY-0006OM-5y for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 04:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o7YgY-0000fC-4M for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 04:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jul 2022 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56323 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 56323-submit@debbugs.gnu.org id=B56323.16567512202462 (code B ref 56323); Sat, 02 Jul 2022 08:41:02 +0000 Original-Received: (at 56323) by debbugs.gnu.org; 2 Jul 2022 08:40:20 +0000 Original-Received: from localhost ([127.0.0.1]:39723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7Yfr-0000dd-NN for submit@debbugs.gnu.org; Sat, 02 Jul 2022 04:40:19 -0400 Original-Received: from mail-pj1-f67.google.com ([209.85.216.67]:55246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7Yfp-0000dL-A4 for 56323@debbugs.gnu.org; Sat, 02 Jul 2022 04:40:18 -0400 Original-Received: by mail-pj1-f67.google.com with SMTP id s21so149123pjq.4 for <56323@debbugs.gnu.org>; Sat, 02 Jul 2022 01:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=Q8SczBx+6oJNmivguC2N1YjnTMYLDZ+B1PxcJZUb+P8=; b=GH7/SqkI2PS4J8NNc+f8sc++f1UZMq9UCZsC09ENqN6eBhYVvDSWOtyxa8qSKXLBpo fsmqcor7evtSkI6g8JtJuRxDmFgfdR0xLn8DT9ydhsx4e/iyvx8hjbKFqvhSebmlxDkY tnP5UVSBDf4buN3bUn1zrNh9AbBdwAlU/CLH5qUyKiCuxBWyi0ijBX7PXk+36xM6mBNU yBhpOu/C9wMZZzlKwFjGH3kRfB+845QR3J4VvGFWWqwocawIX1fmEswfk2mN5zZuKQh9 GJjbiSSkSqgecno2TSpXMICJ5Z1Bb7dzOIzyN+/JB5wp3VzFxxh0Ep/D6xDIJ/dnho/C KBaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Q8SczBx+6oJNmivguC2N1YjnTMYLDZ+B1PxcJZUb+P8=; b=BqWcP8R9lzytcymavJAX/E3uwFZ9YdSB87u9KrQWGa0fKC1+qmgUozQCCiwzbS5yHW +BGTOlVUQ7HHzkmuM1JlCVJtYW20eqVdnijnEF3OTz6Rkcw4rQ08R2YU2SzJUZC0vLZ3 oOcl6d4vlhrvo66L38xWJM4IiwZFzD/UzDCO3MYJaQm4XW+vWNLhhKcmGHmsy8j3Pq6h N3iN6eDQNd7BpezXbYirllMbccGhFDeIzYv7a9zOK0krUuf5Xwr1cg64S4Bv1oed54hq PWxTJCItKmGKn0Oi6Z7zrNqxqA+cTPXd+Dn44gxy2feDbEGj7msWnRpuYRmZi0LTpa8g OnSQ== X-Gm-Message-State: AJIora/qlKEqf4civMITA8llQamlOK6wGAm70/t/6B5kaAkOAOYFBSv3 tKhSaZp1JEyhj/N1Me3rrpDu63ptxY8= X-Google-Smtp-Source: AGRyM1sLXhoh0tUCI5kDfIAc87dHqvaDwfEJMAkybSpZdEyI2LK4Vng7EH0FqVtg7Y/XJXg1Z9FPUg== X-Received: by 2002:a17:903:1cc:b0:16a:73fd:3c87 with SMTP id e12-20020a17090301cc00b0016a73fd3c87mr23633195plh.41.1656751211238; Sat, 02 Jul 2022 01:40:11 -0700 (PDT) Original-Received: from localhost ([49.204.136.62]) by smtp.gmail.com with ESMTPSA id n19-20020a635913000000b0040df0c9a1aasm11766038pgb.14.2022.07.02.01.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Jul 2022 01:40:10 -0700 (PDT) In-Reply-To: <83fsjjdiik.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Jul 2022 11:29:55 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235862 Archived-At: [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=9C=E0=AF=82=E0=AE=B2=E0=AF=88 02, 2022]= Eli Zaretskii wrote: >> From: Visuwesh >> Cc: 56323@debbugs.gnu.org >> Date: Sat, 02 Jul 2022 13:41:17 +0530 >>=20 >> > (defun sort-by-codepoint (c1 c2) >> > (< (string-to-char c1) (string-to-char c2))) >> > >> > (let ((core-consonants '("=E0=AE=95" "=E0=AE=99" "=E0=AE=9A" "=E0=AE= =9E" "=E0=AE=9F" "=E0=AE=A3" "=E0=AE=A4" >> > "=E0=AE=A8" "=E0=AE=AA" "=E0=AE=AE" "=E0=AE=AF" "=E0=AE=B0" "=E0= =AE=B2" >> > "=E0=AE=B5" "=E0=AE=B4" "=E0=AE=B3" "=E0=AE=B1" "=E0=AE=A9"))) >> > >> > (sort core-consonants 'sort-by-codepoint)) >> > =3D> ("=E0=AE=95" "=E0=AE=99" "=E0=AE=9A" "=E0=AE=9E" "=E0=AE=9F" "= =E0=AE=A3" "=E0=AE=A4" "=E0=AE=A8" "=E0=AE=A9" "=E0=AE=AA" "=E0=AE=AE" "=E0= =AE=AF" "=E0=AE=B0" "=E0=AE=B1" "=E0=AE=B2" "=E0=AE=B3" "=E0=AE=B4" "=E0=AE= =B5") >> > >> > (To understand why, read the doc string of 'sort' carefully, where it >> > explains what is expected from PREDICATE.) >>=20 >> Unfortunately not, since it jumbles up the list. The desired outcome is >> the same list. > > But we already established that you need to break the list in two, and > always sort any member of one of the two sub-lists before any member > of the other sub-list. I then suggested to use string-lessp _within_ > each sub-list, but you said it still yielded a wrong order for some > reason. > Yes, I hope I made my point clear below. > So when you now return to the issue of splitting the list in two, and > show how sorting the full list doesn't work, you make a step back: we > already established the list cannot be sorted as a single list. I think I might not have made my point clear: the sort function above sorts one of the sub-lists. > The only remaining issue, AFAIU, is why string-lessp is not good > enough for sorting within each sub-list. It is not good enough for each sub-list for the same reason: the order produced by string-lessp is not the same as the actual order. I will try to explain the situation using the regular English alphabets and the extra letter =C3=BE (which was used in place of "th" AFAIU). The core English alphabets are a-z then we have some extra alphabets like the =C3=BE above. When we have a list containing _both_ a-z and =C3= =BE, the order produced by string-lessp is wrong. To work around this issue, we decided to break the list into two. I think we were on the same page till here. When I did as you suggested and broke the list into two -- a-z and =C3=BE -- and sorted the sub-list that only contained a-z with string-lessp, the sorted sub-list was not in the right alphabetical order i.e., instead of "a b c d ..." it was "a c b d ..." I hope the above makes the situation clear.