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

Ignore emacs editor temp file. #543

Closed
zw963 opened this issue Aug 6, 2021 · 3 comments · Fixed by #546
Closed

Ignore emacs editor temp file. #543

zw963 opened this issue Aug 6, 2021 · 3 comments · Fixed by #546
Milestone

Comments

@zw963
Copy link
Contributor

zw963 commented Aug 6, 2021

Emacs will generate some temp files before save, e.g. .#app.rb, #app.rb#.

So, i thought we should add those rarely used filename to ignore list. like this:

listener.ignore /\A\.?#/
@ColinDKelley
Copy link
Collaborator

ColinDKelley commented Aug 19, 2021

@zw963 That regexp looks a bit more general than the 2 examples you show, because it would also match #app.rb.

Does this pattern look accurate to match exactly those 2 cases? /\A.#|\A#.*#\z/?

Could you please make a PR with this change, along with specs?

@zw963
Copy link
Contributor Author

zw963 commented Aug 19, 2021

That regexp looks a bit more general than the 2 examples you show

Yes, /\A\.?#/ is a little general (though, this is my original purpose)

I just want ignore any file which prefix with .# or #, if you favor more accurate, i can exact file name like (?:^\.#|^#.+#$), will create PR later.

@zw963
Copy link
Contributor Author

zw963 commented Aug 19, 2021

@ColinDKelley PR, #546 , thank you.

@ColinDKelley ColinDKelley added this to the v3.7.1 milestone Jan 13, 2022
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.

2 participants