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#55370: [PATCH] Add support for the Syloti Nagri script Date: Thu, 12 May 2022 10:10:19 +0300 Message-ID: <83wnerp6p0.fsf@gnu.org> References: 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="5727"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55370@debbugs.gnu.org To: =?UTF-8?Q?=E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0_?= =?UTF-8?Q?=E0=A4=B8=E0=A4=BF=E0=A4=82=E0=A4=B9?= Sameer Singh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 12 09:15:40 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 1np32x-0001LT-Hf for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 09:15:39 +0200 Original-Received: from localhost ([::1]:39478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1np32w-0000Cp-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 03:15:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np2yU-0005LO-G1 for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 03:11:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1np2yU-0002UL-73 for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 03:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1np2yU-0001No-2v for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 03:11: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: Thu, 12 May 2022 07:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55370 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 55370-submit@debbugs.gnu.org id=B55370.16523394245233 (code B ref 55370); Thu, 12 May 2022 07:11:02 +0000 Original-Received: (at 55370) by debbugs.gnu.org; 12 May 2022 07:10:24 +0000 Original-Received: from localhost ([127.0.0.1]:39349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1np2xs-0001ML-6N for submit@debbugs.gnu.org; Thu, 12 May 2022 03:10:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1np2xq-0001M2-8E for 55370@debbugs.gnu.org; Thu, 12 May 2022 03:10:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np2xl-0002Cn-25; Thu, 12 May 2022 03:10:17 -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=5VjmzFvUVPeUYpC/RIzdi2Sdz8ZfMqrCOSfkHdgorz8=; b=EFj6Z86fSa9Unbd3k8Tv ScR11Nt5scRGA7xtQcUFU4wn/wjdtYusS1YphqZm19Hcu9bGhEtebk3lYF8xPnn9SKIj+05Li1P1/ 8+sAqbGw7Hqbch+2Zq1jj3QYfk9kAz/MMDsg4/Vw6rx18eYeWZgiemsf4Zf7rFVNTwL5ayfuP+D+5 a2u5MUw18XZjkUBsyCWCeCJIXbxNkDyRY877M4l/UZNu+d+9OR+im97Y8noN472iPtn3/D4n9ABf6 cqrsrPwcHEjlSgFkKeZ8xQ0IxXx8/YoZqIfRittM7YxXuluLSzFcGyOY6sANWmMr/EwqeeKwV5iqQ FoBv7njmyOZGvQ==; Original-Received: from [87.69.77.57] (port=2909 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 1np2xk-0001js-91; Thu, 12 May 2022 03:10:16 -0400 In-Reply-To: (lumarzeli30@gmail.com) 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:232020 Archived-At: > From: समीर सिंह Sameer Singh > > Date: Wed, 11 May 2022 20:31:28 +0530 > > This time I have added support for the Syloti Nagri script. > I also had to separate the consonant conjunct syllables and the non consonant conjunct syllables > composition rules this time around, because if they were together, Emacs would hang whenever I put a > cursor on a Syloti Nagri word or tried to edit it. Thanks. There's something strange in the composition rules: > +;; Syloti Nagri composition rules > +(let ((consonant "[\xA807-\xA80A\xA80C-\xA822]") > + (independent-vowel "[\xA800\xA801\xA803-\xA805]") > + (vowel "[\xA802\xA823-\xA827]") > + (nasal "[\xA80B]") > + (virama "[\xA806\xA82C]")) > + (set-char-table-range composition-function-table > + '(#xA806 . #xA806) > + (list (vector > + ;; Consonant conjunct based syllables > + (concat consonant "\\(?:" virama consonant "\\)+" > + vowel "?" nasal "?") > + 1 'font-shape-gstring) > + (vector > + ;; Nasal vowels > + (concat independent-vowel nasal "?") > + 1 'font-shape-gstring))) This set of ruled is triggered by U+A806, and should match a regexp starting from one character before U+A806. However, the second rule, i.e. > + ;; Nasal vowels > + (concat independent-vowel nasal "?") > + 1 'font-shape-gstring))) has 'nasal' ("[\xA80B]") as its second character, and 'nasal' will never match U+A806. So this rule will never match, right? > + (set-char-table-range composition-function-table > + '(#xA823 . #xA827) > + (list (vector > + ;; Non Consonant conjunct based syllables > + (concat consonant vowel "?" nasal "?") > + 1 'font-shape-gstring)))) Similarly here: this rule will never match if 'vowel' isn't present, because the second character of the matching sequence _must_ be a vowel, since that is what triggers the composition rule in the first place. Am I missing something? I see similar issues with the composition rules we installed for other old Indian scripts; could you please review them with the above comments in mind and see which ones need to be amended?