Closed idoo closed 7 years ago
What happens if you call (git-gutter:statistic)
inside a file with diffs?
Added 0 lines, deleted 0 lines
But I have such changes that shows by git gutter+ http://take.ms/VZHni
Enable git-gutter-mode solve my pain π
Probably it would be nice to add this to documentation
Interesting, I guess it's because I've been using git-gutter-fringe
which is derived from git-gutter
and therefore requires git-gutter-mode
to be on π
I'm working on a refactor to make the segment work with both git-gutter
and git-gutter+
, so I'd be interested if this works for you? As a plus, git-gutter+
also tells you modified
buffers lines as well!
@domtronn I updated but it still doesn't works for me :(
also I found interesting case βΒ it doesn't works with global-git-gutter
but works well wit if I enable this mode for current buffer
I've tested this a few times with a blank install of all variants of git-gutter
, git-gutter+
, git-gutter-fringe
and git-gutter-fringe+
and it seems to work fine when their relevant modes are enabled...
It also worked when I use both global-git-gutter-mode
and global-git-gutter+-mode
...
I'm sorry it's not working for you though! Would you mind look printing out these variables inside a file with diffs?
git-gutter+-diffinfos
git-gutter:diffinfos
I don't have such commands, probably that's why, which version of git-gutter+ do you use?
my current is
;; Author: Syohei YOSHIDA <syohex@gmail.com> and contributors
;; URL: https://github.com/nonsequitur/git-gutter-plus
;; Package-Version: 20151204.923
;; Version: 0.4
I'm not expert, but looks like it local buffer vars, isn't it?
(make-variable-buffer-local 'git-gutter+-diffinfos)
(make-variable-buffer-local 'git-gutter+-diff-header)
I've got the same version of git-gutter-plus
, I'm installing it using a package called try
so that it's fresh each time I restart emacs. Yes, you're right git-gutter+
sets the variables to be buffer local, but when you enable the mode in a buffer (either through global or hooks), it should make sure those variables are defined.
Inside your buffer with diffs, what are the values of the following variables?
git-gutter-mode
git-gutter+-mode
git-gutter-mode
was disabled
git-gutter+-mode
was enabled
No surprises there! That's good at least π
I don't get why you don't have git-gutter+-diffinfos
defined though... It's there for me and should look something like this
((:type deleted :content "..." :start-line 134 :end-line 134)
(:type added :content "..." :start-line 207 :end-line 207)
(:type added :content "..." :start-line 276 :end-line 286))
Probably it's because I use spacemacs init configuration. Can you test it on it, please?
I installed spacemacs, and the diffinfos
variable was defined as expected, but I still had to installed git-gutter+
manually...
But I think I know what the problem is! π
I fixed it in a refactor this morning, I guess it's not built up to Melpa yet... But there's a predicate on the git-stats
segment (see here) which requires functions to be defined from git-gutter
!
Could you have a look to see if that line looks like this in your installation? Otherwise, hopefully the new version should be on Melpa soon :)
(and active
(fboundp 'git-gutter:statistic)
(not (equal '(0 . 0) (git-gutter:statistic))))
I have
:when (and active
(fboundp 'git-gutter:statistic)
(not (equal '(0 . 0) (git-gutter:statistic)))))
so, my fingers crossed π€
@domtronn I've added PR to get latest Melpa version in readme https://github.com/domtronn/spaceline-all-the-icons.el/pull/8
and it works now π
Debugging returns that git no errors but I can't still see that block http://take.ms/jpXFn