From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Howard Melman Newsgroups: gmane.emacs.bugs Subject: bug#54964: 28.1; mistatement in NEWS about read-extended-command-predicate Date: Sat, 16 Apr 2022 09:30:27 -0400 Message-ID: References: <4DA6706F-6B98-4CA5-B1A5-EAFBDAB3125F@gmail.com> <83mtgl1qoi.fsf@gnu.org> <877d7pfkec.fsf@gnus.org> <838rs51ery.fsf@gnu.org> <87tuate1jr.fsf@gnus.org> <835yn91dzi.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="19845"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) To: 54964@debbugs.gnu.org Cancel-Lock: sha1:EOhEaWgkszdBMAb4++9ZwxR4eSE= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 16 15:31:12 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 1nfiW8-00053k-O1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Apr 2022 15:31:12 +0200 Original-Received: from localhost ([::1]:54732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nfiW7-0003zT-BG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Apr 2022 09:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfiVy-0003zG-Ru for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 09:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nfiVy-00035m-Iq for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 09:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nfiVy-0005kW-D1 for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 09:31:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <4DA6706F-6B98-4CA5-B1A5-EAFBDAB3125F@gmail.com> Resent-From: Howard Melman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Apr 2022 13:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54964 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165011585022083 (code B ref -1); Sat, 16 Apr 2022 13:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Apr 2022 13:30:50 +0000 Original-Received: from localhost ([127.0.0.1]:32771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfiVj-0005k2-0S for submit@debbugs.gnu.org; Sat, 16 Apr 2022 09:30:50 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfiVh-0005jq-OW for submit@debbugs.gnu.org; Sat, 16 Apr 2022 09:30:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfiVg-0003xU-K5 for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 09:30:45 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:59798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfiVc-00031H-DS for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 09:30:42 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nfiVa-0004Rf-MU for bug-gnu-emacs@gnu.org; Sat, 16 Apr 2022 15:30:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:229981 Archived-At: Eli Zaretskii writes: >> 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. If the NEWS entry in question is just about M-x then you are correct that it is fine. But if it's about these declare forms in general then it seems to be problematic. I read it as the latter for two reasons. First the header: ** New 'declare' forms to control completion of commands in 'M-x'. reads to me as being about "New 'declare' forms" which are (incidently) used to control completion in M-x. That they are also used in M-S-x seems relevant though it's not stated. Second, the final paragraph in question, talks about "these forms" and doesn't mention M-x so I took "excluded from being completion candidates" to mean from all commands. This entry read to me as if it was written before execute-extended-command-for-buffer existed and wasn't updated after it was. I think adding to the end something like: "from M-x (though they are used by M-S-x which see below)". would clarify it. -- Howard