GNU bug report logs -
#63552
29.0.91; M-x completion-predicate does not account for python-ts-mode
Previous Next
Reported by: Basil Contovounesios <contovob <at> tcd.ie>
Date: Wed, 17 May 2023 11:56:01 UTC
Severity: minor
Tags: patch
Found in version 29.0.91
Fixed in version 29.1
Done: Basil Contovounesios <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 63552 <at> debbugs.gnu.org (full text, mbox):
> Cc: Augusto Stoffel <arstoffel <at> gmail.com>
> Date: Wed, 17 May 2023 12:54:56 +0100
> From: Basil Contovounesios via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> At the time of https://bugs.gnu.org/57184 python-ts-mode did not yet
> exist, so the completion-predicates added to python.el as part of that
> report understandably assumed only python-mode exists.
>
> Here's what that means in practice:
>
> 0. emacs -Q
> 1. (setq read-extended-command-predicate
> #'command-completion-default-include-p)
> 2. C-x C-e
> 3. M-x python-ts-mode RET
> 4. M-x python-sort TAB
> => [No match]
>
> And yet python-sort-imports is present in the local map:
>
> 5. C-g
> 6. C-h f python-sort-imports RET
> => It is bound to C-c TAB s.
>
> By contrast, in python-mode:
>
> 7. M-x python-mode RET
> 8. M-x python-sort TAB
> => Completes to python-sort-imports
>
> The following patch fixes this by associating M-x completion with
> python-base-mode rather than python-mode:
Thanks.
We need to fix tis on the emacs-29 branch, so I wonder whether the fix
can be simpler? After all, we just need to test one more major mode,
right?
If a simpler fix is less clean, we could install a simpler change on
emacs-29 and a cleaner one on master.
This bug report was last modified 2 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.