Closed wi11dey closed 4 years ago
hi, could you join my discord for some discussion? (xah lee discord, just search for it) am getting recursive load error. but i eval'd it and it seems works fine except some glitches.
another problem now is, after exiting isearch, it becomes insert mode, yet the cursor isn't changed to i beam. (sorry am just writing out my stream of conscious now. partly for my own log of things to fix.)
the recursive load error is due to
(xah-fly-keys-set-layout "dvorak")
in
;; (add-to-list 'load-path "~/git/xah-fly-keys/") ;; (require 'xah-fly-keys) ;; (xah-fly-keys-set-layout "dvorak") ;; (xah-fly-keys 1)
am working thru the code. Big thank you for the work. I also need to change my page about customization and how the mode works. Will add credit to my main page when done. Thanks.
Thanks for merging and fixing the glitches! I've joined your discord too
Hi Xah,
Following up on #88, I have finished merging the DanLanglois code and rewritten a large portion of it to a backwards-compatible implementation and which I believe is cleaner.
As you requested, the changes do not break anything for the user. Specifically, all the instructions on your website will continue to work.
The major changes are:
xah-fly-key-map
is split intoxah-fly-command-map
andxah-fly-insert-map
, so keys only need to be set once after load in the proper map, rather than every mode change in the hooks.xah-fly-key-map
continues to exist and points to the correct command/insert map depending on the current mode, so code which usesxah-fly-key-map
and hooks will continue to work.xah-fly-keys
is refactored into a global minor mode so it does not automatically enable itself on load (the issue in #39). Emacs behavior only changes after(xah-fly-keys 1)
, which is more in-line with the conventions of other packages.set-transient-map
is used to implement command-mode, so switching between command/insert modes and interacting with other modes which use transient maps is more reliable. This means that command-mode bindings will take precedence even over text-properties so Xah Fly Keys won't clash with things like Magit. Magit keybindings will only take precedence in insert-mode.xah-fly-command-map
, then the text-properties and all other maps will be looked up, which keeps things like Dired working nicely.xah-fly--define-keys
is changed to a macro which helps unroll the loop and let the byte compiler precompute the results ofkbd
.xah-fly--define-keys
also has another optional arg,:direct
, which means to set a key without trying to remap it based on keyboard layout. Now, everything can be done throughxah-fly--define-keys
and there is no need for many lines ofdefine-key
;; setting keys
heading in the code so they are with all the other keybinding code.I have also added a couple sections in the readme to show how to customize in the new way (old way continues to work). You can move these sections to your website too if you would like.
This PR resolves a number of old issues:
set-transient-map
, so all of #49 isn't fixed, but that comment is)There is a lot of merging going on in the commits so it is probably best to look at the final code in the "Files changed" tab. The main style of your code is intact so it should be easy to continue developing it. I have also been using this version for the past week and it's been working well
I will be around to help other users, maintain these changes and answer any questions, just ping me at @wi11dey