From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Current mode command discovery Date: Sat, 20 Feb 2021 09:37:57 -0600 Message-ID: References: <87v9aubm96.fsf@gnus.org> <87r1laomak.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29237"; mail-complaints-to="usenet@ciao.gmane.io" To: Lars Ingebrigtsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 20 16:38:47 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 1lDULG-0007Vw-OB for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Feb 2021 16:38:46 +0100 Original-Received: from localhost ([::1]:41620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDULF-0005ax-QE for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Feb 2021 10:38:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDUKW-0005Ad-Lc for emacs-devel@gnu.org; Sat, 20 Feb 2021 10:38:00 -0500 Original-Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:40670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDUKV-0000zm-3M for emacs-devel@gnu.org; Sat, 20 Feb 2021 10:38:00 -0500 Original-Received: by mail-pg1-x535.google.com with SMTP id b21so7296264pgk.7 for ; Sat, 20 Feb 2021 07:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to; bh=MeNE0hk3zZN+RlXPybQkngCQmn5Ul89d03w+Q3NtvUY=; b=qglSh20CvvIM/vuM7Q57Z303rSolJVp+j7Y5S2MPo/ijdFTEYO9E7rFRNdlfOlGYsl yTxf3j6a+i+Kf9Eup9UiSt3Lw85LKGlQjcAkUw64iwA1uuSmPZlaEoK5r6IvPmnE/cYM AJqEGNCtpoRH3iBH3D9hG1/dzHbX1w734xD6ssqFp68z2SH7CF4ApVane4R5O5MpeFny Yb1aJ8xCT2yZkH1gHsACNBYcanPd5voe+FG9cVkUiHptxIWXRNyj65ff1keO+k+I861S oFOCst4Q13Fj4UBR498RwQwnrgo/T7QcfJJZicpGZfKXGIMg+OVoOBj61/wxeqL6v9/R TXfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=MeNE0hk3zZN+RlXPybQkngCQmn5Ul89d03w+Q3NtvUY=; b=KG+ZFC8TcAiEkPOrtzWcHqE1Mn3XyjnZZXuiP9yjc9TofM4lazq+T/lfXmA8oy+yoX KSDFj2uILPKe21Rt+ze52fWSDHTicqmlaHZgoGyE6S46LAbG+/n1S+1UNiqtF30DeVtx 0ktY9DVzZql1W4JWQvzmjtX8zX/Ty+bGk5jSnwC+4JWMZkxW8iqEY7JUHS0hM/ur7Clq 0/m7yXPSxGR3XkQ/397sTBeeyM2oWWZ9SIr2TpzSCuhCUPRpgxwF9UCaZE9wqoYvXkkt b4HKYqq0AEN/YqyBNpSOeKr0Lr1TZkIcW6x5b/S5CXXa+InB+1FGg3cOdYA0+90JUK7E r1FA== X-Gm-Message-State: AOAM531nmSHlaN0ydTTz4MRkctv/3qZL18UTXCfhkXDbU6dYsWetn/En 3tpRp4dYeeiEMIlSHYQHWH2gwARNQn6spXhGbNo= X-Google-Smtp-Source: ABdhPJz7VNvHABUBthWV8szM1hUteRRvNtB/MXyRfvHPMMReoLdL2tgK6oIGhtDIDg3IWnXJJplCmlJjMyttDBj0fho= X-Received: by 2002:a63:ed02:: with SMTP id d2mr13260458pgi.67.1613835477708; Sat, 20 Feb 2021 07:37:57 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 20 Feb 2021 09:37:57 -0600 In-Reply-To: <87r1laomak.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=stefankangas@gmail.com; helo=mail-pg1-x535.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:265333 Archived-At: Lars Ingebrigtsen writes: > 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. Looks like a good first attempt! 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'? - 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. > 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. True. But it would be good to find a general solution (third-party developers will use it even if we fix eww). One idea is to a special list of commands that `M-S-x' specifically always ignores (and add `ignore' to it). > The command name is really bad, though: > `execute-extended-command-for-buffer'. Suggestions for a better name > are welcome. 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 (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.)