GNU bug report logs -
#41438
[PATCH] Allow windmove keys to be bound without prefix or modifiers
Previous Next
Reported by: "Philip K." <philip <at> warpmail.net>
Date: Thu, 21 May 2020 16:57:01 UTC
Severity: normal
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #94 received at 41438 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> Arthur Miller <arthur.miller <at> live.com> writes:
>
>> Philip Kaludercic <philipk <at> posteo.net> writes:
>>> +(defvar windmove-default-map (make-sparse-keymap)
>>> + "Map used by `windmove-install-defaults'.")
>>
>> Sorry if I ask, but wouldn't ordinary windmove-mode-map do here?
>
> You are probably right -- my thought was that the minor mode exists for
> the sake of the map.
Yeah, exactly in this case. I am not sure if I understand correctly, you
mean people will set new map for the mode to change bindings?
I just remarked on the name you choose for the mode map, most peeps like
me probably expect it to be names after the convention 'modename-mode-map'.
>> Since it is a convention to have mode maps called modename-mode-maps,
>> if people would like to change, or add a binding in the windmove mode
>> they would probably automatically try to alter windmove-mode-map instead
>> of windmove-default-map.
>
> That's the question: should windmove-default-map be accessed by default
> or only via the -default-keybindings functions? Either way something
I think you are thinking about default keybindings reather than default
map. If I assume correctly. If I understand corectly you would like to
preserve some default bindings, the map is just a mean to accomplish it.
> should be changed, if windmove-default-map it should be renamed to
> windmove--default-map to explicitly mark it as an internal
> map. Otherwise it shsould be renamed to windmove-mode-map as you suggest.
Either use default map stored some "default var", and add a function
that restores mode map, or just add a function that resets keybindings
into mode map directly, which might be sufficient. I don't know matter
of taste? A default mode map in a variable is cleaner but more costly?
Emacs provides windows, so I think there should also be a default way of
moving cursor between them, manipulate them and so on. Thus I think
windmove operations should be on by default, I don't think C-x 1/2/3/o
are satisfying when we have more then 2 widows.
A minor mode is probably a good balance between altering Emacs defaults,
so not break someones config, and to give people an option to easily
turn on some useful feature/configuration.
This bug report was last modified 4 years and 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.