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

ability to add options dynamically? (question) #408

Open
pcompassion opened this issue Aug 27, 2023 · 1 comment
Open

ability to add options dynamically? (question) #408

pcompassion opened this issue Aug 27, 2023 · 1 comment

Comments

@pcompassion
Copy link

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)

(helm-ag supports most because I can just type --include etc at the helm prompt, with the exception of changing root directory , it must be done via a new search)

(helm-ag being the most flexible, with many other helm related search tools) 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 just wanted to ask if this functionality can be implemented either in helm-ag or helm itself.

@madorian
Copy link

Did you ever get further on this?;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants