From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: command mode-specificity [was: scratch/command 064f146 1/2: Change...] Date: Wed, 17 Feb 2021 10:20:42 -0500 Message-ID: References: <87tuqbft57.fsf@telefonica.net> <87im6rndo0.fsf@gnus.org> <87v9aqn5eq.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="39961"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: =?windows-1252?Q?=D3scar?= Fuentes , 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 16:21:28 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 1lCOds-000AId-9U for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 16:21:28 +0100 Original-Received: from localhost ([::1]:36892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCOdr-0004V9-Bp for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 10:21:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCOdF-0003sV-6e for emacs-devel@gnu.org; Wed, 17 Feb 2021 10:20:49 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCOdC-0001m2-BT for emacs-devel@gnu.org; Wed, 17 Feb 2021 10:20:47 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CB43E4412C4; Wed, 17 Feb 2021 10:20:44 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8A756440C9A; Wed, 17 Feb 2021 10:20:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1613575243; bh=In9sGRqUv0pRpCyLr1kW9s4PniUcaQr+PvxIdg1IHws=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=k7KzHKNiH+qs9b4+UFH2F6nn5tx6SMNrC42IcrZqF8TJXful+nLNRWD1apZmUV2O/ fOqoS2kVFQ7wYAHOGDe7E7Jjof8C0KgIh6Ekj455U7dwm2oaUlJ9kJY5+dLz9IaxzF DGJeQGiP02pwzqJZndGlgcjvZGvG3fwkNjDSH/1ZvMNZFeg1YK7wluIHSQEEDC23I1 jzked6ns6yf4/XWmNedIiMaF1ZeOSQiOLns9g+IkOyzSKGRsDXdmpV8kiAuypDBEOG dz73GUA3lTVyH/hEy238Ow0QkWUTnap4+40aOOLOGdlHcHAHywQMfgLlBhkuhz7rhA AAYfgWUaUIB7Q== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C0F881203FD; Wed, 17 Feb 2021 10:20:43 -0500 (EST) In-Reply-To: <87v9aqn5eq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 17 Feb 2021 15:19:09 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:265002 Archived-At: >>>> Tho things can get murky: e.g. when dealing with multi-language buffers, >>>> or with commands like `diff-refine-hunk` (which I often use in Gnus's >>>> article buffers). >>> That's not a mode-specific command, so tagging it as such would be an >>> error... >> The point was that it's not necessarily obvious that it's not mode-specific. > Indeed -- tagging commands as mode-specific is not a mechanical task (or > something that can be inferred heuristically), but requires actually > giving each command some consideration. I think it would be good to try and clarify what should be the criterion, and not in terms of "should be listed in M-x" since that inherently depends on opinions, but rather in more technical terms that depend on what the command does. [ A bit like with docstrings: we like docstrings that say what the function does rather than when/where it's meant to be used. ] Maybe something like "would inevitably signal an error"? Stefan