From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Current mode command discovery Date: Sat, 20 Feb 2021 15:18:11 +0100 Message-ID: <87r1laomak.fsf@gnus.org> References: <87v9aubm96.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13151"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 20 15:18:58 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 1lDT60-0003ID-V7 for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Feb 2021 15:18:56 +0100 Original-Received: from localhost ([::1]:49370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDT60-0003Um-0p for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Feb 2021 09:18:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDT5P-00032I-Mh for emacs-devel@gnu.org; Sat, 20 Feb 2021 09:18:19 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:33202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDT5N-0006en-BE for emacs-devel@gnu.org; Sat, 20 Feb 2021 09:18:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NEUQpm11TUSnSd7c1q07wCeb3H/9+OHzt3O5HFuc2FM=; b=eCx9MOV7QA/KoyOu9etf1IsrQh Sdaw8uKgj2ElL4ZOuMQbtjgr4qQJkdtJ6bKHb8zlnj2U19/f2pMIOvINz3c01noQ0AevJf11IzVvV FxiPW0zFnJWfNb/ESvFVgYAikTSG0zMnVHY+YPcIW6cnOOt9Ax4uOScv2ydhxDoeBHLw=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDT5I-0006W3-Eg for emacs-devel@gnu.org; Sat, 20 Feb 2021 15:18:15 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEUPDw5ZWlaLeWrE xsP////Ijq7FAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UCFA4NHITXvDEAAAGxSURBVDjLzVOLsRwx CAO/BgA3sMYN3OL+e4tk375ckldAmLnPSLYAgUX++9BYJzLzA455IEd8wjxZ48HsTxhqviMPoRQp /x15iMbjg8A4+r7u65EZnh5jw1BbBeLIBMphZt21zeFv/Bs+ffA/fm7f1Zs8/bEQEHcUcYivexfp c5E4+C5vvZ62PKRiQX7juq532wqiP3grXZt3cxL1nM+yRVh0CImsg+OgdX7j6iYeXDRBKMCOT4Q8 uLTUhG0wtEwjYfx8M0NNvtjeBEFwd6VM70Zi9nEI+gnTTGECiWiH6EWnTK1j4iCX60Mwv4bPmoWZ pem3FKLHiNvrC8ZKc48l156/dA9Otq1bJY0EZWA6JpAxUPstzdzRpIEBWMaRW4PzKSNA7OljdEg5 ApVdSH37IcQmux3QiwGluHmjUUqxYYo5WBg8aJUnFQy80OHeEqNEeQfxwr+IsZcNq+L7CA6Moq+x t9CC3cAgtvzqkMVYGOZ7w2hQSjWMuOe+sGE7L0hCQEymyOS78TzLKGqpOiInXhm4Z0mXDGtcZQ5l fQbmOfkk19/Bbf8XJVE/wufGT5G/ABBSXjtTjA4FAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTAy LTIwVDE0OjEzOjI3KzAwOjAwS7FC1AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wMi0yMFQxNDox MzoyNyswMDowMDrs+mgAAAAASUVORK5CYII= X-Now-Playing: JPEGMAFIA's _EP2!_: "FIX URSELF!" In-Reply-To: <87v9aubm96.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 14 Feb 2021 18:19:17 +0100") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org 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, 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:265310 Archived-At: Lars Ingebrigtsen writes: > Now that we have mode markup, should there be a command like `M-x', but > instead lists only those commands that are specifically relevant to the > current buffer? > > This would only be commands that have been marked for the current major > mode and any active minor modes, I guess? > > If so, should that be bound to something, and if so, what? I've now added a first attempt at this to the trunk now. Click on a completion to select it. In an eww buffer, it gives the following commands to complete over. Which seems reasonable... ish. Peculiarities that we might consider: `ignore' shows up here, because we've bound `h' to `ignore' as a way to disable that key binding. That doesn't sound kinda non-ideal -- it should be unbound instead. `erc-track-switch-buffer' is a global minor mode? Why? All the minor modes defined by erc are global, it seems like, which is kinda odd. Uhm... OK, I think that's it. It doesn't seem like a bad list for a first implementation. The command name is really bad, though: `execute-extended-command-for-buffer'. Suggestions for a better name are welcome. Oh, and it's bound to `M-S-x' (for now). In this buffer, type RET to select the completion near point. Possible completions are: beginning-of-buffer (<) describe-mode (?) digit-argument (9) end-of-buffer (>) erc-track-switch-buffer (C-c C-@) eww (G) eww-add-bookmark (b) eww-back-url (l) eww-beginning-of-text eww-browse-with-external-browser (&) eww-change-select eww-copy-page-url (w) eww-download (d) eww-end-of-text eww-follow-link eww-forward-url (r) eww-list-bookmarks (B) eww-list-buffers (S) eww-list-histories (H) eww-next-bookmark (M-n) eww-next-url (n) eww-open-in-new-buffer (M-RET) eww-previous-bookmark (M-p) eww-previous-url (p) eww-readable (R) eww-reload (g) eww-select-file eww-set-character-encoding (E) eww-submit eww-switch-to-buffer (s) eww-toggle-checkbox eww-toggle-colors (M-C) eww-toggle-fonts (F) eww-toggle-paragraph-direction (D) eww-top-url (t) eww-up-url (u) eww-view-source (v) ignore (h) negative-argument (-) org-eww-copy-for-org-mode (C-c C-x C-w) quit-window (q) scroll-down-command (DEL) scroll-up-command (SPC) shr-next-link (TAB) shr-previous-link (C-M-i) url-cookie-list (C) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no