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: Sun, 28 Mar 2021 16:59:12 +0300 Message-ID: <9baafff3-3954-8222-ea68-60ae79b50242@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> <45322b47-e868-d242-0972-8d517e2dcfd7@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="29913"; 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: Emacs developers , Gregory Heytings , Stefan Kangas , Lars Ingebrigtsen , Yuri Khan , Eli Zaretskii To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 28 16:00:01 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 1lQVxQ-0007ez-QS for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Mar 2021 16:00:00 +0200 Original-Received: from localhost ([::1]:54180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQVxP-0003LQ-R4 for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Mar 2021 09:59:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQVwl-0002ue-N2 for emacs-devel@gnu.org; Sun, 28 Mar 2021 09:59:19 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:46778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQVwj-0005zv-Nn; Sun, 28 Mar 2021 09:59:19 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id v4so10189262wrp.13; Sun, 28 Mar 2021 06:59:16 -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=W5yGdbv7NJB+5o33lg6bvWi/q36zxck7DiXYW/Mtf4Y=; b=cXblxVvU2V4yCTnnMbd3xbWtuKLUSPBCHXi/ir1Ky2N2vrfHQSx4u8yhGWm0aqbuIA t+Qe7u9fMA4TAh5TmvKecKlGyOqF5g9EMrv41bI1WZAOH5U12n1jPHygTx2WrVSvKpKo 8zNBJAy3ARBqggjxjiOXBY8qLz5DU/ph40hRIrPX/RUGe2qN2G5hECn+KGbL2PiWc0mQ 1zS1GdALJomnWHRCBFbJTzMPCVPEF+KzxYoKkwFi0llaUTajE5S9ldC02jPujaG5hJSq 0v5RVjEhnzTZJYgKpFeIHbPg1Ov36RZ3H0ksVQTtMArgWWqxJOGNLFGqhOGsLor4BIll ICEA== 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=W5yGdbv7NJB+5o33lg6bvWi/q36zxck7DiXYW/Mtf4Y=; b=C3AcuVpmPjFk+cVRxiyK34MZWqg6bBK3pqgKdfrgp5B/uKzq65XDuMQAIPfh5unBnD T0Drr+pL492p2RxiXIdleuvN5BADf+Irh/JM42QyXy4VFKSyrGZl5abUd3UQvElpOqB/ XrWVUTkthSRCtiTGzXrvcRAO1OwYkxYqEpaKQiTIQC/AdFjyzSgtALBZfoIIIB/b6crE Lhh1cnTgrdMGuOU/5lMO99hKpfCQ0B2gM6TM/30EQ93TjB2J49QUiFOfpow8NB52SdLr ixlgm9F/762M2qy2cYdx5LdK1/SnyZ8jCzm0Ci6BmHlpM6U9WM6fywrMH0fKfrGxYU/C wdWQ== X-Gm-Message-State: AOAM533YBXhuZOa2pLdF8djJpTbIxq2HBKRtnH0FBnJT9Yeg6WJq5ZAO BVbXc9qwduAD+UEzxj507fTbZP+aPvM= X-Google-Smtp-Source: ABdhPJybcEpqU6N5IOlPqmtSSO5mlyw/m9XPEvUyDy5Gb3CYRluNudSUFfuuAupJNkANU/tUdkWd8w== X-Received: by 2002:adf:bc46:: with SMTP id a6mr24015783wrh.418.1616939955402; Sun, 28 Mar 2021 06:59:15 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id r16sm18323268wrx.75.2021.03.28.06.59.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Mar 2021 06:59:14 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=raaahh@gmail.com; helo=mail-wr1-x433.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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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:267134 Archived-At: Hi Stefan, On 27.03.2021 02:02, Stefan Monnier wrote: > While we can use such tricks, I think what we really want is to > abstract the keymap API such that we can provide keymaps whose elements > are computed dynamically. > > There'd need to be at least 2 methods: `lookup-key`, and `map-keymap`, > and adding `where-is` would probably allow better behaviors (but could > introduce other problems given the way where-is currently works). > > One application is to create a keymap (on function-key-map) that remaps > all the events of the form "modifiers + mouse-4" to "same-modifiers + > scroll-up". > > Another would be a keymap that binds the same keys as some other keymap > except it requires some additional modifier or it removes a modifier, or > it capitalizes all the letters, or it transcribes all the cyrillic > letters to their "equivalent" ASCII, ... Could you give an example of how this facility will be used? Modes will be returning "generic" keymaps by using (mode-local-kbd "...") as Stefan K suggested? Will easy-mmode-define-keymap return such keymaps? Or will the keymap values actually have the same structure, but behave differently because of augmented lookup-key, map-keymap, etc?