[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add -other-{window, frame} variants of project-prefix-map commands
From: |
Stefan Monnier |
Subject: |
Re: Add -other-{window, frame} variants of project-prefix-map commands |
Date: |
Wed, 08 Jul 2020 00:06:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> 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
- Add -other-{window,frame} variants of project-prefix-map commands, Sean Whitton, 2020/07/03
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Stephen Leake, 2020/07/04
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Sean Whitton, 2020/07/04
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Juri Linkov, 2020/07/05
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Stefan Monnier, 2020/07/05
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Juri Linkov, 2020/07/06
- RE: Add -other-{window, frame} variants of project-prefix-map commands, Drew Adams, 2020/07/06
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Stefan Monnier, 2020/07/06
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Juri Linkov, 2020/07/07
- Re: Add -other-{window, frame} variants of project-prefix-map commands,
Stefan Monnier <=
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Juri Linkov, 2020/07/08
- Re: Add -other-{window, frame} variants of project-prefix-map commands, Juri Linkov, 2020/07/09