dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
471 stars 38 forks source link

Cannot get rg to ignore case #115

Closed ghost closed 3 years ago

ghost commented 3 years ago

I have set rg to ignore case and yet every search begins with case sensitive search enabled. Here is my configuration:

(use-package rg
  :config
  (require 'rg-isearch)
  (setq rg-group-result t) ;;Group matches together that are in the same file
  (setq rg-hide-command t)
  (setq rg-show-columns nil) ;; don't show columns
  (setq rg-show-header t)
  (setq rg-custom-type-aliases nil)
  (setq rg-default-alias-fallback "org")
  (setq rg-ignore-case 'force)
  (define-key isearch-mode-map "\M-sr" 'rg-isearch-menu)

  (rg-define-search prot/rg-vc-or-dir
    "RipGrep in project root or present directory."
    :query ask
    :format regexp
    :files "everything"
    :dir (or (vc-root-dir)              ; search root project dir
             default-directory)         ; or from the current dir
    :confirm prefix
    :flags ("--hidden -g !.git"))

  :bind (("C-n" . next-line)
         ("C-p" . previous-line)
         ("M-n" . rg-next-file)
     ("<f10>" . rg)
         ("M-p" . rg-prev-file)))

I am running Emacs 28 on Linux Mint

dajva commented 3 years ago

There is a bug here in the state of the result buffer I think. My testing shows that the flag is applied correctly for the search but it's not propagated correctly to the result buffer and the header indication is wrong. I'll try to fix this soon. Thanks for the report.

dajva commented 3 years ago

Should work on master now.

ghost commented 3 years ago

I have download the update and it has fixed the problem. Many thanks. Love the package.