I'd like to do the following when I search
- find symbol in a project
- add restrictions (options)
- to narrow to files that matches a pattern (--include)
- to narrow to files that doesn't match a pattern (--exclude)
- to change the base directory (it can be project root or any directory that a user wants)
I've used helm-grep and helm-ag
They allow those changes, but mostly I need to restart the search so that helm can prompt me for those options. For example, if I start out with project-root, and I decide to narrow the search to a directory, I need to start over the search from the start and specify the directory I want to search.
I suspect the dynamic search options that I describe can be done.
Because it seems to be similar to the ability to go from helm-swoop to helm-multiswoop
.
Difference is that I want to go back and forth and need to keep more states (such as include files, exclude files and such)
My guess is that, you can store a context (eg include files, search query, root directory for search) then issue an updated command with the stored context.
Since it seems to take me a while to figure out that it's indeed doable, I thought I would ask first if this is indeed doable.
Especially, I'm not sure how context
should be implemented in elisp. (elisp has notion of buffer-local and such, and I am not quite familiar with the concepts)
I guess my work would be easier if I can figure out how helm's session
(?) can be stored.
Of course this will be easy if helm-ag or helm-grep implementation supports this type of operation.
But even if they don't, helm itself might support it.
I wanted to ask this is doable by helm itself.