reddit / emacs

What does setting "icomplete-in-buffer" do?

sebhoagie · 2022-12-01 16:45
I added this in my config a long time ago, unusually enough I didn't add a link to a source site. And I don't recall finding out about it myself. After a recent experiment trying not using company nor fido/icomplete, I found it again, and it *seems* that it doesn't make any difference at all no matter where I try it. I was looking at the source a few minutes ago and usage within `icomplete.el` but couldn't quite crack what is it about. From the name I assumed something like "use icomplete for capf" but that doesn't seem to be the case from looking at icomplete sources. Does anyone know what does this variable do?
simbledress · 2022-12-03 09:07
> "use icomplete for capf" It is exactly for that. Set the variable to `t` using `setq` (it is not customizable yet - seems like some kinks need to be ironed out). Then you might need to turn `icomplete-mode` off and back on before it will work. Go to the scratch buffer, type (say) `ab` and press `M-tab` to see it in action.
sebhoagie · 2022-12-05 00:33
Thank you so much for replying! Turns out I had the variable `completions-max-height` set to nil (Emacs 29 only) which caused the `*Completions*` buffer to display on the entire screen and obscure the icomplete UI for capf. Even setting that variable to 0 is not enough, the window still displays a couple lines at the bottom of the screen. I might need to either add a rule to never show it (since I will always trigger icomplete) or report a bug (or, maybe both?). Also not sure (I'm still testing) but it seems this only works with icomplete-mode but not fido-mode. In both cases trying with the "vertical" variant.