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: Tue, 15 Jul 2025 17:11:17 +0300

[Please use Reply All to reply, to keep everyone CC'ed.]

> Date: Tue, 15 Jul 2025 13:58:41 +0000
> From: Cass Alexandru <[email-masked]>
> 
> Hi all,
> 
> On 15/07/2025 15:53, Eli Zaretskii wrote:
> >> Date: Tue, 15 Jul 2025 08:21:56 +0000
> >> From: Cass Alexandru<[email-masked]>
> >>
> >> 1. Steps to reproduce: Type the following in a buffer with `Fundamental`
> >> mode:
> >> ```
> >> M-x set-input-method RET TeX RET
> >> \ab
> >> ```
> >> 2. Expected behaviour: `TAB` completes to the only possible option
> >> (\above) and inserts `┴`.
> >>
> >> 3. Actual behaviour: `TAB` pops up the `*Quail Completions*` buffer with
> >> the following content, and I need to fully type out `\above` for `┴` to
> >> be inserted in the main buffer:
> >> ```
> >> Possible completion and corresponding characters are:
> >> \ab: -
> >> \abo: -
> >> \abov: -
> >> \above:(1/1) 1.┴
> >> ```
> >>
> >> My question is: How can I get the expected behaviour instead of the
> >> observed one?
> > 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
> It was suggested to me on the emacs stackexchange 
> <https://emacs.stackexchange.com/questions/84747/tab-in-minibuffer-when-using-a-quail-input-method-doesnt-complete-the-longest-c> 
> to report this as a bug, though I suppose it's more of a feature 
> request, and if I was more proficient in elisp I could perhaps ascertain 
> how to get the desired behaviour by means of custom function or a 
> `defadvice`. I do think one could argue that greedy suffix completion on 
> tab is the desired behaviour in this circumstance, as this is the 
> behaviour in all other settings where tab-completion is used in emacs 
> (and unix systems generally).
> >
> > Stefan and Arash, am I right?