Add a function to run `occur' for the symbol at point.
This function runs `occur' for the symbol at point.
@jturner314 If you use `iedit', you get his pretty much for free and you can edit in the iedit narrowed buffer.
Thanks for mentioning `iedit'. I didn't know about it. It is an awesome tool, and I just added it to my .emacs config.
Unfortunately, `iedit' does not provide one of `occur's most important benefits: the ability to view the source and matches in two different windows simultaneously. Often, I need more than just a couple of lines of context where I am making my edit, but just a couple lines of context suffice for the other matches. Also, `occur's separate window works better with using the mouse to navigate, which I often find to be more efficient than keyboard navigation when just viewing code.
As a result, I find `occur' to be useful in some situations where `iedit' would be less useful, and I think that adding a function to easily run `occur' on the symbol at point would be useful.
Again, thanks for pointing out `iedit'! It is another great tool to have in my toolbox.