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.help Subject: Re: How to make M-x TAB not work on (interactive) declaration? Date: Sun, 08 Jan 2023 12:38:07 +0200 Message-ID: <83cz7pqpkg.fsf@gnu.org> References: <61c2cc81db661e2624771a06a1274eac.support1@rcdrun.com> <83h6x1r25f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33631"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 08 11:38:25 2023 Return-path: Envelope-to: geh-help-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 1pET4L-0008bM-6G for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Jan 2023 11:38:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pET3j-0001au-6s; Sun, 08 Jan 2023 05:37:47 -0500 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 1pET3h-0001aV-B6 for help-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:37:45 -0500 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 1pET3g-00038x-3L for help-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:37:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=gcEZ/DylXhLb0upqJzmI6Fqc6NxSQzIPluUZmOC90BQ=; b=p9FaWa+PyfPSK5Q8CnlO W1uBAZoD7460PxeG/fpH11UiaM5DZEz3m1l1vRHrQmbc5Mbbpxh10dP+rJ2QjY5ifFQel8MrnYRuk 8JiixP1vU+a+9zVP6fZ8JGiBdtkqTEUv2c7/XLoQY5Tz9ox866L9yaFDRDDJo+ZJdEqZBpEUnio/P qfpLFdtRhQDE39qc8nt5LrP4v47D8tDm4SiCxoYc18dsObdP2bQ+JakZ6RKcMMmpcxMRZdfQz4aOQ 65JeG66Rknohw5GbSER/Q3haHeR1/pNFqWyGed0t/Bz6i+wfYfB5yjk4kMoD6CUcM5AV7pjJa56RM k8XnXfaewXpdKg==; 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 1pET3f-0003px-IO for help-gnu-emacs@gnu.org; Sun, 08 Jan 2023 05:37:43 -0500 In-Reply-To: (message from Jean Louis on Sun, 8 Jan 2023 09:21:32 +0300) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142153 Archived-At: > Date: Sun, 8 Jan 2023 09:21:32 +0300 > From: Jean Louis > Cc: help-gnu-emacs@gnu.org > > * Eli Zaretskii [2023-01-08 09:07]: > > > And I expect not to see it. > > > > > > What am I doing wrong? > > > > The doc string is wrong: the default is to show all commands. If you > > want to see only those relevant to MODES, either use M-X (upper-case > > X) or customize read-extended-command-predicate's value to be the > > function command-completion-default-include-p. > > Now we know that there is some inconsistency, thanks for confirming > it. > > For this function: > > (defun my-function () > (interactive nil '(text-mode mail-mode)) > (message "Hello")) > > major-mode ➜ mail-mode > > My default was: > (setq read-extended-command-predicate nil) > > - I can see 90 possible completions with M-X in mail-mode, WITHOUT `my-function' > > - I can see 9819 possible completions with M-x in mail-mode, WITH `my-function' > > when I turn it on: > > (setq read-extended-command-predicate 'command-completion-default-include-p) > > - I can see 90 possible completions with M-X in mail-mode, WITHOUT `my-function' > > - I can see 8777 possible completions with M-x in mail-mode, WITHOUT `my-function' > > Which means that my function cannot be found with recommended > settings in mail-mode, so there must be more inconsistencies. > > I have filed the above as bug, it is best to continue discussion as > bug. > > But in the bug there shall be wording "I can see 8777" just as in > here, there was mistake. You reported a bug, so let's continue discussing this there. In general, I believe your expectations were wrong.