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: Sun, 21 Feb 2021 13:55:39 +0100 Message-ID: <87zgzxlgvo.fsf@gnus.org> References: <87v9aubm96.fsf@gnus.org> <87r1laomak.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="37112"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 21 13:56:45 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 1lDoI0-0009Xl-R6 for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Feb 2021 13:56:44 +0100 Original-Received: from localhost ([::1]:43912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDoHz-00056c-ON for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Feb 2021 07:56:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDoH7-0004cr-Ue for emacs-devel@gnu.org; Sun, 21 Feb 2021 07:55:49 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:53158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDoH6-0002Oc-2d for emacs-devel@gnu.org; Sun, 21 Feb 2021 07:55:49 -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:Cc:To:From:Sender:Reply-To: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=KHXYf2qlCq9HOVdh3FygkI7r/W8CXpZlAd5xU+PPfoU=; b=ZayH5030CaIf6tinVdDlzLlwrw mZHvjytBTVEetU9KEBRf/tPcrwMZoD0kTrsAeCDz9HAso6mqiUEgCZB1NTAbSaIQ410SNenYM5M9J nOlzmlQLKev3bcPPJ6HeSV3t4vBDcXaULx2sQ7Nwti4U+TEOn5Yk6HhP5mLZeyx1yTfQ=; 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 1lDoGy-0008A4-Ch; Sun, 21 Feb 2021 13:55:45 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEWwdmqWYVlhLitD MDKROS+nRjXAgXHCbFn///97ekHOAAAAAWJLR0QIht6VegAAAAd0SU1FB+UCFQwZOC1CPL4AAAGy SURBVDjLrZNNTgMxDIUzCA3bZuAC46QHIOEChMwBqBKx7Wr2ICSuz7Od+aNboqpS/eU5L8+pMf+8 rN396HZlXqeb7Z21w2gPImwWAcUYR7trJds6qcdgjz3wPURZz3YVcAkyInJHiXUMnogXwLj4kh6m SwLcBjrWRxUkllDr9SZHmoEo55w2cK9eDAnI6NXA4xEkcgq6uACfa2UJKbhbAeq1sjWE0q+dGEwA JTnStNwGVOI0xuWIaLIoaiH3F3C58uEjz+prBZOC1MDwBxQAme7jLUgMHhBUcDuAi+QF6BQWkGni Oe+AuoLdBoJOJxrfbOXKZwO0rI0XScnpvQH8muAeNy+4O8ArX7wBmIGirQ0UAUsdbs3MriCHiBqg Bbh4ZlAU8Hhf7anfQFqBh6CfZ4AXTchoXcYHgMcWFlBXMCuYOCDirJK0wv75+gmgzc36RiC49gz8 lLNrwBPeYT9f5wHx+ZySgpLOheIIu99EASBvoArpPJq6Fxm0aZnXiwvjwFtd8DjbrQAOop8S5odP FvCB0Dl5cr4mnmwgnyLAT5MUdL/IyL2/NNBeSlAF/hmX+AuOVbuTqAOyYwAAACV0RVh0ZGF0ZTpj cmVhdGUAMjAyMS0wMi0yMVQxMjoyNTo1NiswMDowMH1yGHMAAAAldEVYdGRhdGU6bW9kaWZ5ADIw MjEtMDItMjFUMTI6MjU6NTYrMDA6MDAML6DPAAAAAElFTkSuQmCC X-Now-Playing: Insides's _Soft Bonds_: "Subordinate" In-Reply-To: (Stefan Kangas's message of "Sat, 20 Feb 2021 09:37:57 -0600") 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:265380 Archived-At: Stefan Kangas writes: > With the short list presented by `M-S-x', it does seem more important > that the commands that show up are highly relevant. In `list-bookmark', > I see some stuff in the completion list that I wonder about: > > - `digit-argument'. Should it be in `M-x', or is it more like > `mwheel-scroll'? Should it be in `M-S-x'? > > - `negative-argument', I can see why one would keep it in `M-x', I > guess, but in `M-S-x'? Yes, these don't seem useful to list, and they'll appear in all the modes... however, perhaps they should have a `ignore' completion predicate. That is, `M-x digit-argument' never seems to actually do anything? Are there cases where doing that would do anything useful? > - Finally, `forward-button' and `backward-button'. But I can't find who > binds it? In any case, it doesn't seem relevant to this mode. > I guess it should be the responsibility of the mode to unbind any such > commands. It's from this: (defvar tabulated-list-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map (make-composed-keymap button-buffer-map special-mode-map)) I don't know the logic behind binding the button commands in all tabulated list modes -- do tabulated lists usually have buttons in them? Sounds pretty odd... >> `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. > > True. But it would be good to find a general solution (third-party > developers will use it even if we fix eww). Actually, I had bound `h' to `ignore' here locally, because I was always hitting `h' in eww buffers. :-) > One idea is to a special list of commands that `M-S-x' specifically > always ignores (and add `ignore' to it). Since it's never useful to `M-x ignore', adding completion predicate to it would probably be fine. > Naming is hard... here are some ideas (none of them very good): > > - execute-extended-command-here > - execute-extended-command-narrow > - execute-extended-command-mode > - execute-extended-command-local Hm... those doesn't seem all that much more logical. > (BTW, why is `execute-extended-command' not just `execute-command'? > I'm not suggesting that we change it, it just seems like a strange choice.) I don't know, but perhaps we don't have to keep the "execute-extended-command" bit in this new command? So we could go for a different name like... `execute-relevant-command'... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no