-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in rg-filter impacting font locking #99
Comments
Thanks for the report. I have not seen that myself. (defun rg-print-settings ()
"Print all the active customization options for this package."
(interactive)
(let ((settings
(thread-last (custom-group-members 'rg nil)
(seq-filter (lambda (item)
(eq (cadr item) 'custom-variable)))
(mapcar (lambda (member)
(cons (car member) (symbol-value (car member))))))))
(message "--------- RG settings ---------\n%s\n------------- END -------------"
(mapconcat
(lambda (setting) (format "%S: %S" (car setting) (cdr setting)))
settings "\n"))))
(rg-print-settings) |
Can you also post a screen shot of the faulty rendering? |
For example searching for "defun" in "fastai" |
Hmm, this seems like a tricky one. It's a bit hard to see in the screenshot but looks like the font changes on the line of the error and all the results after. |
Thanks, this looks like an ansi-color issue. Anyway. My guess would be (judging from the screen shots) that the output is first handled by |
I'm running into the same problem
Emacs 27.1 (doom) |
For doom the problems lies here: https://github.com/hlissner/doom-emacs/blob/29b12de83e5f8ce76e9ff38549753c69bc507650/core/core-ui.el#L373 The config workaround for this would be something along these lines: (defun rg-clear-doom-ansi-color-compilation-hook ()
(make-local-variable 'compilation-filter-hook)
(remove-hook 'compilation-filter-hook #'doom-apply-ansi-color-to-compilation-buffer-h))
(add-hook 'rg-mode-hook 'rg-clear-doom-ansi-color-compilation-hook) I will make improvements to this package to make it less sensitive to such things but it's not possible to solve for real here. @charignon Are your setup also doom based? |
Thanks for the tip! I'll see if I can get your workaround to work in my setup. |
Yes, the workaround works for me, and it is not an issue with rg.el then. Thank you so much for your responsiveness and help on this @dajva 👍 🥇 |
It works for me too. Thanks again! |
I realised this could actually be fixed from this package so should work without the hook now. |
When performing searches that lead to a lot of results (thousands or more), I notice that on a few lines the column number remains event when I set
(setq rg-show-columns nil)
. This impacts the font-locking and visual of the result buffer.If I were to guess, this may have to do with the fact that we think we are dealing with whole line in
rg-filter
when we are not. I know we account for line ending in there but I think there is a subtle bug that shows with search that display a large volume of data. I haven't figured out more than that so far.The text was updated successfully, but these errors were encountered: