From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Add -other-{window, frame} variants of project-prefix-map commands Date: Wed, 08 Jul 2020 00:06:34 -0400 Message-ID: References: <87blkw5cd3.fsf@iris.silentflame.com> <86a70fonbb.fsf@stephe-leake.org> <873665v6cv.fsf@mail.linkov.net> <87pn98s0nl.fsf@linkov.net> <877dvesx19.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34689"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stephen Leake , emacs-devel To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 08 06:07:19 2020 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 1jt1Md-0008uC-6V for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jul 2020 06:07:19 +0200 Original-Received: from localhost ([::1]:56956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jt1Mc-0005Fu-88 for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jul 2020 00:07:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jt1M3-0004qq-6A for emacs-devel@gnu.org; Wed, 08 Jul 2020 00:06:43 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jt1M0-000363-GO for emacs-devel@gnu.org; Wed, 08 Jul 2020 00:06:41 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B0B6580B63; Wed, 8 Jul 2020 00:06:37 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C60E980917; Wed, 8 Jul 2020 00:06:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1594181195; bh=kglSbSODtaNXki3ceT0ASQ+tpIGDCjz8BiftQn/JFoE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=g9OXgaouFrtJ9V5YvqnDPV41OyHM6Ub052B9tq1/BwixbOY33wFd4HZyMlvSRBdYj mItaMd3KmrFKOKjjiav7Zn+Z+mAwRxw3MqyhaYZNKVyDL8ungz8OnQJJoKSPcVOrlb ZU2xGjH/x6kPbdZ5lyEK/pNZY5bBVAAk2hmr4DPvtMmLjiDko1omJIDVPU9DkZ1h2a o+v427a8rCc3DUqEKNji0Kst3UrUrS1ZRm71eRFI/p/5Q2/xQeFWgUkoYHbxcrxRk3 Cup1EcWIsQ6+CM2APHcvZZPfilYmJVJg48tWtYUkmBQKZuSk0T0rk15jTzD4pnouJv 3CDzsf2kA8zJQ== Original-Received: from ceviche (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 917BE1209E5; Wed, 8 Jul 2020 00:06:35 -0400 (EDT) In-Reply-To: <877dvesx19.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 08 Jul 2020 02:52:34 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/08 00:06:38 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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:252763 Archived-At: > It seems the biggest challenge that needs to be solved before making > any changes in core Emacs is how to keep backward-compatibility with > keybindings added by users to the existing keymap ctl-x-4-map. `other-frame-window` doesn't make any effort to handle that, indeed. It provides `ofw-transient-map` instead. I believe we could live with this kind of backward incompatibility. > Then maybe a new command bound to `C-x 4` could just introspect > ctl-x-4-map and run its commands as is. We could try and manually combine ctl-x-5-map and ctl-x-4-map into `ofw-transient-map` in `ofw--set-prefix`, but I'm not sure it's worth the hassle. Note also that the tension between parsing `C-x 4 FOO` as "lookup FOO in `ctl-x-4-map` (or in `ofw-transient-map`)" and "lookup FOO in the normal way", which is why in `ofw--set-prefix` we do: ;; FIXME: Setup a transient map to reproduce the behavior of the `C-x 4/5' ;; prefix keys, but only do it in "regular" buffers. In special buffers, ;; these extra bindings may be more annoying than anything, e.g. in Gnus's ;; summary buffer `a' open a new message buffer, so we'd want `C-x ;; 5 a' to open it in a new frame, but instead of calling ;; add-change-log-entry. (when (eq (key-binding [?a]) 'self-insert-command) ;Heuristic! (set-transient-map ofw-transient-map))) -- Stefan