From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Suggested experimental test Date: Fri, 26 Mar 2021 01:54:35 +0200 Message-ID: <6e619bd9-91cb-85ad-63e6-b46e12adcdbf@yandex.ru> 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> 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="921"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: Lars Ingebrigtsen , Emacs developers , Eli Zaretskii , Gregory Heytings , Stefan Kangas To: Stefan Monnier , Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 26 00:55:17 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 1lPZor-00008S-FS for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Mar 2021 00:55:17 +0100 Original-Received: from localhost ([::1]:40584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPZoq-0002c3-Gq for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Mar 2021 19:55:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPZoH-0002B1-Ud for emacs-devel@gnu.org; Thu, 25 Mar 2021 19:54:41 -0400 Original-Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:39667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPZoG-0005r8-74; Thu, 25 Mar 2021 19:54:41 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id e18so3970657wrt.6; Thu, 25 Mar 2021 16:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4OPz5uJUqUYltYPDqdptCAVXLc3YiD6WpudPJRp3ESc=; b=tnkXVWAxbWduYCopJUNXBmpdIqz+YVIsDNYa1x5L9zvGR0dkPgfD+Cp8Ts9pXIO+cE w2fGcHgoUII0BpS7A/txMDhXqUTm3NmMOJCs0FX1IdiqsXfCCGwb9ppbifVJsMBf3Nqj IHAVo8xSsjt3ZJNgrxk7XAJi6nFgkH8FSlxdMMDuoGStk7INoLMjuQEQmUxvEXQFsNfe ohsQsmqfaRau53C4PWjn8gToAw8MxG1IG6Qoa7eN2JWI6voeQT4NSXgE1HH7vo1TO057 fSz3hy7c7zeVvgRGGyfO3fo4rWStf22TlM/1BzVjdvOYuE+u1cUk5r/0RsHmOrDrBggS AMAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4OPz5uJUqUYltYPDqdptCAVXLc3YiD6WpudPJRp3ESc=; b=FU/pZlV44P8vOYwYsJNwBt+chvTXB6kJfcgO3IWAwAPZEb/oOlXP9NC6PTEJpkiRSK dOD7JK4CDmRv0B7j9WDLtzDT8MEnCBAHPVowpQdsq330RTH9unvHbM57XhE9aUNmbMzJ RjC1w6hoalPLaMIMZ5GNxHtAXrOG+AdwidvIUNq7Tv1wclA29pbs2QtKCHyWV6Rtx1cY v93HjmSJmgDbTq9/CqXpfzrcwJZ+cZbyRSMwkb5QhZkMRspS+y7/thZMBjXRzqrgrBHZ tISWatFlkQqtcp2aoeUL7wMRFGLzJseYJippAwTxO7QlqVMXq9ZURJ6IQk5E0J0RFfOn c1kA== X-Gm-Message-State: AOAM533oRzd6TfDYL5NtdKRHLAdqbC/Oe4D8MsbaoFow4M2xZRi6mbsU Jpg3k8zkOv93rlK1DytEbeXpUBTCPkA= X-Google-Smtp-Source: ABdhPJy+OQt9AUheNaNfIcn1/uBi4X/4d4dQlF0hmyh20laOTFsfeFDRw5gutbKSwUKG9ZJth0TCCQ== X-Received: by 2002:a05:6000:118c:: with SMTP id g12mr11597241wrx.353.1616716477771; Thu, 25 Mar 2021 16:54:37 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id s12sm8264073wmj.28.2021.03.25.16.54.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Mar 2021 16:54:37 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:267053 Archived-At: 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'? What happens if the user decides to bind to 'C-d', and in my third-party package I choose 'C-c C-d' as a command binding? That seems like a popular one, inspired by SLIME. *And* I have another binding in there, 'C-c C-c'. Going along with the new feature, I'll write the first one like ' C-d' and the second one ' '... right? That's a conflict. The only way of resolving such conflicts I can imagine is to also "flip" any 'C-d' written verbatim and not as back to C-c, the default binding, when is bound to 'C-d'. Which seems both tricky to implement and punishing to a lot of existing code that the user might try to use. So maybe we should limit the scope of the effort and not try to solve all the inefficiencies, or we'll never make progress on this issue (after all, the main audience of this change are people who aren't so fond of key sequences; or at least not yet). But better ideas welcome, of course.