I am new to emacs, and org-mode pulled me away from vim. I am getting a hang of it. One thing I am missing a lot is a hierarchical search in emacs. I wrote a python script for that in vim, and I am looking for a solution in emacs (org-mode).
Let me explain. Let us say, here is the file:
* People ** Software related help *** John *** Amit ** Personal *** John *** Mike * Project ** With Mike *** Website development
When I am searching for a heading, I usually know I am searching for
mike, but once I see that there are too many search results (I use 'swiper-all), I want to narrow the search based what the child headings and parent headings contain. In this case, I might want to extend the search to
mike people or
mike project based on what kind of heading I am searching for.
In other words, if each heading is a node in the tree, I want to search not only in the node, but in the concatenation of all nodes up to the root. (See a couple other nice-to-haves below.)
Is there any solution or package avaiable for this? If not, can you point me to how to go about writing a script/package for this?
Nice to haves:
- Ideally, the file name would be considered as the level zero heading.
- Ideally, the order of words in the search term does not matter. I sometimes don't remember if I wrote
Projectheading, or wrote
Mikeheading. In either case, I want to just search for
mike projectand be able to find what I am looking for.