From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nikolay Kudryavtsev Newsgroups: gmane.emacs.devel Subject: Re: Standardizing more key bindings? Date: Tue, 6 Oct 2020 15:53:22 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13403"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 To: thibaut.verron@gmail.com, emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 06 15:04:21 2020 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 1kPmdh-0003KB-7K for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Oct 2020 15:04:21 +0200 Original-Received: from localhost ([::1]:49868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPmdg-0003Gl-7p for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Oct 2020 09:04:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPmTB-0008P1-Rz for emacs-devel@gnu.org; Tue, 06 Oct 2020 08:53:29 -0400 Original-Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:36775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPmTA-0001KW-39 for emacs-devel@gnu.org; Tue, 06 Oct 2020 08:53:29 -0400 Original-Received: by mail-lf1-x12c.google.com with SMTP id h6so8117634lfj.3 for ; Tue, 06 Oct 2020 05:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=sndp4i9TNENrnMQYiNfThm/Lp6VVSkBtlsvvoq5vAw0=; b=T9U+pKrdixpFHjZPkipgPuvCjXjeeMWltAzjIJOSAUMvXte7kcHqQkc9qiHp/Htkvu Q6UYdPoMWH7aiV8S9AT8OBq+x/XyXaSX9Py8WMwlmX6zH2K3cAqIMAJ4y4OGdNwfezQe 1krbUMuWjEXiKoLgNjCpbTiaPkaBUVqUf4TxcoFE1IWFpse4HF9st1gzxkS//MUiwplQ IVzh1XN1QFjvdq2K6Tf0RDAk5UqfACofu1k1lwSlg8Wd4yh7ZHW2CYKWrBpHPJbfPoiP n8lxgGjNzwh7/yjg7WOs3USil0mG41jafuACtX8Z666VF1eqFlfOYIJGBlswN/ynJqZy D09A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=sndp4i9TNENrnMQYiNfThm/Lp6VVSkBtlsvvoq5vAw0=; b=T7RhrdEaF7qTsOFEMML2tRUDFUJl1CCfbszm9EMPPGb12bhKDm04dnTCvlbmu3bel1 cMSa+VypYach+/65gpCUuD26Ab7/xjWm/bm7qWIxqUKRzETgqql1fWwodDrSA7P68sLy /QaupzMCsJdWsq0IggPTxrv7gjHMUqOtmGkJSUGWG+hRa26Qrt0yarlUPEo6aZfK5iVr 4tx1uJP9Q6NHrsSFFyAeKVx1Q+KtAIlokGXK3IMLdMxHUE/Lcluhyz/VE+l+n4gWrgfq CTIrsiodMiGcRSCkjUwh/KHFk31JjSNUYI7gkFBEr6WPWw0Idy7u5wRhPV8XSB63AjgW ad5Q== X-Gm-Message-State: AOAM533jr3UILV2bEou2eWuuH6vFfzLoXFRrTjPv+PnFfkhSxwkSsqPk wseFgmyHSetzbPyom3m02KEyVgiLE8eSZA== X-Google-Smtp-Source: ABdhPJw8+rtoaSqy5kpTsLErSif+Lq8HEatDKL1N+K2QLJv3goaTP0I+DCN/ylNTG5UadlMo7BTf5A== X-Received: by 2002:a19:ac43:: with SMTP id r3mr445550lfc.164.1601988804186; Tue, 06 Oct 2020 05:53:24 -0700 (PDT) Original-Received: from [192.168.199.6] (broadband-46-242-10-44.ip.moscow.rt.ru. [46.242.10.44]) by smtp.gmail.com with ESMTPSA id z21sm600632lfb.20.2020.10.06.05.53.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Oct 2020 05:53:23 -0700 (PDT) X-Google-Original-From: Nikolay Kudryavtsev In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=nikolay.kudryavtsev@gmail.com; helo=mail-lf1-x12c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, NICE_REPLY_A=-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:257162 Archived-At: Hi. So I'm one of those people who loves to torture his muscle memory and I've tried most of the major variations of Emacs keybinding systems over the years, this being the vanilla, Evil(Spacemacs) and ErgoEmacs. This led me to thinking that maybe Emacs actually needs a separate intermediate level of abstraction for keybinding customization. And the solution that came to my head is something akin to Clojure's protocols. The problem is that there are cases where we have multiple interconnected keybindings, the most simple example being cut-copy-paste. Lets say we have a cut-copy-paste protocol and the default keybinding implementation of it that's shipped with Emacs. Then the CUA-mode becomes an alternative keybinding implementation of that protocol. Same thing with comint. As such, a package developers would be able to define that their package uses this and that protocol and then they'll automatically get the bindings. And the keybinding system developers can just provide alternative bindings for existing protocols and their job will be done, in the ideal world of course. This way we'll accomplish keybinding polymorphism. Anyway, just presenting probably the most over-engineered solution to this problem. -- Best Regards, Nikolay Kudryavtsev