Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using either ag or rg on dos line-encoded files shows ^M characters at the buffer #1384

Closed
r-darwish opened this issue Dec 24, 2017 · 2 comments

Comments

@r-darwish
Copy link
Contributor

When using either counsel-ag or counsel-rg to search something in a DOS line-encoded project, ^M characters appear in the buffer. When I press C-c C-o these characters also appear in the ivy-occur buffer. wgrep does not work as a result. Emacs grep command does not display the ^M characters.

@abo-abo
Copy link
Owner

abo-abo commented Dec 24, 2017

See counsel-async-split-string-re.

@whatacold
Copy link
Contributor

Customization of the variable like below works for both unix and dos line endings for me:

(setq counsel-async-split-string-re "\r?\n")

Thanks.

whatacold added a commit to whatacold/swiper that referenced this issue Oct 9, 2018
(counsel-grep-like-occur, counsel-git-grep-occur): Respect user
setting of `counsel-async-split-string-re' when doing grep-like occur,
so as to better support `wgrep'.

Fixes abo-abo#1384
@abo-abo abo-abo closed this as completed in 59b8966 Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants