Severity: minor Tags: patch 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: