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#54964: 28.1; mistatement in NEWS about read-extended-command-predicate Date: Sat, 16 Apr 2022 14:09:37 +0300 Message-ID: <835yn91dzi.fsf@gnu.org> References: <4DA6706F-6B98-4CA5-B1A5-EAFBDAB3125F@gmail.com> <83mtgl1qoi.fsf@gnu.org> <877d7pfkec.fsf@gnus.org> <838rs51ery.fsf@gnu.org> <87tuate1jr.fsf@gnus.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="16377"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54964@debbugs.gnu.org, hmelman@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 16 13:10:15 2022 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 1nfgJg-00042B-PB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Apr 2022 13:10:12 +0200 Original-Received: from localhost ([::1]:51960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nfgJf-0005YI-Am for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Apr 2022 07:10:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfgJY-0005Vc-7W for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 07:10:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nfgJV-0004kr-Ud for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 07:10:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nfgJV-0008Uj-Os for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 07:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Apr 2022 11:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54964 X-GNU-PR-Package: emacs Original-Received: via spool by 54964-submit@debbugs.gnu.org id=B54964.165010737032609 (code B ref 54964); Sat, 16 Apr 2022 11:10:01 +0000 Original-Received: (at 54964) by debbugs.gnu.org; 16 Apr 2022 11:09:30 +0000 Original-Received: from localhost ([127.0.0.1]:60852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfgJ0-0008Tt-Bd for submit@debbugs.gnu.org; Sat, 16 Apr 2022 07:09:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfgIy-0008Th-Jx for 54964@debbugs.gnu.org; Sat, 16 Apr 2022 07:09:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59136) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfgIt-0004gz-Cq; Sat, 16 Apr 2022 07:09:23 -0400 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=Gj9RTgdoHA0/8IaiY0P5k5+xsAtiRj4qES5m189k9Zs=; b=fK6jVY5Sx+l/M9DDuhhz nmNq1a6hymYegtR6ZVn/6SgfzFrZGiWH92/NTbqDB6LApkkCjGvuqfi0NIYVjJ2ehhDETGBD4B+3a NPeWcfYENgppZDlP8wQQWv1I1ULXgFR+1jCRKgBkJj1y0TEwQqwjlEVhbq+/xorMUtgq2A8JaWSJj PbFk1eJPJ2+INDD/V+19KWSXamMO/bE2zJRz9BSHsuhLRmEUATONwK337IkljNDrrmXIdhJoNy5fd Ulj0J/RzHZitgXf5JLiLKw3aP8DVP6uybaWLRq2IJj7ioKqnUGooyp493RBy/jmCK5OWFyg3pqpuO vpmfDPvHGHUu7Q==; Original-Received: from [87.69.77.57] (port=1083 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 1nfgIs-0005md-Pd; Sat, 16 Apr 2022 07:09:23 -0400 In-Reply-To: <87tuate1jr.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 16 Apr 2022 12:59:52 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:229974 Archived-At: > From: Lars Ingebrigtsen > Cc: hmelman@gmail.com, 54964@debbugs.gnu.org > Date: Sat, 16 Apr 2022 12:59:52 +0200 > > Eli Zaretskii writes: > > > That NEWS entry describes two 'declare' forms: > > > > '(declare (completion PREDICATE))' > > '(declare (modes MODE...))' > > > > Are you saying that M-S-x uses one of these two? Then I must be > > missing something. > > Doc string: > > This is like ‘execute-extended-command’, but it limits the > completions to commands that are particularly relevant to the > current buffer. This includes commands that have been marked as > being specially designed for the current major mode (and enabled > minor modes), as well as commands bound in the active local key > maps. Yes, but again: how is this relevant to that particular NEWS entry? execute-extended-command-for-buffer is covered by a separate NEWS entry, which says: ** New command 'execute-extended-command-for-buffer'. This new command, bound to 'M-S-x', works like 'execute-extended-command', but limits the set of commands to the commands that have been determined to be particularly useful with the current mode. By contrast, the NEWS entry with which this bug report deals doesn't mention execute-extended-command-for-buffer at all. Its says this: ** New 'declare' forms to control completion of commands in 'M-x'. '(declare (completion PREDICATE))' can be used as a general predicate to say whether the command should be considered a completion candidate when completing with 'M-x TAB'. '(declare (modes MODE...))' can be used as a short-hand way of saying that the command should be considered a completion candidate when completing on commands from buffers in major modes derived from MODE..., or, if it's a minor mode, when that minor mode is enabled in the current buffer. Note that these forms will only have their effect if the 'read-extended-command-predicate' user option is customized to call 'command-completion-default-include-p' or a similar function. The default value of 'read-extended-command-predicate' is nil, which means no commands that match what you have typed are excluded from being completion candidates. Is something wrong/inaccurate with the text of the above NEWS entry? An honest question, because I really don't see anything wrong here.