From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56323: 29.0.50; [v2] Add new customisable phonetic Tamil input method Date: Sat, 02 Jul 2022 10:35:18 +0300 Message-ID: <83ilogc6h5.fsf@gnu.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40868"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56323@debbugs.gnu.org To: visuweshm@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 02 09:36:11 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 1o7Xfm-000ASz-O8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 09:36:10 +0200 Original-Received: from localhost ([::1]:50130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7Xfl-0000Hz-5N for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 03:36:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7Xfe-0000Ha-FN for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 03:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7Xfe-0001L9-5W for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 03:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o7Xfe-00058L-3P for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2022 03:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jul 2022 07:36: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.165674732919678 (code B ref 56323); Sat, 02 Jul 2022 07:36:02 +0000 Original-Received: (at 56323) by debbugs.gnu.org; 2 Jul 2022 07:35:29 +0000 Original-Received: from localhost ([127.0.0.1]:39635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7Xf7-00057K-53 for submit@debbugs.gnu.org; Sat, 02 Jul 2022 03:35:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o7Xf6-000576-Bg for 56323@debbugs.gnu.org; Sat, 02 Jul 2022 03:35:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7Xf1-0001JZ-1p; Sat, 02 Jul 2022 03:35:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=GKc4DciP2LPxbjtPrZpwmi4zuODAnFtRWVtIMvAtLbE=; b=kHx+djV/7Rf3izoTVoGB Ls9dyhaav4qi6TMUORbXK96Oy8v0oQR67TIciu6JiyohVqQURgaT9qmdKI4A9YrPvlZyHxBl/rk1s Y0GEtskr8cfnlY90gpZGEX5BWUWD/Y8UNhI4wmuVEpu/geD+yaLx356LPTo0kljg0LAi8lkV5BcC/ rZ9yWxxCKqNeFspvOr4cK41KuOoYTTuwGgDj0zSh4g/9Ke88SBA1IQX163Ld38vh2VX5QOZudw3NI dbEE0una2MYNCdR7gCEclu0Lja5TKNOcJwgjZokjuEMcgsnxqx/06GZSRhm88zuATLhRhZkDnsnbx eoVTBr5uqbDxeg==; Original-Received: from [87.69.77.57] (port=1883 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7Xf0-0006Cv-Ar; Sat, 02 Jul 2022 03:35:22 -0400 In-Reply-To: <83k08wc7a3.fsf@gnu.org> (message from Eli Zaretskii on Sat, 02 Jul 2022 10:17:56 +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:235856 Archived-At: > Cc: 56323@debbugs.gnu.org > Date: Sat, 02 Jul 2022 10:17:56 +0300 > From: Eli Zaretskii > > > (let ((core-consonants '("க" "ங" "ச" "ஞ" "ட" "ண" "த" > > "ந" "ப" "ம" "ய" "ர" "ல" > > "வ" "ழ" "ள" "ற" "ன"))) > > (mapcar (lambda (c) (string-to-char c)) core-consonants)) > > > > ;; => (2965 2969 2970 2974 2975 2979 2980 2984 2986 2990 2991 2992 > > 2994 2997 2996 2995 2993 2985) > > > > and sure enough when you do (sort core-consonants #'string-lessp) the > > list is jumbled up instead of retaining the order. > > [ core-consonants, as declared, is in the right order but sort jumbles > > it up. ] > > > > But string-lessp works for vowels. It is the consonants that is the > > problem. > > Sorry, I don't understand what you are saying here. How is the above > code related to the issue at hand, which is how to sort characters in > the order you want them to be sorted? (And please keep in mind that I > don't even know which of those characters are consonants and which are > vowels -- if you want me to say something intelligent about that.) Or maybe my guess below will be lucky. You probably want this: (defun sort-by-codepoint (c1 c2) (< (string-to-char c1) (string-to-char c2))) (let ((core-consonants '("க" "ங" "ச" "ஞ" "ட" "ண" "த" "ந" "ப" "ம" "ய" "ர" "ல" "வ" "ழ" "ள" "ற" "ன"))) (sort core-consonants 'sort-by-codepoint)) => ("க" "ங" "ச" "ஞ" "ட" "ண" "த" "ந" "ன" "ப" "ம" "ய" "ர" "ற" "ல" "ள" "ழ" "வ") (To understand why, read the doc string of 'sort' carefully, where it explains what is expected from PREDICATE.)