cosmicexplorer / helm-rg

ripgrep is nice
GNU General Public License v3.0
101 stars 21 forks source link

Change source class as helm-grep-ag-class has changed #25

Closed braineo closed 4 years ago

braineo commented 4 years ago

Since this commit search does not work anymore

https://github.com/emacs-helm/helm/commit/4071dca7f80b590a9d089ff790fb54224fad110d

Some related discussion

https://github.com/emacs-helm/helm/issues/2320

csantosb commented 4 years ago

I confirm. Much better now. Thanks !

tychoish commented 4 years ago

This also fixed it for me. Here are some additional comments that should be updated, but it would be nice to see this merged.

olymk2 commented 4 years ago

anything stoping this being merged ?

braineo commented 4 years ago

@cosmicexplorer Any comments?

kadircancetin commented 4 years ago

With this commit helm try to coloring the matches so I just write a workaround. I don't know much elisp but this just works.

      (defun kadir/helm-rg-before (&rest r)
        (setq helm-match-orj-background (face-attribute 'helm-match :background))
        (setq helm-match-orj-foreground (face-attribute 'helm-match :foreground))
        (setq helm-match-orj-weight (face-attribute 'helm-match :weight))
        (set-face-attribute 'helm-match  nil :background "nil" :foreground "#f2241f" :weight 'bold))

      (defun kadir/helm-rg-after (&rest r)
        (set-face-attribute 'helm-match  nil :background helm-match-orj-background :foreground helm-match-orj-foreground :weight
                            helm-match-orj-weight))

      (advice-add 'helm-rg :before #'kadir/helm-rg-before)
      (advice-add 'helm-rg :after #'kadir/helm-rg-after)
minikomi commented 4 years ago

@cosmicexplorer would love to see this problem fixed!

cosmicexplorer commented 4 years ago

Hello! Thank you so much for diving in and fixing the issue for me!! This makes me incredibly happy to see!!

I'm still not quite sure why the original is failing, since helm-grep-ag-class still seems to exist, and I didn't want to respond until I had "solved" it. I'm very sorry to have been so uncommunicative.

There is a single issue with using this, which is that it applies the typical helm highlighting of results, where helm-grep-ag-class had initialized (nohighlight :initform t). I will create a very quick follow-up PR fixing this.

Thanks again!!! I cannot tell you how happy I was to see that you'd solved this!

cosmicexplorer commented 4 years ago

ee0a3c09da0c843715344919400ab0a0190cc9dc should fix the remaining highlighting issue. Please anyone let me know if this causes any further breakage.