From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#52839: 29.0.50; The '(declare (modes MODE...))' NEWS entry is confusing Date: Tue, 28 Dec 2021 03:49:33 +0200 Message-ID: <701c3a8d-d7d4-cdb8-6e10-0212db7bc35e@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7064"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: 52839@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 28 02:51:23 2021 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 1n21e6-0001fX-8K for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Dec 2021 02:51:22 +0100 Original-Received: from localhost ([::1]:43566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n21e4-00064N-Gh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Dec 2021 20:51:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n21dn-00062U-Iv for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 20:51:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n21dm-0001wV-I7 for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 20:51:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n21dm-0004p9-8q for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 20:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Dec 2021 01:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52839 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.164065625318525 (code B ref -1); Tue, 28 Dec 2021 01:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Dec 2021 01:50:53 +0000 Original-Received: from localhost ([127.0.0.1]:44753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n21dc-0004oj-Q3 for submit@debbugs.gnu.org; Mon, 27 Dec 2021 20:50:53 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:45146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n21dZ-0004oa-35 for submit@debbugs.gnu.org; Mon, 27 Dec 2021 20:50:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n21dY-0005zj-S9 for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 20:50:48 -0500 Original-Received: from [2a00:1450:4864:20::32e] (port=43962 helo=mail-wm1-x32e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n21dX-0001vb-0P for bug-gnu-emacs@gnu.org; Mon, 27 Dec 2021 20:50:48 -0500 Original-Received: by mail-wm1-x32e.google.com with SMTP id k66-20020a1ca145000000b00345fa984108so3513067wme.2 for ; Mon, 27 Dec 2021 17:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:to:subject:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=iyRc3knID5rlAStONMGuIQ7DuJnCUxDPZMt/laWCt/w=; b=MkEkPI/W+5OmXJRNuwKUYK3c9zhteWcWPQnTvbtz2dJIkG8cw5Vu8KQimjlUUAtiDI uIoxm+rubO7vt+Gf0HgZL5X/4NN6tP4fy6QSPGGqmkEIQafK6kA3FwnlC18lXA3+ycUf aOn/PMSa1dNxzAlC/NrG6I0HczluHd4+OqA9AILL+8WLb9VpybFA286BgoaW3uKFL37P Q/CQ1s2U6WrIng1Ix7s7pqKfjmm5ywaWIous711OAFQrb0RlIzy9rQuj32S2dVnR12LS gA6Ixt1kP2LxeDQX6DKH0hFRyhDraLKN7ZV7Xm2iRFF1TmdGNGl4XI1Ib0+EVGDrIfjI gr8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:to:subject:from:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=iyRc3knID5rlAStONMGuIQ7DuJnCUxDPZMt/laWCt/w=; b=XWKkVIiAMeOyhpW5FA7TvbHsKyXf63mIcIcXiFOaGQRF5O4dHOcAuQSgjT+unQhX0B 5E+Cpl0zqATX2hLdXWlG9yC7SfGvhOT0/PpKbUdpIFHs9+80wZmgwD8gxm506tFvgTpR npvcrl+Kp2kA5lhqqV9OZx/ZOg7nFXLN1zrab9ITriVLfCQTr8h+nNgOGzK8ZEHejGS5 YcUCJcdVHiYrdTTpDBLzZqApMc+OfOupFc9dvk11kTZkSlOlvjwmc6uTtzzfBppRWvA6 7nxTnuubTXBW6lJnlPPPjbXw/daYUduB31cBYMej/1YpHL0pyeJEbkkGzc8AVpaoz1tk 08Qw== X-Gm-Message-State: AOAM531LYEutiZbPRMLMm53Alpn9UiJWHU4glHfU6V6VoMGmiRq0B6Vd N132aoKQfSIep0C7wzrTwhwlBiIDKik= X-Google-Smtp-Source: ABdhPJwA314DEqa2w97QvreNUl/JZWL9P1x9umKkBlfjO99aW1lXI+mV/1Df/zHxXAcuIMVwI6h5ZQ== X-Received: by 2002:a05:600c:1c90:: with SMTP id k16mr15139774wms.40.1640656244981; Mon, 27 Dec 2021 17:50:44 -0800 (PST) Original-Received: from [10.111.255.129] ([185.209.196.135]) by smtp.googlemail.com with ESMTPSA id b14sm12974688wri.112.2021.12.27.17.50.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Dec 2021 17:50:44 -0800 (PST) Content-Language: en-US X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:223225 Archived-At: It says these syntaxes "declare how completion should happen" or one of them "can be used as a general predicate to say whether the command should be present when completing with 'M-x TAB'", but neither have any effect unless the user customizes read-extended-command-predicate. The previous entry (the one about (interactive "p" dired-mode)) doesn't mention the predicate user option either. Should read-extended-command-predicate be set to #'command-completion-default-include-p by default? Otherwise the NEWS entries (at least one of them) should probably mention it. When reading the manual (subsection "Specifying Modes For Commands"), I'm feeling a similar problem. command-completion-default-include-p *is* mentioned, but only somewhere in the middle. The intro gives the impression that "specifying modes" will have an effect by default. The small two paragraphs saying Specifying modes _may_ affect completion in @kbd{M-x} ...when using the ... predicate ... look kind of sneaky. Like, we have just described a way to set up a bunch of meaningful information, and that _may_ affect your Emacs's behavior if (...). That's weird, but I'm not sure how to resolve that best. Apart from changing the default value, that is. Other options may be: * Change the 'M-x' binding to call execute-extended-command-for-buffer instead. The behavior of execute-extended-command won't change, but that probably isn't going to save anybody: the user who set up the binding to call that command explicitly is probably rare. * Have the subsection be actually about the command execute-extended-command-for-buffer. Mention its binding (M-X) and say that (interactive nil dired-mode) affects its behavior. Then mention that by customizing read-extended-command-predicate the user can have 'M-x' behaving like that as well. If they like.