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: Suggested experimental test Date: Fri, 26 Mar 2021 05:34:23 -0500 Message-ID: References: <831ba60af0cbfdd95686@heytings.org> <87mtuxj8ue.fsf@gnus.org> <9088e12cb3de3d30abf1@heytings.org> <8735wnjsum.fsf@gnus.org> <83sg4n9jei.fsf@gnu.org> <87y2efhx3e.fsf@gnus.org> <838s6f9g5d.fsf@gnu.org> <87y2efgg3w.fsf@gnus.org> <878s6fgdzu.fsf@gnus.org> <19c1ec9e-a97f-a8ab-b966-edadbc299c39@yandex.ru> <7226c389-ebd7-29fd-23b8-c2dbfbf0c1a0@yandex.ru> <6e619bd9-91cb-85ad-63e6-b46e12adcdbf@yandex.ru> 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="31410"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Eli Zaretskii , Gregory Heytings , Emacs developers To: Dmitry Gutov , Stefan Monnier , Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 26 11:36:24 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 1lPjpI-00083p-Im for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Mar 2021 11:36:24 +0100 Original-Received: from localhost ([::1]:54828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPjpH-0000W3-KQ for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Mar 2021 06:36:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPjnR-0008Hd-Rk for emacs-devel@gnu.org; Fri, 26 Mar 2021 06:34:29 -0400 Original-Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:47097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPjnN-0000Qm-Ma; Fri, 26 Mar 2021 06:34:29 -0400 Original-Received: by mail-pf1-x431.google.com with SMTP id x126so4555159pfc.13; Fri, 26 Mar 2021 03:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=iq+cDcs/L1ukpy2GtI0HzEthyRLtrzck6OkMui4TEBg=; b=IcqUG/2XeHKDEvyY4IMd3Cl4P7ihlRXcPBLa+enLZ3oI5yg3UqamRmvGo2ulF9Rpbn 9gFoDL7nH1pr7MLvDKYWC4WIvBU/JyklrJdTcjefURv9UglTRCz9/lAhQ+ZrEQx2ypXH Ug289d9IrMVMv7Lb1wSiQ7DsbFq4oA7jksQVEkP3NX448dmArVSu9L13FqrqXlSQsSVK us0l/2LBccDYkdxfHE2eDFZETmMPqLHXCzLMhxBEJ4gx3GEbb2oLpEmpXRNO8iTdXl7z Oo+BDK8e5rv11C000lgiK9VMmCgJB7DvZD3bydp706aPxRlwCKbDgiEzU1EE7XOwFhAn O9WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=iq+cDcs/L1ukpy2GtI0HzEthyRLtrzck6OkMui4TEBg=; b=hOt2BBoFsIqIl+sgn2ib4+UwaVKBn95HGc8H0HzMEH9LYOuFSnAmqra5dqS+vn2Xp5 KMoPV61WZPednle+11pW9qvZhDODGiszdd0QglhbqLdmQ0OumP7qlZdGlsVfsB31wb9O lJavP0K96qGpOKlNi209kJHB/OxGgmDbfszzpOsFVsxjfkTamBec/mo5ds8m1T5gwPrf CQknXBkJsnNpbmX0pDXHwbF3+lMHRxdw2YJZmONXetZ5fWCFYu/26JgwPwxHOeHW1QUW AfEyn2+zAt5x7rTKFs5JF2mv+8aQA/8kEIeNFQ6KObmMNWO2cc5Odfnx/WUFOCH5CSk9 86bA== X-Gm-Message-State: AOAM530n/UmKtDRSTQZvB7DwXBdo28hy0j0yuvURafCK6ea+eXSrcfx9 5Mhml+eJoh4SLo/HI1eoT6y8txcqe26bM3Wv3x4= X-Google-Smtp-Source: ABdhPJxPrbL9k7ibJ3F89ZXilq+PkOZN1OeWZFyMnHf1IzXNxJ9ltHScmEEcuJZGmNyEl/9tMRIdBPe9EQvCxpjPmm0= X-Received: by 2002:aa7:8f31:0:b029:1f8:987a:53dc with SMTP id y17-20020aa78f310000b02901f8987a53dcmr12060042pfr.58.1616754864123; Fri, 26 Mar 2021 03:34:24 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 26 Mar 2021 05:34:23 -0500 In-Reply-To: <6e619bd9-91cb-85ad-63e6-b46e12adcdbf@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=stefankangas@gmail.com; helo=mail-pf1-x431.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:267063 Archived-At: Dmitry Gutov writes: > On 25.03.2021 23:11, Stefan Monnier wrote: >> E.g. if it's bound to `C-c` it's fairly convenient to have bindings >> within it of the form `C-`, but if it's bound to `c` instead >> (assuming a a modal key-binding scheme like vi) then using `C-` >> within it is much less convenient. > > Interesting example. I wanted to say nobody will bind it to 'c', but > some people might decide to bind it to M-c instead. > > Here's a thought: let's invent an extension of the kbd syntax which will > allow us to specify a modifier indirectly based on an entry in > key-translation-map. Like: > > (kbd " -c") > > Even more backward-incompatible, but okay. But what to do if > has no modifiers, like in Yuri's example? > Translate '-c' to just 'c'? What happens to any > other simple 'c' entry in that keymap? Do we "flip" it to, say, 'C-c'? How about something like: (mode-kbd "k") ; C-c k (mode-kbd "mod k") ; C-c C-k (mode-kbd "mod2 k") ; C-c M-k (mode-kbd "mod3 k") ; C-c S-k Then mod, mod2 and mod3 could be set to use whatever modifier you want. And mode-kbd would use the correct prefix. (BTW, it would be even nicer if we could evaluate such a form on key lookup.)