unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: 58070@debbugs.gnu.org, visuweshm@gmail.com
Subject: bug#58070: [PATCH] Add tamil99 input method
Date: Tue, 27 Sep 2022 09:23:20 +0300	[thread overview]
Message-ID: <83sfkdjpyf.fsf@gnu.org> (raw)
In-Reply-To: <87ill9ony7.fsf@systemreboot.net> (message from Arun Isaac on Tue, 27 Sep 2022 02:25:28 +0530)

> Cc: 58070@debbugs.gnu.org
> From: Arun Isaac <arunisaac@systemreboot.net>
> Date: Tue, 27 Sep 2022 02:25:28 +0530
> 
> > This has the advantage that you can insert the vowel sign for any
> > consonant out-of-sequence i.e., you can say h j BACKSPACE s
> > to insert கி (and so do other rules).
> 
> I agree. Your imperative approach does have this advantage. But, it
> comes at the price of having to inspect the buffer at (point). The
> declarative approach does not need to inspect the buffer at all since it
> merely composes sequential keystrokes and doesn't know anything about
> what's already on the buffer. I personally think buffer inspection is a
> lot of code complexity for a simple input method like tamil99, but
> perhaps Eli should take a call on this.

I don't think I understand what you are talking about (I'm not an
expert on Quail).  Does this complexity slow down the input
noticeably?  Does it make the code much harder to understand, even if
you put enough comments there to explain what's going on?  If not,
then I don't think the added complexity should be a problem, and you
should decide based on other aspects.

And as I said earlier, we could have two input methods for Tamil, so
we don't necessarily have to decide which of the two is better.

> Also, while the out-of-sequence vowel insertion is a very clever
> feature, it shouldn't be required at all if we handled grapheme cluster
> boundaries correctly. See
> https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries

Well, we do, that's why cursor motion moves by grapheme clusters,
right?  Also, see below.

> Let me explain with a latin example for the benefit of non-Tamil
> readers. Suppose we had:
> 
> g̀|
> 
> where | is the position of the cursor. Now, if we press backspace, the
> entire g+grave accent grapheme cluster should be deleted. But, what
> actually happens is that the grave accent alone is deleted and we are
> left with a 'g' like so:
> 
> g|
> 
> A similar thing happens in Tamil. Now, based on user expectation, this
> may be acceptable in some languages. But, in Tamil, it is quite contrary
> to user expectation. If I have
> 
> கி|
> 
> and press backspace, I get:
> 
> க|
> 
> But, I want the whole "user-perceived character" (கி) deleted like so:
> 
> |

There's a problem with the above: in some situations you want deletion
by codepoints, in others you want deletion by grapheme clusters.  (It
is possible that with Tamil the former is rarely the case, but it is
definitely a frequent case with other scripts, in particular with
those that have diacriticals.)  Emacs 29 solves this by having
delete-forward-char, which is usually bound to the <Delete> key,
delete by grapheme clusters, while DEL (which deletes backward) and
C-d delete individual codepoints.  The primary motivation for DEL to
delete by codepoints is that it allows you to make sub-grapheme
corrections to stuff you just typed, for example if you typed an
incorrect accent.

Emacs 29 also has the composition-break-at-point variable, which you
could set non-nil, in which case <Delete> will also work by
codepoints.  So perhaps the out-of-sequence vowel insertion would be
possible without further complications if composition-break-at-point
is non-nil?





  parent reply	other threads:[~2022-09-27  6:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 10:00 bug#58070: [PATCH 0/1] Add tamil99 input method Arun Isaac
2022-09-25 10:02 ` bug#58070: [PATCH] " Arun Isaac
2022-09-25 11:38   ` Visuwesh
2022-09-25 13:59     ` Eli Zaretskii
2022-09-25 14:14       ` Visuwesh
2022-09-25 14:23         ` Eli Zaretskii
2022-09-25 14:38           ` Visuwesh
2022-09-25 15:55             ` Eli Zaretskii
2022-09-26 20:59               ` Arun Isaac
2022-09-27  6:25                 ` Eli Zaretskii
2022-09-27 20:34                   ` Arun Isaac
2022-09-26 20:55     ` Arun Isaac
2022-09-27  1:49       ` Visuwesh
2022-09-27  2:29         ` Visuwesh
2022-09-27  6:37         ` Eli Zaretskii
2022-09-27  7:34           ` Visuwesh
2022-09-27  7:53             ` Eli Zaretskii
2022-09-27  9:24               ` Robert Pluim
2022-09-27  9:40                 ` Eli Zaretskii
2022-09-27 10:11               ` Visuwesh
2022-09-27 20:32         ` Arun Isaac
2022-09-27  6:23       ` Eli Zaretskii [this message]
2022-09-27  7:52         ` Visuwesh
2022-09-27  8:03           ` Eli Zaretskii
2022-09-27 10:15             ` Visuwesh
2022-10-12  8:40             ` Arun Isaac
2022-10-12 14:00               ` Eli Zaretskii
2022-10-15  8:23                 ` Arun Isaac
2022-09-27 20:19           ` Arun Isaac
2022-09-27 20:26         ` Arun Isaac
2022-09-28  2:30           ` Eli Zaretskii
2022-09-25 10:13 ` bug#58070: [PATCH 0/1] " Eli Zaretskii
2022-09-25 11:16   ` Arun Isaac
2022-10-12  8:41     ` Arun Isaac
2022-10-12 13:55       ` Eli Zaretskii
2022-10-15  8:34         ` Arun Isaac
2022-10-15  9:16           ` bug#58070: [PATCH v2] " Arun Isaac
2022-10-15 14:42           ` bug#58070: [PATCH 0/1] " Visuwesh
2022-10-18  7:11             ` Arun Isaac
2022-10-18 18:00               ` bug#58070: [PATCH v3] " Arun Isaac
2022-10-19 11:41                 ` Eli Zaretskii

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=83sfkdjpyf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58070@debbugs.gnu.org \
    --cc=arunisaac@systemreboot.net \
    --cc=visuweshm@gmail.com \
    /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).