emacsorphanage / helm-ag

The silver searcher with helm interface
492 stars 76 forks source link

helm-ag-edit not working with rg, but working with ag #403

Closed lewer closed 1 year ago

lewer commented 1 year ago

Actual behavior

When I run helm-ag and C-c C-e to enter helm-ag-edit, I get "Text is read-only" everywhere, file is not modifiable. I can mark lines for deletion (C-c C-d), but then if I commit, the initial file is not updated.

If instead of rg I use ag, everything works fine.

Here's how I use rg:

(setq helm-ag-base-command "rg --no-heading")
(setq helm-ag-success-exit-status '(0 2))
lewer commented 1 year ago

It turns out that it works when adding --line-number option to rg.

I don't know if it is the cause, but rg does not print line numbers, nor colors, when it is piped to another program.