You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Intuitively installed DrRacket tools/extensions should take precedence over the builtin defaults, and settings that the user specifies should take precedence over that. This doesn't seem to be the case with keybindings.
To replicate:
A fresh install of Racket 8.11.1, install the drracket-paredit package, and use the menu to add the following user defined keybinding file.
Restart DrRacket, and attempting to M-right and M-left your way around fails to jump across sexpressions. Instead drracket-paredits binding (which it calls forward-atom and backward-atom) is used instead.
It looks like the order in which things are getting loaded should be swapped.
The text was updated successfully, but these errors were encountered:
In general, tools have access to lower-level APIs (in this case, overriding on-char or a related method) so it isn't always possible to have user-defined keymaps take precedence over what a tool is doing. In this case, however, the drracket-paredit tool seems to be using the same mechanism that DrRacket is using when DrRacket install's user's keybindings. That said, it looks to me like the order is already the one you want.
In detail, the call that install the user's keybindings is here, which calls keymap:add-user-keybindings-file and the tools are already installed by that point (you can verify by adding a printf there and one to the call in paredit to see that). Also, the latest call to add-keybindings-item is the one that wins because of the #t on this line in the call to chain-to-keymap in the body of keymap:add-user-keybindings-file.
It may be the case that "m:left" is not the keybinding that you think it is? In my tests, I used "s:left" and could see the overriding. The "m:left" keybinding is more complex because the meta prefix is more complicated.
Intuitively installed DrRacket tools/extensions should take precedence over the builtin defaults, and settings that the user specifies should take precedence over that. This doesn't seem to be the case with keybindings.
To replicate:
A fresh install of Racket 8.11.1, install the
drracket-paredit
package, and use the menu to add the following user defined keybinding file.Restart DrRacket, and attempting to
M-right
andM-left
your way around fails to jump across sexpressions. Insteaddrracket-paredit
s binding (which it callsforward-atom
andbackward-atom
) is used instead.It looks like the order in which things are getting loaded should be swapped.
The text was updated successfully, but these errors were encountered: