emacs-evil / evil-magit

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

Switching to text-mode and back messes up some keybindings #84

Closed magthe closed 4 years ago

magthe commented 4 years ago

I see this behaviour in magit. If I

  1. open status
  2. press \ to switch to text-mode
  3. press \ to switch out of text-mode
  4. press p to push

then I see the message Buffer is read-only: #<buffer magit: proj>.

I'm using Spacemacs, but I believe this is a binding that comes from evil-magit itself:

\ runs the command evil-magit-toggle-text-mode, which is an interactive compiled Lisp function in ‘evil-magit.el’.

justbur commented 4 years ago

It seems like you are not actually switching back from text mode. After step 2, try C-h k \ and tell me what emacs says \ is bound to.

magthe commented 4 years ago

It is bound to the same function, evil-magit-toggle-text-mode.

Maybe I should add that p gives the behaviour above, but that many other magit keybindings do work, and that I can push by doing

  1. switch to visual mode using v, then press p
magthe commented 4 years ago

I just asked a workmate to try the same sequence. He's using evil-magit but not via Spacemacs, and he doesn't see the behaviour I describe above. That makes me think that maybe this is a Spacemacs thing, so I'll create a ticket on the project instead and close this one.

justbur commented 4 years ago

Maybe I should add that p gives the behaviour above, but that many other magit keybindings do work, and that I can push by doing switch to visual mode using v, then press p

Hm, that's odd.

I just asked a workmate to try the same sequence. He's using evil-magit but not via Spacemacs, and he doesn't see the behaviour I describe above. That makes me think that maybe this is a Spacemacs thing, so I'll create a ticket on the project instead and close this one.

It's possible spacemacs is interfering here, but I'm not sure how.