Hi all,
I have created a new package called "helm-modeless", which allows the user to interact with the last helm-buffer without resuming a helm session:
https://github.com/sameerds/helm-modelessThe most common use-case is that if you invoke next-error "M-g n" or previous-error "M-g p" after a successful helm-grep session, then it will take you to the next candidate immediately with no further interaction. It also updates the state of the "*helm grep*" buffer so that if you resume that session, then the selected candidate will be wherever you last reached with your next/previous commands.
This is mostly a proof-of-concept to show that such an interaction is possible. It only works with grep for now, but I want to make it work for occur too. I am also looking for more ways in which an external package can interact with a helm-buffer, but I am limited by my lack of imagination. If there are use-cases beyond grep and occur, then I definitely want to hear about them.
The whole thing works by making use of after-init-hook in the source to bind next-error-function to a custom function. And that's it ... then when you exit a helm-grep session, the helm-buffer is available for next/previous-error interaction.
Issues:
1. I had to copy some internal helm functions to make them work without an active helm-session. They are not perfect yet, and happen to be good enough for a simple use with the "*helm grep*" buffer. Perhaps there is a way to refactor these inside helm source itself.
2. Just like follow-mode, setting source properties is a bit awkward. It will be easier if the after-init-hook is exposed as a defvar in the source, so that anyone can bind to it. I will submit a pull request to make that happen later.
Sameer.