From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CEIgCWC17mEajgAAgWs5BA (envelope-from ) for ; Mon, 24 Jan 2022 15:19:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CK67AWC17mHYKAEAG6o9tA (envelope-from ) for ; Mon, 24 Jan 2022 15:19:12 +0100 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 C310B3B9A6 for ; Mon, 24 Jan 2022 15:19:11 +0100 (CET) Received: from localhost ([::1]:40034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nC0Ba-0001uo-Jn for larch@yhetil.org; Mon, 24 Jan 2022 09:19:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nC04p-0002Ry-Kx for emacs-orgmode@gnu.org; Mon, 24 Jan 2022 09:12:12 -0500 Received: from [2a00:1450:4864:20::133] (port=34440 helo=mail-lf1-x133.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nC04n-00049Z-Cn for emacs-orgmode@gnu.org; Mon, 24 Jan 2022 09:12:10 -0500 Received: by mail-lf1-x133.google.com with SMTP id p27so49713108lfa.1 for ; Mon, 24 Jan 2022 06:12:08 -0800 (PST) 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; bh=a0l90lqoSpPUmlmy3IB0XUkjnltbxd+PWkdZ0K0/zOw=; b=CWrx0ZcmjIk4+Kz3hk1/UyGo0TXkvZpM7KXiglvAGePnTrxPD82xOpG5Hh5NF9SUx1 f0lK4BCJ07L+UYay7jS4MrLBW7+RWS2RvT1UIUdQ+KJw4xIhwK+3qENPUmw7RpW6WMyp /9/AXgSYRHSFLp5xOuIl2nTp16TR7r+MCg7bOklCszePMK7d1FFvHDPwVKzryn7LrN7y 7sdOZI2iCilxroJeF9zAoHSmPPThg0Y6YAdy0elesfUh/adWUo0W+/PfHrW2qE7TLnwB mnfl2eDkJKj2bYO+rfgpXMbdDAgJ1cPUaB+BDBZ1GxxR9mt9s4I4ccVy8RCC4pypcZ2e pA0w== 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; bh=a0l90lqoSpPUmlmy3IB0XUkjnltbxd+PWkdZ0K0/zOw=; b=i0ygzZPUav6KFngSZN+W6SfCiNt36GweZ3pknliUu1lbJjF9/PNMrV/YkXF8umUqfY wxeIoOuxZ+AagyeIrMg+0F8JKbVSL8Ih8IHV6PWE/eAyVaHCI7ILKfUFWdG8pP/N0O5q dhSVgL6BjBqWHx7HvLdPJt9174SJf5wbAKEkeneU7IE6UiJWgXqRyIMOGSVV/IuZpJps XGg/XM0ztb76HzwZ67A7wuHWwwHtRYTsIb6Zrrxq+mf6CLQhtziHw0XO27S/iZdeQ/5v 8LM7Y/hx1zw4bFJM+0RnEVNIFYeRdjKz9LrjrhDWGce6j+FjJ0xK245hDO8uNxe0m+5g HLlg== X-Gm-Message-State: AOAM5326JXHhRaWsyLqBrEZoDji8Lfo38pFyaV+7K289WXhjSFMHvhkp AV9mTeaacXGWE86yMboosPU= X-Google-Smtp-Source: ABdhPJwT5Gks2mtXw5DyY4NTQ90wh8O0SeRud1eifMQyxT9sRHPfvKUKkzmjv5ciweeo7X+cxjFaRA== X-Received: by 2002:a19:7402:: with SMTP id v2mr9793853lfe.389.1643033526875; Mon, 24 Jan 2022 06:12:06 -0800 (PST) Received: from localhost ([91.210.107.150]) by smtp.gmail.com with ESMTPSA id g22sm547014ljn.59.2022.01.24.06.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 06:12:06 -0800 (PST) From: Ihor Radchenko To: Tim Cross Subject: Re: Extend the existing alternative set of key bindings for terminals (was: Second Ctl in keychord not detected) In-Reply-To: <874k5x4oc7.fsf@gmail.com> References: <877daw6i8l.fsf@hornfels.zedat.fu-berlin.de> <878rvblwmx.fsf@localhost> <87y23b6dvz.fsf@hornfels.zedat.fu-berlin.de> <874k5zlsd2.fsf@localhost> <87sftj6ard.fsf@hornfels.zedat.fu-berlin.de> <871r13kvfg.fsf@localhost> <874k5x4oc7.fsf@gmail.com> Date: Mon, 24 Jan 2022 22:16:33 +0800 Message-ID: <874k5tkym6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::133 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=yantar92@gmail.com; helo=mail-lf1-x133.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643033951; 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=a0l90lqoSpPUmlmy3IB0XUkjnltbxd+PWkdZ0K0/zOw=; b=L93LxkLB/hX5RQOi+As3cnfbClsXwyIIBKN2LnzaEFPdvPEt/h2qGf5/CA/Gcsao1A2vBw BBXssNeciY+9gqhbaPZmSbe+dKaUBDwpVgdT+pRuBxlVU78tvr+hWlfOXvNCc3ERQCWIJ1 nhcG5V1BJ7sxKCKpi6v/tFr1bav4TX2jz96yS64NCfEdvCO1qn41o29tiRtDgv91Twt/hI 1SFPC0R7msHh8HIcYXYgsbMEdykVXGm7e8YP65XAH/EvnrlTw/rxh+VCuEdAfoQTchMMz0 ipfAfBuk6vStfQhjlsYsJobNdkyEVsshUDVs/ixdlh29hcj12NnrDGarZ2PH6Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643033951; a=rsa-sha256; cv=none; b=mv4VL8VTsuIXVhYRSWPVnZMKMfwsIObNJ31ggFChRMWOEc+gNdmcUbv/G2wlT4glyZTajg H+5rtHaeQRQgli+wZSi3oDLJFgWFB4zfmCO+fbjrDSh5txUvLlV095geRlVi/AsVuzXPG+ AVGKD+BfrslCHgoEyCjH03XOjdkVu42U7iUINZjQJYb3k3e+CD39qDXDP+AGAooJgq1vhQ /oBXdH5YDnomUQHg9RDhD9jytKM0vVUYRMu98CAUjhCa+Lcqx/WL/Yue0YitrGN/CdOyfI DPYTvPRFZLY/fDiAVx6kuuY9xYuLaw7Kh3zbd8y67kzUUgV+vaGnEzKZz8Ak9w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CWrx0Zcm; 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: -8.83 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CWrx0Zcm; 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: C310B3B9A6 X-Spam-Score: -8.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: oJp473e9TpeU Tim Cross writes: > Ihor Radchenko writes: > >> Also, it appears to me that we may keep losing terminal-incompatible >> keys in future unless we provide some mechanisms to check terminal >> compatibility automatically. Any ideas? >> > > No ideas on this. Problem being I don't think there is anything like a > terminfo service which will tell you about what capabilities/bindings a > terminal emulator has. > > Just some thoughts on this - > > I fear any such attempt is likely to end up in a game of 'wack-a-mole'. > While it makes some sense to provide alternative key bindings for Emacs > running under the GNU Linux console, especially given the limitations > under the console are well defined and constant, I'm not sure > we can provide reliable solutions or tests for different terminal > emulators (which will often 'reserve' various key bindings for their own > use. This is especially true for more advanced terminal emulators like > tmux. We cannot even handle GNU Linux console now. Technically, man 5 terminfo describes all the details on how to obtain terminal specs, but I am not sure how to extract useful information for key binding purposes. Can we do it programatically? > An alternative which might be worth considering would be to improve > documentation on using different popular terminal emulators, like tmux > which could cover both adapting org key bindings and adapting the key > bindings the emulator uses (a very quick google on this indicates you > can change the tmux bindings, but that detail is apparently not well > documented). Such documentation could include some guidelines on how to > identify the issue, identify at what layer (window manager, terminal > emulator, communication protocol etc) the problematic binding is being > intercepted etc. The interactions at this layer can be complex and > confusing, especially for users who don't have a clear model of how all > the layers interact. I am not aiming there for now. Just basic terminals. tmux, WMs, system-wide key bindings, etc are all higher level and can be configured by the user. We _might_ want to support the most popular shadowed bindings, but the problem with terminals is a lot more pressing. Users cannot really change what is supported. > A more long term strategy which I wonder if we should consider is > whether org would benefit from adopting the use of something like the > hydra package. Org needs a lot of key bindings - many more than most > other modes. Available bindings are in short supply. Perhaps leveraging > off something like hydras would both offer more flexibility and make it > easier to manage. Likewise, could transient mode help in this area? It may be a good idea. However, not all the users like hydra style. Note that we already have org-speed-commands. They provide somewhat similar functionality. We may extend them, allow using via transient keymap, or integrate org-speed-command-help with hydra/transient.el. Patches are welcome! Best, Ihor