emacs-evil / evil-magit

Black magic or evil keys for magit
https://github.com/justbur/evil-magit
GNU General Public License v3.0
272 stars 16 forks source link

Void variable error magit-file-mode-map #85

Closed theophilusx closed 3 years ago

theophilusx commented 3 years ago

Most recent release of magit (magit-20201106) has removed the magit-file-mode-map. This is causing an void variable error due to the following code

;; Make relevant maps into overriding maps so that they shadow the global evil
;; maps by default
(dolist (map (list magit-mode-map
                   magit-cherry-mode-map
                   magit-mode-map
                   magit-blob-mode-map
                   magit-diff-mode-map
                   magit-log-mode-map
                   magit-log-select-mode-map
                   magit-reflog-mode-map
                   magit-status-mode-map
                   magit-file-mode-map
                   magit-log-read-revs-map
                   magit-process-mode-map
                   magit-refs-mode-map))
  (evil-make-overriding-map map (if evil-magit-use-y-for-yank
                                    'all
                                  evil-magit-state)))

commenting out the magit-file-mode-map line fixes the error. However, a quick scan of the magit commit history indicates trhere have been a couple of key binding changes, so a more in depth analysis of the changes and impact to evit-magit might be called for.

ghost commented 3 years ago

Can you please give a list on the modes that have been removed? Then I will make my custom version and make a pull request

justbur commented 3 years ago

Thanks. This is the relevant commit: https://github.com/magit/magit/commit/5a38e1bb0fffa0326a1b5073c0ce9b05386e5109

theophilusx commented 3 years ago

The only thing I know for sure is that magit-file-mode-map has been removed. From a quick scan of the magit commit logs, it does look like some new default key bindings have been added and I saw reference to something called magit-blob-mode-map, but don't kno0w if that is new or what.

Sorry I don't have more info. I'm still new to evil mode. I got the error after a package update, tracked down the cause, commented out the offending line in evil-magit and that is about all I know.