From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Current mode command discovery Date: Wed, 17 Feb 2021 09:34:23 +0100 Message-ID: <87k0r7dre8.fsf@gmail.com> References: <87v9aubm96.fsf@gnus.org> <83a6s6bkrg.fsf@gnu.org> <87mtw6bkjo.fsf@gnus.org> <838s7qbjn2.fsf@gnu.org> <87eehi820x.fsf@gnus.org> <83v9at9xel.fsf@gnu.org> <87wnv8xlqa.fsf@gnus.org> <838s7o9g90.fsf@gnu.org> <87im6revhq.fsf@tcd.ie> <83im6r98qd.fsf@gnu.org> <87k0r7uade.fsf@gnus.org> <83eehf978r.fsf@gnu.org> <87ft1vu9hd.fsf@gnus.org> <838s7n95pf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30920"; mail-complaints-to="usenet@ciao.gmane.io" Cc: contovob@tcd.ie, Eli Zaretskii , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 17 09:35:53 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lCIJM-0007vv-PO for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 09:35:52 +0100 Original-Received: from localhost ([::1]:59958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCIJL-0002FP-Qo for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 03:35:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCII6-0001nN-3D for emacs-devel@gnu.org; Wed, 17 Feb 2021 03:34:34 -0500 Original-Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:36156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCII3-0001CS-2q; Wed, 17 Feb 2021 03:34:33 -0500 Original-Received: by mail-wr1-x42d.google.com with SMTP id u14so16438604wri.3; Wed, 17 Feb 2021 00:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=RTWgSq4v8SOnGEimKWM8X7sXrt8Uzr9u3Q2p+pXSz6k=; b=CNWwUXFgoyRofilcm7mcb0V4ZeSWO/opGBGpbmRoX73KFgpye/d61NqdxlwqVSvc2V C9YXOk9xe8aBDW/hHASzaGLSIJ58Ip1gRUkYGM9+gK3x+6bX7+vYjYLOAMt+uXAUBm17 o6eGt1x2rht6E6o0fPL7sHFK03IzHwgCHacWGHduBHm2RyRZKAAAFLkQ9XQVHQ31WuSl eXuMKwm3efsJOkojy5z74MSzp3SJO4YAkiGANodWppUVo1Wq25W2dkx13YEpdpWP/Hnf pNLcVQIPK53IvEeoiFTBbG6XOswzxLkn+DV3hCKRRUye3/mu7iTsY0k7GnbwYK3Hb5tB SjGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=RTWgSq4v8SOnGEimKWM8X7sXrt8Uzr9u3Q2p+pXSz6k=; b=hw13vdAfwPRN2OZ+HghFfXMCUds4zVYgyziqYe/d0XbiCEA1b2/nDZl30goEgm+Xo3 /uY3VvpU2Q3w6EoP90CBofv3M/pQpPBXd+wTjWY1dZ+z1gnoFcirl2AKjuMOevSk0cgC BD1vKFRO0PAM8QWSwi+d3dHW6XTJHBuIhceTc7AkW4fo9oLSt3zPPIPD6V9Pt14mhK6k vLuXTBqTdt7T+ORc9WFNxz1xSBO+nQHIqfaiUHIW82VkQHCrs42A7lQa8dDQtvCgSkdM yixnj89Y+qQfui97ADFtb9Vko6CSlKNJvfjzaLrDrME8C4DmAMc/9CmcojhVLY2DjTJj XDqg== X-Gm-Message-State: AOAM531COPTt2EMFTRpT9i4+763TkSrTYj31rnyNNIec70I0zQwt8E4k QIs6MdUUhLNKGjitHRVXUSarzZjMuITXuw== X-Google-Smtp-Source: ABdhPJxCZBAMpel2iFGde4sRIKb8Lpnv9iVSk83hgv6p+qOwIaAcB2+/YGtLs8nuQ68A7e+Od9oD1w== X-Received: by 2002:adf:e802:: with SMTP id o2mr28056550wrm.133.1613550864831; Wed, 17 Feb 2021 00:34:24 -0800 (PST) Original-Received: from rltb ([2a01:e34:ecfc:a861:69b6:6aaf:dbd3:8964]) by smtp.gmail.com with ESMTPSA id j4sm3583101wrx.23.2021.02.17.00.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 00:34:23 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <838s7n95pf.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 16 Feb 2021 21:24:12 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=rpluim@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:264978 Archived-At: >>>>> On Tue, 16 Feb 2021 21:24:12 +0200, Eli Zaretskii said: >> From: Lars Ingebrigtsen >> Cc: contovob@tcd.ie, emacs-devel@gnu.org >> Date: Tue, 16 Feb 2021 19:57:02 +0100 >>=20 >> Eli Zaretskii writes: >>=20 >> > In "Incompatible Editing Changes in Emacs 28.1"? >>=20 >> No, in "Editing Changes in Emacs 28.1"... But that section is perha= ps a >> better one? Feel free to move it (and expand upon it) if you wish. Eli> I'd prefer to make the feature opt-in, see my other message. Then Eli> NEWS entry won't need to be moved. That entry says: ** New user option 'read-extended-command-predicate'. This option controls how 'M-x TAB' performs completions. The default predicate excludes modes for which the command is not applicable. I=CA=BCm failing to parse that second sentence. After spelunking, I think you mean something like: "The default predicate includes commands applicable to the modes (major and minor) active in the current buffer". The spelunking I had to do: C-h v read-extended-command-predicate, I get: read-extended-command-predicate is a variable defined in `simple.el'. Its value is `completion-default-include-p' With no description of what completion-default-include-p does, so then I have to do C-h f completion-default-include-p to get to: completion-default-include-p is a compiled Lisp function in `simple.el'. (completion-default-include-p SYMBOL BUFFER) Say whether SYMBOL should be offered as a completion. If there's a `completion-predicate' for SYMBOL, the result from calling that predicate is called. If there isn't one, this predicate is true if the command SYMBOL is applicable to the major mode in BUFFER, or any of the active minor modes in BUFFER. OK, that=CA=BCs clear, but we check 'completion-predicate' as well? That=CA= =BCs not in NEWS. Robert