From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63552: 29.0.91; M-x completion-predicate does not account for python-ts-mode Date: Wed, 17 May 2023 15:40:03 +0300 Message-ID: <83h6sbxhb0.fsf@gnu.org> References: <87353vrx4f.fsf@tcd.ie> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28979"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63552@debbugs.gnu.org, arstoffel@gmail.com To: Basil Contovounesios Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 17 14:41:37 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pzGTI-0007Py-KF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 May 2023 14:41:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzGSm-0002Zm-RZ; Wed, 17 May 2023 08:41:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzGSk-0002V3-VA for bug-gnu-emacs@gnu.org; Wed, 17 May 2023 08:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzGSk-0001nM-MY for bug-gnu-emacs@gnu.org; Wed, 17 May 2023 08:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzGSk-00056M-4m for bug-gnu-emacs@gnu.org; Wed, 17 May 2023 08:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 17 May 2023 12:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63552 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63552-submit@debbugs.gnu.org id=B63552.168432721819536 (code B ref 63552); Wed, 17 May 2023 12:41:02 +0000 Original-Received: (at 63552) by debbugs.gnu.org; 17 May 2023 12:40:18 +0000 Original-Received: from localhost ([127.0.0.1]:49228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzGS1-000552-Qq for submit@debbugs.gnu.org; Wed, 17 May 2023 08:40:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzGS0-00054q-Ck for 63552@debbugs.gnu.org; Wed, 17 May 2023 08:40:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzGRt-0001al-Kn; Wed, 17 May 2023 08:40:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Dx35MX1lZsnd713zVb/SAEunf+8Gq4JsaIydiniNgN0=; b=OXSfF5N8JIUJ qXCZECgUWhp//jkiwk9RYSSecPyfG9eNVSVD4S4CJS74JyzRlnbRXvhvc3rJ6SrGNfVhrb2VjDr/A dhgcdRvY+hOp9zitdUqdLGR+xOZphnH2XHBBN0dQS0xz1RW5mOw+BTzk34afhabg2/0ikq5lGYCTD UM6CMR7xfwq0zMefmBhc5JLyJJpc+shGTpo8ZVZ/KUe5AKSZ9s79+hG9B7hXOGUSw05U+dUYJPfpv 1mDK9r/XNed6ixo08PFUzJ3gXBjzs7902im83SmI8RA4/wzJBtSZLwLWP1r0eEqT1Y5h6eYzcNFTr lxNStx5VdCifaWqdLjAXIA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzGRe-0004no-Du; Wed, 17 May 2023 08:40:09 -0400 In-Reply-To: <87353vrx4f.fsf@tcd.ie> (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261845 Archived-At: > Cc: Augusto Stoffel > 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" > > 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.