helm-ag-edit not working with rg, but working with ag
lewer opened this issue · comments
- Emacs version GNU Emacs 28.2
- Operating system Ubuntu 22.10
- Search command(ag, pt, ack etc) and version ag version 2.2.0/ripgrep 13.0.0
- Last value of
helm-ag--last-command
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))
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.