From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iBZfOcpobmLOnwAAbAwnHQ (envelope-from ) for ; Sun, 01 May 2022 13:02:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SJyCOcpobmL+qAAA9RJhRA (envelope-from ) for ; Sun, 01 May 2022 13:02:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 85FBF7C34 for ; Sun, 1 May 2022 13:02:34 +0200 (CEST) Received: from localhost ([::1]:56208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nl7LV-0002Ae-Mr for larch@yhetil.org; Sun, 01 May 2022 07:02:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl7Iv-0001lt-LF for emacs-orgmode@gnu.org; Sun, 01 May 2022 06:59:53 -0400 Received: from mout02.posteo.de ([185.67.36.66]:58707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl7It-0007z5-9H for emacs-orgmode@gnu.org; Sun, 01 May 2022 06:59:53 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4F1CC240109 for ; Sun, 1 May 2022 12:59:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1651402789; bh=XJ3THfF7EzTZiGcZYhrggrukOeRnBe6eiI1iFkdikxw=; h=From:To:Cc:Subject:Date:From; b=EpBYZ+D70FZilkEcW5yJyTkjX5x79TEJuN5K4UDFQLp74Ij7hbaJidwYE+gbHla3O lfVGj/jZ0uQJfofpBKNoglIq2bM7GpA2Tjde0KJcHXV194MYZWPYwAjDI+3IpVd6fv JBLqNI9yyo2mNAFRYlRFtUkAVKXr/wL6ErmtSXZF4BEKawySZ0vGBW/yeBoE2svrhr ASPymFq2C71emEAXkLUE44Fcdaj06GvfwMnfW41B+irgLa38KgdyHSLyhd0ken0nwu tTm9hy9b4IvX3J4O6CpoI84Ni2R+FcRfRQZLMro/C65FeZ062zrEINcrnNrld5HUhH DZjMtN8a2ahhA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Krjsw4qyXz6tmx; Sun, 1 May 2022 12:59:48 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Subject: Re: [PATCH] speed commands: error message when a key is not associated with a command References: <87pmkyvmmk.fsf@posteo.net> <87y1zm7ma5.fsf@localhost> <87k0b6vdkx.fsf@posteo.net> <877d757vg3.fsf@localhost> Date: Sun, 01 May 2022 11:00:02 +0000 In-Reply-To: <877d757vg3.fsf@localhost> (Ihor Radchenko's message of "Sun, 01 May 2022 12:01:16 +0800") Message-ID: <87ilqp8qml.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651402954; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6eoDXyxZDcGKKgoG3MhNxtx5qxu8u76v6ZtHS33OA70=; b=HEU5MKtCEIhV3yCC8CvmeuGQ4YkJtvAYtx1WylzBpzXiyBoZwPrjWQy9ujrvnf9iIYcLz3 OH1FNXHeYiPkMprKGPEqeepK2stO+wiNpJotiz3kcT6IOefktBDpLl135QtHDWQEUeWQiV 2HEUAivEVDjx2U23dfnF1R0jMLV0NrNDj2u1rQEv3VFNH6khDWbtF3cf1zXMM7iTLHwyGL 9Ki3huVbgx7WiDkPnBeN7fx8wjMsD9LcD8zfJL26B4lGNxkp2Dno5pxYGzEo0rGM96sXoN Orng2Ycc6xcceN6thJLIc3WsfJeClNMRamMdNtrBNjy4Nu4v5mEoHERPGCu0Hg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651402954; a=rsa-sha256; cv=none; b=swaOCW0GY+qS0nvW4pz3MIkBaeOagyJ0bWj9lFpAxkpVkntdr+3cxRmAd1TXb50RtHEi86 WUzO8lFUuFFgW2V3DpJbSpDRWfBMfCmSaurGKen4szdi2Qnfs0/Ol422bxP3xXZRRHztm6 K4/0xzfA9gBAXMsOoHiQF3NmRVLeUkfHTzECdy72WBge7lBtPNMGfHC7UzJXsY8TY/DLil sy0UCUWfq7EmjainT0OFZEbpPr0zha6joSYZK/15eQ1r2qlzFouteDojLAN+fGC8rWRkrE JkmO69Ko9VBhtei0Zj8O5q4F4Ag5T1zKHdLqtDdcTTXy1zSOTAzMwkjZYyHyxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EpBYZ+D7; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.69 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EpBYZ+D7; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 85FBF7C34 X-Spam-Score: -2.69 X-Migadu-Scanner: scn1.migadu.com X-TUID: Z8k27JMmEe+H Ihor Radchenko writes: > This would not solve the problem of shadowing. > It may be better idea to provide a custom variable controlling > org-babel-speed-command-activate: do nothing or throw an error. > This custom variable should also be described in the docstring of > org-speed-command-hook to warn about potential shadowing. > > To summarise, your idea will be reasonable if: > 1. The new behaviour can be customized > 2. The new behaviour is documented in org-speed-command-hook Ok, I agree that this is the most reasonable direction. What do you think about the idea that I outlined in the last post of this thread (https://list.orgmode.org/87v8uqmkc0.fsf@posteo.net/)?: it consists in defining a new hook (by default with value nil) where the user can store those functions that he wants to have a 'strict' behavior: some functions or all. And then the user should add the org-speed-command-strict-function to org-speed-command-hook. If this idea sounds too hacky, I think a defcustom for org-babel-speed-command-activate, as you suggest, might suffice. Best regards, Juan Manuel