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 17:24:14 +0300 Message-ID: <8c05eb11-102d-4d94-21ba-b60ceb6d9c43@gmail.com> 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="19933"; 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 Cc: thibaut.verron@gmail.com, emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 06 16:24:58 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 1kPnth-00053P-DB for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Oct 2020 16:24:57 +0200 Original-Received: from localhost ([::1]:50196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPntg-0000tc-GT for ged-emacs-devel@m.gmane-mx.org; Tue, 06 Oct 2020 10:24:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPnt7-0000Sn-0B for emacs-devel@gnu.org; Tue, 06 Oct 2020 10:24:21 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:41397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPnt4-0004gg-Tu for emacs-devel@gnu.org; Tue, 06 Oct 2020 10:24:20 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id d24so11274615lfa.8 for ; Tue, 06 Oct 2020 07:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Djl4nZuVzIpiTb1UYLtJ2IPct1fDrMYYTl8ULNQfhbQ=; b=Cy0xG0KasC6XvZhTojrEVWXIY8u+vz+HByYNBhrOBg0BbHK8taqjTWpRnzGFGexW8Z h2t3vfNVuJD3zZmahmvC6zS8BU6SNiHQ7lceSvQkvQdMBdMkSSeSVsDpuLuY1TBrSXET hP9zem+57h7CdKOoTD+IlYqQYxWWEYVgenyai0F6SVvMn8h55M+LnuZyQbyQyDRkrqp+ yWIvLc5uoFDkAmSnP14G4Q0lIMchtOKpnocgOL6IwG2Gqp7TwLLi+0kDjHpMobG31AdQ t5czQ1HeKj74pPf2hxlP9xHQcdjYA9H729fsdoSMzt+Gvt6qCacCUS3948HyufzLnh6g Tw2w== 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:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Djl4nZuVzIpiTb1UYLtJ2IPct1fDrMYYTl8ULNQfhbQ=; b=i16aEDPIznOV4AqfN7ZU2DzEbNKpWzPZeBwe6gqbKiUpT06Sb4NtOLim5qKWRKsQef MJL+MpAzx2Zx7DCPqJwNfKS7A2ef9QvSrxLpqSjZJ2KnhijDFB8lLXAHdJ57nXmQqs68 4e+D2H9lyVCB/9cCHWoAS8e5GiZLpOrcVtXEE3EQJlU9uBVcFhoTMXRrJoIK3ejK9k94 qGMSapOPKvBJV15RlLIp9SYDPhjPqnivPetkjijf+IGIs2MuT4/8UQkYnpr4OwlyN/Ay o9JoC2N6mbr+FiS6nnzuB3AfLYSIe6zKAf5w5RLrBd48/jmLcGIBASukvySdWgmwjS6K q8wA== X-Gm-Message-State: AOAM533TCd0drd4USo2AaL9Db9TyTik8A+soxy+4xvoA/4tfzi4IoND2 gxSOx6bxVdVd2NrQzASQZJjncI/T6UpCj1B9 X-Google-Smtp-Source: ABdhPJw0npI8aAcOmFhlk7GzC2Zc66xQN+Yv6MGaPoyszIOVVum7by7JFUtDzXJLtlxB0nDikHvghA== X-Received: by 2002:a05:6512:32a8:: with SMTP id q8mr650211lfe.209.1601994256532; Tue, 06 Oct 2020 07:24:16 -0700 (PDT) Original-Received: from ?IPv6:2a02:2168:b010:9800:e08:cf87:7be3:d147? ([2a02:2168:b010:9800:e08:cf87:7be3:d147]) by smtp.gmail.com with ESMTPSA id n8sm717212lji.1.2020.10.06.07.24.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Oct 2020 07:24:15 -0700 (PDT) X-Google-Original-From: Nikolay Kudryavtsev In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=nikolay.kudryavtsev@gmail.com; helo=mail-lf1-x12f.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:257165 Archived-At: Keybinding protocol would be a set of functions we expect a package implementing it to implement. Then package developers write protocol implementations and keybinding packages(and users) write protocol bindings. So one decent example I have is minibuffer completion. Lets say I'm using ErgoEmacs and it expects previous element to work on F11 and next element on F12. But there are multiple minibuffer completion packages, like Ivy, Icicles, Helm and ErgoEmacs developers have to currently try to provide concrete bindings for whatever they choose to support. Lets say there's a minibuffer-completion protocol: (def-kb-protocol minibuffer-completion '(next-element)) Then keybinding system developers just have to provide bindings for that protocol: (kb-protocol-bind minibuffer-completion '((F12 next-element))) And minibuffer completion packages just have to provide implementation: (kb-protocol-impl minibuffer-completion '((next-element ivy-next-line))) Ideally if we provide a robust set of such protocols we can accomplish uniformity of common actions between different modes, but also the ability to do quick keybinding for the same action across a range of modes as long as they implement the protocol itself. Then we just have to make sure that the bundled modes comply with the set of protocols we ship. -- Best Regards, Nikolay Kudryavtsev