Closed lczch closed 3 years ago
Both Emacs and ripgrep can handle slash. Check my updated doc.
c109519 windows setup (Chen Bin)
It doesn't work. The errors occurs again.
Can you give me a minimum example and exact steps to reproduce the bug? I also need the ripgrep details.
I configure emacs using only use-package
and counsel-etags
as below:
(use-package counsel-etags
;; :commands (counsel-etags-find-tag-at-point
;; counsel-etags-virtual-update-tags)
:config
(add-hook 'prog-mode-hook
(lambda ()
(add-hook 'after-save-hook
'counsel-etags-virtual-update-tags 'append 'local)))
(setq counsel-etags-update-interval 60)
(push "build" counsel-etags-ignore-directories)
;; counsel-etags-ignore-directories does NOT support wildcast
(push "build_clang" counsel-etags-ignore-directories)
(push "build_clang" counsel-etags-ignore-directories)
(push ".git" counsel-etags-ignore-directories)
;; counsel-etags-ignore-filenames supports wildcast
(push "TAGS" counsel-etags-ignore-filenames)
(push "*.json" counsel-etags-ignore-filenames)
(push "#.*" counsel-etags-ignore-filenames)
;; Don't ask before rereading the TAGS files if they have changed
(setq tags-revert-without-query t)
;; Do case-sensitive tag searches
(setq tags-case-fold-search nil) ;; t=case-insensitive, nil=case-sensitive
;; Don't warn when TAGS files are large
(setq large-file-warning-threshold nil)
;; list tags by imenu.
(setq imenu-create-index-function 'counsel-etags-imenu-default-create-index-function)
(when (eq system-type 'windows-nt)
(setq counsel-etags-ctags-program "C:\\\\msys64\\\\home\\\\lzh\\\\bin\\\\ctags")
(setq counsel-etags-grep-program "C:\\\\Users\\\\lzh\\\\.cargo\\\\bin\\\\rg"))
;; don't ignore files in ".gitignore": need to search for installed packages.
;; use `counsel-etags-ignore-directories' and `counsel-etags-ignore-filenames' to prevent generating tags.
(setq counsel-etags-ignore-config-files nil)
;; It is wonderful that counsel-etags also prevent ripgrep to match files in `counsel-etags-ignore-directories' or `counsel-etags-ignore-filenames'
(setq counsel-etags-grep-extra-arguments "--no-ignore"))
Then in buffer *scratch*
, I enter "xxxx", then using command counsel-etags-find-tag-at-point
, the error occurs: (there is a picture)
emacs version: 27.1 system: win10 + msys2 counsel-etags: commit "windows setup"
85c82ff fixed ripgrep windows path separator problem (Chen Bin)
It works! Thank you!
On windows, When calling "counsel-etags-find-tag-at-point", rg report separator is error. The separator should be "\\" instead of "\".
I fix it by change "counsel-etags-grep-cli" a little(only about constructing the separator):
I use msys2 + win10 + emacs26.1