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#58070: [PATCH] Add tamil99 input method Date: Tue, 27 Sep 2022 10:53:31 +0300 Message-ID: <83h70tjls4.fsf@gnu.org> References: <20220925100020.13229-1-arunisaac@systemreboot.net> <20220925100244.13482-1-arunisaac@systemreboot.net> <87h70vsmyd.fsf@gmail.com> <87ill9ony7.fsf@systemreboot.net> <87ill98u3m.fsf@gmail.com> <83o7v1jpb0.fsf@gnu.org> <87pmfhe0dj.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5073"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arunisaac@systemreboot.net, 58070@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 27 10:16:31 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 1od5lW-00016w-DJ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Sep 2022 10:16:30 +0200 Original-Received: from localhost ([::1]:50264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1od5lR-0001vo-RW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Sep 2022 04:16:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od5Pm-00014K-TY for bug-gnu-emacs@gnu.org; Tue, 27 Sep 2022 03:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od5Pm-0004tD-Gz for bug-gnu-emacs@gnu.org; Tue, 27 Sep 2022 03:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1od5Pm-0001Ld-BT for bug-gnu-emacs@gnu.org; Tue, 27 Sep 2022 03:54: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: Tue, 27 Sep 2022 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58070-submit@debbugs.gnu.org id=B58070.16642652285162 (code B ref 58070); Tue, 27 Sep 2022 07:54:02 +0000 Original-Received: (at 58070) by debbugs.gnu.org; 27 Sep 2022 07:53:48 +0000 Original-Received: from localhost ([127.0.0.1]:52397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od5PY-0001LB-5m for submit@debbugs.gnu.org; Tue, 27 Sep 2022 03:53:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1od5PW-0001Kx-Dc for 58070@debbugs.gnu.org; Tue, 27 Sep 2022 03:53:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od5PP-0004r1-Jg; Tue, 27 Sep 2022 03:53:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mfbIRO9IIamqshagOkySO8Jh+u5Tv2idaXk/ZMfA7/0=; b=h1n2I8y0z+Zb svh6rolF7uOQIrF/QX12wyuvT89zfL1P+tyv8xwaIQTPqs7c2z4YRnV68mnoEk1n1a26PaWXWE5yI XLdlbFA04CrXxgh9Tf08sOL8qV7OyQZaW87Sgf+DIXbCcnvGfhZWsTJ9KOK1HuVnXxYMc0Pz5Fhgb VxT70X0l9XzYCljva4Kb1ggcict6R4NVfwgdyiNOU+LVhIhhW+MpS1Q2GrusEQp3DFHzYhxgRF58z dUFr9Nfz/EAJ4f7AucxUAxn908zaOnFgmnOX4KxmxalngbybVt5htluCpbAVOTifMxxrbB5n6az5Y xoB0NSEhEA42z73pYRhVeg==; Original-Received: from [87.69.77.57] (port=2823 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 1od5PP-00067J-1P; Tue, 27 Sep 2022 03:53:39 -0400 In-Reply-To: <87pmfhe0dj.fsf@gmail.com> (message from Visuwesh on Tue, 27 Sep 2022 13:04:48 +0530) 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:243698 Archived-At: > From: Visuwesh > Cc: arunisaac@systemreboot.net, 58070@debbugs.gnu.org > Date: Tue, 27 Sep 2022 13:04:48 +0530 > > In delete-forward-char, we use find-composition to get the extend of the > current glyphs in terms of characters. AFAICT, find-composition does a > forward search for the 'composition' text property. My proposal was > that we write a find-composition variant that would do a backward search > for the 'composition' text property which we then can make of use in > delete-backward-char. You are looking at the wrong branch of the code. There's no 'composition' text property in the case that is of interest to you; the characters are composed by the so-called "automatic composition", whereby Emacs decides which characters to compose without any special text property. The relevant code is in find_automatic_composition, which is called by find-composition-internal. In any case, my suggestion for finding composition backward is to incrementally go back and call find-composition-internal, until it fails to find a composition at or before point. The next question will be: what would be the key to which you'd bind this new command? > We cannot simply do backward-char then delete-forward-char and bind it > to a command since IIRC the grapheme cluster movement happens in the > display code? No, it happens in the command loop. See adjust_point_for_property, which calls composition_adjust_point. I don't think this is important for the issue at hand, because the point adjustment happens only after interactive commands.