Subject: Re: bug#68688: 30.0.50; next-line-completion doesn't work with multiline completions

From: Juri Linkov <[email-masked]>
Date: Thu, 25 Jan 2024 09:48:59 +0200

>> Alternatively without a loop maybe simpler would be just to move
>> to the end of the current completion before calling forward-line?
>
> I was unsure whether that would work correctly in all cases.  But it
> seems to pass tests, so let's just try it.  If it does break, the bug
> report will give us some new test cases :)

It might fail on a multi-column and at the same time multi-line layout.
But currently this is just a hypothetical case.  I remember there was
an idea to use tabulated-list-mode in the completions buffer that
could simplify next-completion but at the cost of breaking backward
compatibility with existing commands that rely on text properties.

>> Completely agreed.  We need more helper functions for all 4 functions:
>> previous-completion, next-completion, previous-line-completion,
>> next-line-completion.
>
> Cool, I made two helpers in the latest version of my patch.  Using only
> in next-line-completion for now, but we can use it more in the other
> completion function.

Using helpers more would be nice.

>> BTW, do you think that these parts below are not needed anymore
>> since you implemented a hidden placeholder at the top
>> in case of no header?
>
> Yes, I think all the code for 'first-completion can be removed.
>
> Updated patch for next-line-completion:

Thanks for the patch.  Now pushed to master.