From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: master 859190f 2/3: Convert some keymaps to defvar-keymap Date: Tue, 12 Oct 2021 07:24:45 -0700 Message-ID: References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <20211004081727.4F24921048@vcs0.savannah.gnu.org> <871r4qcs8s.fsf@gnus.org> <87o87ubcnl.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 12 16:28:02 2021 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 1maIl8-0000Mj-78 for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Oct 2021 16:28:02 +0200 Original-Received: from localhost ([::1]:59594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maIl6-0006b7-Fj for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Oct 2021 10:28:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maIi3-0004GQ-R5 for emacs-devel@gnu.org; Tue, 12 Oct 2021 10:24:51 -0400 Original-Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:37625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maIhz-0006L6-VL for emacs-devel@gnu.org; Tue, 12 Oct 2021 10:24:51 -0400 Original-Received: by mail-pj1-x1031.google.com with SMTP id lk8-20020a17090b33c800b001a0a284fcc2so2024080pjb.2 for ; Tue, 12 Oct 2021 07:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=FLGtn6Ddh4OkuSPHPhZg/zFnhQb/pxgfbIBLDlB5UBM=; b=ZPGI643K7WZi8d/GX44oGG4aumVIv+izYsb8DbXPD8pz3dDvnos0DhnkA9LvUeTTf3 ylYEzJIw1zsDAi/HQ28X4Iidt0NbD0WN9YYVSlnP346ZG4ZZ5cRLDVh2v1UztVDeCJt0 xU+5XycPr+WfnZIh3ssvQ0t2Vjfp8EqAXxS6XaDoJ0sB7AsLpHn9QLfGIFfJkVxiRCBh nwGjsH4pU+LX7L78PlaIP3tELJhNYMf+GMfFPNT2GvWZnAFLjiM58uM1Z9v99+0t0xK1 0xduyfdBcakirOAi+G83UK5ftq1LFOPb9dE4h2eWNeO6wriqxfRdly1qj69CYFpMp0Hz 3bPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=FLGtn6Ddh4OkuSPHPhZg/zFnhQb/pxgfbIBLDlB5UBM=; b=YjzAmm7n7KByYsC37H0S+31Cnee65Hx5kh3jrUsABZeTGXoXcsX+ETEexC3t3VqHl2 Wc5d2WHRSML5h4x1EGdXAwuWQFLm2G3lr3XKe/t7TlzB1ZX66pVC+ANmm4DqCvYhm2XG Km8KRI9dRMG+kG/n09pAHXFAWSCM4093lZSYEGXpJTDtOscLqQ5kfJKs+QnBjVfQWC3B jK/aKjlgFGY85FkwatDF12WxF5D/EepLs7bdZfWwH2ye4x5qno+VVvDXYLX1AOnGm3Zo v5A3nswBC1sHaRxy3c9iXcDyYgW6mQSST4Jsl+GCJSiP/zauxVf8FhyGtVutpGGFsKLk kbjw== X-Gm-Message-State: AOAM5306uojqQ5TQ93LsgnBEhjIvJqiYjZ89wdgFmSH7om5Ceon0UfBm +7bPQlV5Gxqtzg0Ya9Lqcy7cghoZ0hRY6X3w5RU= X-Google-Smtp-Source: ABdhPJzvQdiNFO2Z9Lb9mOcxfFQ/KpjbHCEm1s/xPnUfN1AIBH7ydjU1uO31KLBMy1pywKU0LVMrsw+R/zZPPjdMjtM= X-Received: by 2002:a17:902:6b07:b0:13e:d5ba:3d8f with SMTP id o7-20020a1709026b0700b0013ed5ba3d8fmr30517623plk.32.1634048686420; Tue, 12 Oct 2021 07:24:46 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 12 Oct 2021 07:24:45 -0700 In-Reply-To: <87o87ubcnl.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=stefankangas@gmail.com; helo=mail-pj1-x1031.google.com 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, 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:276807 Archived-At: Lars Ingebrigtsen writes: > It's confusing because it'd be a different syntax for define-key and > define-keymap. > > If we were redesigning all the Emacs keymap functions from scratch, I'd > go with the `kbd' syntax for keys, but unfortunately we aren't. Aha. Now I understand the argument. But surely that's pretty minor, given that we can just document this difference? People might appreciate the easier to read syntax many times more than they will struggle with this minor additional complexity. It seems somewhat unfortunate to me that we are effectively doubling down on the mistakes of the past. I'd rather take one step forward now, in the hope that we can do something about "define-key" later. I think it's clear that an important section of the Emacs user-base values a more succinct and clear style higher than the idioms and idiosyncrasies of the past. This has affected Emacs in many positive ways over the years, see for example how dash.el prompted the development of seq.el, etc. With regards to keybindings, I think many agree with you that the kbd syntax is better. But people are not sitting still. On the contrary, there is a lot of experimentation taking place in third-party packages specifically to avoid having to use `define-key'. See e.g.: https://github.com/jwiegley/use-package/blob/master/bind-key.el https://github.com/noctuid/general.el https://github.com/justbur/emacs-which-key#keymap-based-replacement https://evil.readthedocs.io/en/latest/keymaps.html#evil-define-key Over time, and if we don't take action, this risks leading to a proliferation in various conflicting and incompatible styles, that all depend on this or that third-party package. Meanwhile, Emacs yet again looks archaic and too stuck in our old ways. I suggest that we would do better, and perhaps partially pre-empt such a development, by taking a pro-active stance with a new construct like `define-keymap'.