Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates

From: Eli Zaretskii <[email-masked]>
Date: Thu, 17 Jul 2025 08:35:33 +0300

> From: Visuwesh <[email-masked]>
> Cc: Cass Alexandru <[email-masked]>,  Stefan Monnier
>  <[email-masked]>,  Arash Esbati <[email-masked]>,
>   [email-masked]
> Date: Wed, 16 Jul 2025 20:39:41 +0530
> 
> [செவ்வாய் ஜூலை 15, 2025] Eli Zaretskii wrote:
> 
> > It doesn't look like quail-completion (which is the command bound to
> > TAB in that input method) is supposed to work as you expect.  Instead,
> > it is a fancy visual feedback for typing long sequences, fancier than
> > what Emacs usually shows in the echo-area (which is just the list of
> > candidates for the next character).
> >
> > IOW, after pressing TAB, you are supposed to:
> >
> >   . realize that there's just one candidate "\above"
> >   . type its characters one by one, guided by the moving highlight in
> >     the *Quail Completions* buffer as you go
> >
> > Stefan and Arash, am I right?
> 
> Looking at quail-completion, it only seems to list the possible
> translations and their keys.  There is quail-choose-completion but it
> seems to be broken (it inserts the same translation twice when trying it
> with tamil-phonetic), and does not work at all for TeX (maybe because of
> non-nil TRANSLATION-KEYS (why BTW?)).

TRANSLATION-KEYS non-nil is what makes TAB invoke quail-completion in
the first place, right?

> If it works, then you can click on the translation shown in *Quail
> Completions* to insert it.

I think part of the request here is to make it work.  But there's also
another part: if there's only one completion, TAB should complete it
and exit the Quail loop.

IOW, the request here is to make quail-completion work as minibuffer
completion works elsewhere.  If you can come up with a patch to do
that (probably optionally, given how quail-completion's original
behavior was very different), that'd be appreciated.