Subject: Re: 29.0.60; icomplete--in-region-setup should activate icomplete-fido-mode-map too

From: Sean Whitton <[email-masked]>
Date: Wed, 22 Mar 2023 10:25:04 -0700

Hello,

On Tue 21 Mar 2023 at 11:40PM GMT, João Távora wrote:

> Yes you may, but no, I haven't.  Icomplete and Fido and cousins,
> it's true.  But icomplete-in-buffer wasn't around (at least wasn't
> in any way functional) when Fido was born.  So I don't have
> any plans of integrating this part of icomplete in Fido, because
> it's not really how I envision Fido being used for non-minibuffer
> completion.
>
> I have other plans for a future fido-in-buffer where
> the feedback overlay -- in horizontal or vertical form -- shows
> in the echo area instead.

Interesting idea.  What do you think the advantages are?  It's breaking
with how such things usually work, in Emacs and in other editors.

Since you're up for reviewing a patch to make icomplete-in-buffer work
with fido-mode, I assume you are interested in keeping both working?

> That said, if a simple patch to make icomplete-in-buffer work with
> fido-mode can be achieved, I have no problem reviewing it.
> As you suggested, it could be as simple as integrating
> icomplete--fido-mode-setup into icomplete--in-region-setup.
> But that is relatively tricky as whatever variables are set
> when entering this mode but be properly reset when leaving it.
> Doing this elegantly might not be hard, but it's not trivial
> either.

Currently icomplete--in-region-setup sets completion-show-inline-help
locally and then unconditionally kills that local variable.  So we could
do the same for fido-mode's variables, but is it possible that a major
mode might want to set one of them?

Otherwise, if there is to be some mechanism for restoring old
buffer-local values, then we should use it for
completion-show-inline-help too.

-- 
Sean Whitton