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: Representing key sequences (was: master 859190f 2/3: Convert some keymaps to defvar-keymap) Date: Wed, 13 Oct 2021 15:17:51 +0200 Message-ID: References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <20211004081727.4F24921048@vcs0.savannah.gnu.org> <871r4qcs8s.fsf@gnus.org> <87o87ubcnl.fsf@gnus.org> <87h7dm9en7.fsf@gnus.org> <87czoa9e7p.fsf@gnus.org> <878ryxakv9.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="6144"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 13 15:19:39 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 1maeAU-0001IZ-LL for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Oct 2021 15:19:38 +0200 Original-Received: from localhost ([::1]:38178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maeAT-0005VC-J0 for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Oct 2021 09:19:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mae95-0003Wr-Fn for emacs-devel@gnu.org; Wed, 13 Oct 2021 09:18:12 -0400 Original-Received: from mail-pl1-f180.google.com ([209.85.214.180]:40567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mae8x-0004FY-KY for emacs-devel@gnu.org; Wed, 13 Oct 2021 09:18:09 -0400 Original-Received: by mail-pl1-f180.google.com with SMTP id v20so1778612plo.7 for ; Wed, 13 Oct 2021 06:18:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XGAGqpN12h3425KP+yGMKqy67nWqCy9QvMXMKSinyHo=; b=TYTeVzX9Qg0exeYyFFaPWDa8rSBJAOTOX8PXP+MA0u9YUYa8MIlYpbAVmwo4W7eg5o 0kI3mNezGPhOh9Ag7rKFM/81P8EgZAqtBgxLZbG6XLNWYs4To1mykecZ8NjyDig6cVnd +/Kx6WucESLsOYaJySdb7al0FwHK6PkivwTNXgRGWNr5O04XgmJ7lVDHVw/kdSgq97eH Z6GSRu+nJ0JXn0m/rwWmnkN8ac2YC4JGBw+lYlMyxZFgY4dFNSGplIu0LsRwUVO5W+Cl rObFW2Ss64mAB/yF2iUbdCpZAF8TAtQVk7BhPt5zvYbgVSSHVqzmSRhJgsREf8Mep7Ir ALyQ== X-Gm-Message-State: AOAM531ExTKlcCPNjgGZYUU+QJMWhAnZJpAG2VaIMIDRhXz2/nZMpb43 +up/ThPC3TgMnwPW/9J+jCIEvfIt6aVH00Jzmlk= X-Google-Smtp-Source: ABdhPJzChlKja2d40KEI0qVcHinn3kOElxc9tlxYhS2kwWBIPeC2siPzkAPcZ61imcpozTXLEdeXNHN28gxuOsf9Td8= X-Received: by 2002:a17:902:e74a:b0:13f:3538:fca0 with SMTP id p10-20020a170902e74a00b0013f3538fca0mr18022705plf.22.1634131082221; Wed, 13 Oct 2021 06:18:02 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=209.85.214.180; envelope-from=stefankangas@gmail.com; helo=mail-pl1-f180.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:276894 Archived-At: Stefan Monnier writes: > > Currently, we have 2 "builtin/native" representation of key sequences: > > (A) strings (where every char represents an event) > (B) vectors of events > > I believe they are both unpopular, but (A) really sucks (it only > handles a small subset of possible key-sequences). > > There are two "standard" alternatives: > (C) string (passed to `kbd`). > (D) vectors of lists (using the XEmacs syntax). > > I'd be in favor of promoting both (C) and (D) while phasing out both (A) > and (B). I agree with regards to A and C, but I was not aware of the difference between B and D. Could you show an example of the difference between B and D, and explain how the latter is more preferable? Also, in which situations can we currently use B but not D?