From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wD+wImk0bWLATgAAbAwnHQ (envelope-from ) for ; Sat, 30 Apr 2022 15:06:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cBgTI2k0bWJcFwAA9RJhRA (envelope-from ) for ; Sat, 30 Apr 2022 15:06:49 +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 43DFA2DB55 for ; Sat, 30 Apr 2022 15:06:49 +0200 (CEST) Received: from localhost ([::1]:33528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkmoC-0007aD-A8 for larch@yhetil.org; Sat, 30 Apr 2022 09:06:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkmnc-0007a5-4A for emacs-orgmode@gnu.org; Sat, 30 Apr 2022 09:06:12 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:51730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkmna-0002bl-I1 for emacs-orgmode@gnu.org; Sat, 30 Apr 2022 09:06:11 -0400 Received: by mail-pj1-x102b.google.com with SMTP id p6so9266693pjm.1 for ; Sat, 30 Apr 2022 06:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=0dUq76Ie6UV3Bl0U/I6RGUV3yKWwLwyjCw6ntqzb7iE=; b=LuGsRoDxDa6nZ325W26Z/C5XaSgKmHzMsK3DqrKOfusHXmaHrNX+m42BG5GE+Grghd 7W+OgTVQHeu2xI+Myb6Arm3AZ8Ro1zQNY6jsYKAHeiYduhi9bvFAs2ndKIR+/NoCIChI LVnRd9/MNVdei3aKzEjzSBMYt6qv1DmAif85P4Uxl/2ONPOLCd2LEFC6MLWPOIpjg0PG pCBpN5MsBq1/8FSfissvfbf4hXOLn1f6s7eYIU2AUmB2mXjzx/XNVPk0c2Bev58MDM7J MeJevy7p7RV7pfHm9GbfSAB3ieBPzl3eW2RmC+ZwIPBuQin7KcGpxXTha8ry84nyndvH DtLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=0dUq76Ie6UV3Bl0U/I6RGUV3yKWwLwyjCw6ntqzb7iE=; b=oqcC0ZLkoo311EzPp6qVcrJJQxbR2EgR8reXOE4UDCBbXsd5J/neBaVPJwfxAXTcjq V7cYgfZ0K8Gh5SDYcjRr71ArZ7E4he53/gv8WByzsVfSjCZNzA28Hd+xxI7blyDFIMtw kPLf6o/J9rxhrlcwFAjMZ+N0EPRKL7+5Roi6NZMjQX1xuFnqdQGj11GpL4HN80MLyPvJ 1eqoV25kXi0vS5YapHjvH+MmsgFNQcsHO4C0LqOCcL591Mool2X77YSJvPhw0Qhrdz3f K+Of8fWKyketMwLDLGk7SH0s6ScxoeF35VrjtawFZRWQ6uH4Lp17BBxTTpqpQOYX10W6 CkEQ== X-Gm-Message-State: AOAM531mOVJJtxtiFdJaL5FEDby7hM/ZxFv79eyRtxhOD/YZqFxJNWzG K7uBJPylughB+K+lQrTSIEI= X-Google-Smtp-Source: ABdhPJx1hoSjHuScclvDzei0foJcHq3c4YKdevZiZdvks74TNbI0KlqbGD1smgTPlftcTpItE22FLA== X-Received: by 2002:a17:90b:164f:b0:1dc:199c:56cc with SMTP id il15-20020a17090b164f00b001dc199c56ccmr4150399pjb.177.1651323969096; Sat, 30 Apr 2022 06:06:09 -0700 (PDT) Received: from localhost ([63.143.61.57]) by smtp.gmail.com with ESMTPSA id e5-20020a170903240500b0015e8d4eb281sm1433734plo.203.2022.04.30.06.06.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 06:06:08 -0700 (PDT) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: [PATCH] speed commands: error message when a key is not associated with a command In-Reply-To: <87pmkyvmmk.fsf@posteo.net> References: <87pmkyvmmk.fsf@posteo.net> Date: Sat, 30 Apr 2022 21:06:58 +0800 Message-ID: <87y1zm7ma5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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=1651324009; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=0dUq76Ie6UV3Bl0U/I6RGUV3yKWwLwyjCw6ntqzb7iE=; b=Y6A+hZge6CUNGPWqvQInZwv8qic3gKJBY6giPk+hzcvAzKB4H/pF1LcsIkkPk+KPFBHbeo jFCakdOYr3myUchIf6R9UcyQbBMT/rzs1A1Pt+b622sEEy8ZSibBQPgWbtBxCg+dSqw8lC oMYGuBhxj6AZMmWZWXq4ELblrjX8A/nkpzrEKlUA3MQSe9TPHqQPf+S5oIkffm6LTEGeJO zQfDfutcqGL/0hKaDMvXJXyM9c9tR6d4tfz5sVmNARozMjM0E7C5nHSK8CLiwxtUIDhT2/ TJIZs3A86QoFnPT5oUSCauMxUaSTKCkhI87ZOPUY5C5rXOe//JTqVI8N2nYXVQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651324009; a=rsa-sha256; cv=none; b=DrczPrf6l3PM4sr1AZUsymm8js6JYPMgpx8775l1OXSQPHtjD56LwqQMdHujg1byHdDzHZ hU7FWf0OMB+PMHorWHmmvzWhjwZXMJeDtOJPe3Sa4JLGoC8zXvOF9EppIQJoavLZt4ko0K /etj1MVCWhY59AJ4cykuhnrOYPL4izBN52thA67EWGgc3X+OZOgTe2hXWT0PFL+VKOaRR8 yLQkntwi9y3QwHAXI5ghoL9D1WTuN7x+6L+BSPNjMuvAYrtqKihEjkkPbXyjEdE4dkSbQT fcLdWhLSF633I5zCIcuir2xTW07J91yu2x76qOGL82kOop3B5JML8nvP4QYeag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=LuGsRoDx; dmarc=pass (policy=none) header.from=gmail.com; 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.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=LuGsRoDx; dmarc=pass (policy=none) header.from=gmail.com; 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: 43DFA2DB55 X-Spam-Score: -2.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: ADci/GNPtRhw Juan Manuel Mac=C3=ADas writes: > If we have speed commands activated and we type (by mistake) a character > not associated with a command, the letter is printed at point. I think a > more appropriate behavior would be: > > - key associated with a command: the command is activated > > - key not associated with a command: an error message is displayed. The idea is not bad, but I doubt that it can be implemented cleanly given the current speed commands design. > * (org-speed-command-activate): If a letter is not associated with a > command, an error message is displayed instead of typing the letter. Note that speed commands are not only decided by org-speed-command-activate. Any function in org-speed-command-hook can trigger speed command. Throwing an error in org-speed-command-activate can potentially shadow other functions in the hook. Best, Ihor