counsel-rg: --no-ignore yields no results (different than rg command)
With the setting (setq counsel-rg-base-command "rg --smart-case --no-heading --line-number --no-ignore --color auto %s ."), M-x counsel-rg with the search pattern "setq" (without quotes) shows no results, while the corresponding rg command rg --smart-case --no-heading --line-number --no-ignore --color auto setq . in the directory ~/.dotfiles/arch/.emacs.d shows expected results.
That counsel-rg-base-command setting without the --no-ignore setting will also show expected results, so the --no-ignore option for counsel-rg is apparently the culprit. It's weird because --no-ignore should either return the same number of results or more results--I don't see a case where it returns less (and in this case, 0 results).
~/.dotfiles/arch/.emacs.d/ is a symlink to ~/.emacs.d/ but I've tried both the symlink and the absolute path and they both yield consistent results described above. ~/.dotfiles is a git repo, but even if I remove the .gitignore file, the base command with --no-ignore yields no results.
For posterity, this was initially reported in #1498. Note also that the current title duplicates that of #1659, which I assume is due to simple oversight.
Oops, wrong title, but the issue is not related (this one is involves --no-ignore, the other involves --glob. I changed the title accordingly, thanks. Can you remove the references to the issues to clarify?
the issue is not related
Okay, but I was going crazy with déjà vu of having read the same text before. :)
M-x counsel-rg with the search pattern "setq" (without quotes) shows no results
I have trouble reproducing this in the swiper repository. Using:
ripgrep 0.8.1 (rev c8e9f25b85)
You tried with the setting (setq counsel-rg-base-command "rg --smart-case --no-heading --line-number --no-ignore --color auto %s ."), right? It doesn't show results for me. If I change the path from . to ~/.emacs.d/ and also to ~/.dotfiles/arch/.emacs.d/ (where it's symlinked to), both works. So I guess the path . could be the problem them?
To be sure, . is the current directory and is the directory of whatever file buffer you're focused on, right? In my case it's ~/.dotfiles/arch/.emacs.d/init.el.
You tried with the setting (setq counsel-rg-base-command
Yes, exactly. Would be useful ff you could give me a reproducible recipe with a public Git repo (like swiper).
So I guess the path . could be the problem them?
I think you should not include . in counsel-rg-base-command: you will search in automatically in the project root.