GNU bug report logs - #74410
31.0.50; completion-at-point doesn't work in custom buffers

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sun, 17 Nov 2024 23:17:01 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 74410 <at> debbugs.gnu.org
Subject: bug#74410: 31.0.50; completion-at-point doesn't work in custom buffers
Date: Wed, 20 Nov 2024 09:57:59 +0200
> For example:
>
>     src/emacs -Q --eval '(customize-face `fixed-pitch)'
>     ... move point to the font family field ...
>     ... delete the "space" from "Monospace" then do:
>     M-x completion-at-point RET
>
> This will presumably do nothing at all.
> `widget-complete` completes it back to "Monospace" (at least on
> `master` where I installed a patch for that).
>
> The problem is that cus-edit doesn't setup
> `completion-at-point-functions`.  Instead it sets up a special keymap to
> remap M-TAB to `widget-complete` instead of relying on the
> global binding.
>
> It works OK for a default config, but it doesn't interact well with
> setups that use different keybindings or different completion UIs based
> on `completion-at-point-functions`.  E.g. `corfu-mode` partly works but
> not fully (e.g. `corfu-auto` doesn't have any effect).
>
> The patch below leaves the key remapping for now, but adds an
> appropriate function to `completion-at-point-functions` so that
> other UIs such as `completion-at-point` can do their job properly.
>
> Comments/objection?

Now finally it's possible to select a completion using arrow keys
like for in-buffer completions, thanks.

Currently this works only when typing 'M-x completion-at-point RET',
not by 'M-C-i' that is bound to 'widget-complete'.  Maybe
'M-C-i' should be rebound to 'completion-at-point' in widgets?




This bug report was last modified 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.