syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.66k stars 4.89k forks source link

develop: broken git-blame-micro-state #11568

Closed vbauerster closed 5 years ago

vbauerster commented 5 years ago

Description :octocat:

develop: broken git-blame-micro-state

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: Wrong type argument: commandp, magit-blame-addition

Expected behaviour: :heart: :smile: git blame state

System Info :computer:

sdwolfz commented 5 years ago

I used to get this as well but it was fixed with the latest version of magit. If you still encounter this problem please turn on debugging SPC t D and post a stacktrace here. But I assume the problem will need to be reported upstream.

vbauerster commented 5 years ago

Here it is:

Debugger entered--Lisp error: (wrong-type-argument commandp magit-blame-addition)
  call-interactively(magit-blame-addition)
  (if (and (boundp 'magit-blame-mode) magit-blame-mode) nil (call-interactively 'magit-blame-addition))
  (let (golden-ratio-mode) (if (and (boundp 'magit-blame-mode) magit-blame-mode) nil (call-interactively 'magit-blame-addition)))
  spacemacs/git-blame-micro-state()
  funcall-interactively(spacemacs/git-blame-micro-state)
  call-interactively(spacemacs/git-blame-micro-state nil nil)
  command-execute(spacemacs/git-blame-micro-state)
creasyw commented 5 years ago

I have upgraded all related packages, but the problem is still there... This commit cb4a1560878626ddcceb1a4cb831bd08e5f55316 breaks the git blame. Reverting it resolves the problem in my machine.

vbauerster commented 5 years ago

I did some manual clean up, removed folders inside my ~/.emacs.d:

Then after restarting emacs, git blame works.

creasyw commented 5 years ago

@vbauerster Thanks, It does work!

gone commented 5 years ago

Deleted those folders and still seeing the issue :(

duncanita commented 5 years ago

removed directory but error still here:

Debugger entered--Lisp error: (wrong-type-argument commandp magit-blame)
  call-interactively(magit-blame)
  (if (and (boundp 'magit-blame-mode) magit-blame-mode) nil (call-interactively 'magit-blame))
  (let (golden-ratio-mode) (if (and (boundp 'magit-blame-mode) magit-blame-mode) nil (call-interactively 'magit-blame)))
  spacemacs/git-blame-micro-state()
  funcall-interactively(spacemacs/git-blame-micro-state)
  call-interactively(spacemacs/git-blame-micro-state nil nil)
  command-execute(spacemacs/git-blame-micro-state)
felipernb commented 5 years ago

I have the same issue running master. Cleaning cache and reinstalling packages didn't help.

fkromer commented 5 years ago

@vbauerster Your manual cleanup worked for me.

However it's a workaround, not a fix for the underlying problem. The problem pops up quite frequently and is really annoying. Is the root cause fixed in the develop branch with #11602 already?

coventry commented 5 years ago

In my case, this error was caused by a stale magit version. M-x configuration-layer/update-packages and restarting emacs fixed it for me.

Alternatively, you can still use M-x magit-blame