Wilfred / deadgrep

fast, friendly searching with ripgrep and Emacs
726 stars 47 forks source link

Simple search don't work #127

Closed damanis closed 1 year ago

damanis commented 1 year ago

$ rg --version

ripgrep 13.0.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

deadgrep debug output:

About your environment:
Platform: gnu/linux
Emacs version: 27.1
Command: rg --color=ansi --line-number --no-heading --no-column --with-filename --smart-case -- ResizeEvent .
default-directory: "~/go/src/github.com/akiyosi/goneovim/"
exec-path: ("/home/sergey/.cargo/bin" "/home/sergey/.local/bin" "/usr/local/sbin" "/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin" "/usr/games" "/usr/local/games" "/snap/bin" "/snap/bin" "/usr/local/go/bin" "/home/sergey/go/bin" "/home/sergey/.fzf/bin" "/usr/lib/emacs/27.1/x86_64-linux-gnu")

Initial output from ripgrep:
"./editor/workspace.go:299:  editor.window.ConnectResizeEvent(func(event *gui.QResizeEvent) {
./editor/workspace.go:299:   editor.window.ConnectResizeEvent(func(event *gui.QResizeEvent) {
./editor/workspace.go:3009:  side.scrollarea.ConnectResizeEvent(func(*gui.QResizeEvent) {
./editor/workspace.go:3009:  side.scrollarea.ConnectResizeEvent(func(*gui.QResizeEvent) {
./editor/window.go:2657:     w.extwin.ConnectResizeEvent(func(event *gui.QResizeEvent) {
./editor/window.go:2657:     w.extwin.ConnectResizeEvent(func(event *gui.QResizeEvent) {
./editor/minimap.go:77:  m.widget.ConnectResizeEvent(func(event *gui.QResizeEvent) {
./editor/minimap.go:77:  m.widget.ConnectResizeEvent(func(event *gui.QResizeEvent) {
"

In bash the rg command from debug output works properly, but in emacs the search result is empty:

image

Wilfred commented 1 year ago

Can you replicate with emacs -Q? Is there anything in *Messages*?

I have no idea otherwise, I've not seen this before.

damanis commented 1 year ago

In *Messages* only deadgrep output. I will try debug, then update.

damanis commented 1 year ago

@Wilfred I found the problem - it is a ripgrep configuration file ~/.ripgreprc:

--vimgrep
--color=auto
--colors=path:fg:blue
--colors=path:style:intense

It contains some colors configuration for ripgrep output in bash. If comment out color* lines, deadgrep works. Also, instead of editing ~/.ripgreprc, I added (push "--no-config" args) to deadgrep--arguments - works, too. This seem is simplest way to fix the issue.

Wilfred commented 1 year ago

Thanks for the great bug report!