-
Notifications
You must be signed in to change notification settings - Fork 25
Use ack-grep line number and file name color code for font lock #21
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
base: master
Are you sure you want to change the base?
Conversation
Use the ack-grep line number and file name color code directly for font lock. This is to address a problem that file name font lock wouldn't work for a file name starts with numbers and dash. For example, if a file name was "1234-5", it was recognized as a line number.
|
Thanks. The changes look good. But can you tell me why the font locking changes are necessary, and an example what |
full-ack uses this regexp: to identify line numbers in the ack-grep output. The problem is that, if file names in ack-grep output also begin with numbers followed by a dash ( ack-grep produces the output, it knows which part is the file name, and which part is the line number, and has marked them with different color codes. Therefore, I think the most reliable approach would be to simply use the ack-grep color codes in the line and file name regexp. This will work as long as one uses an ack version 1.94 or newer. Do you have other reliable solution without using the ack-grep color codes?
I use speck.el for spell check, but I noticed that if speck is doing spell checking in the background, full-ack could be slowed down significantly. I added these hooks so that I could stop spell check before starting ack search and then re-start it after ack search is done. York |
|
I understand. Sounds good. What happens if the user configures ack to use different colors? |
That would be better. I was not 100% sure if ack-grep provided users the means to customize colors. Also, I thought probably very little people would want change the default colors. Please feel free to add the feature if you want. Otherwise, I might add it when I get some time. By the way, I'm currently playing with the silver searcher. It's really much faster than ack-grep. Have you used it already? What's your opinion? I really love it's lightening speed, but I don't like the output from ag.el. I'm thinking about making full-ack.el work with ag. Thoughts? York |
|
I'm going to leave this PR open until you or I get the chance to add this. I don't want to merge in a change that might cause problems for existing users. Yes, I have switched to ag recently. I'm not doing my coding in Emacs right now, so I haven't had a reason to work support it. Any contribution would be very welcome. |
Hi Nikolaj,
I've been using full-ack for a few years now. Thank you very much for this useful tool. Please check out my two pull request, the font lock one has been a life saver for me.
Thanks,
York