I love the new multi-occur. I'll soon integrate it into helm-cmd-t.
It would be great if it could also serve as a buffer-switcher. That is - offer a mode where matches are collapsed into buffers ike
Buffer A <12 matches>
Buffer B <3 matches>
And when a line is selected, we switch to the buffer, but don't move the point. It would be great if this mode can be toggled straight from helm-multi-occur results (and of course, if there was a way to go straight into it).
In commit eddcd47 I added the ability for helm-multi-occur to take a list of buffers. My intention is to give it a list of buffers in current repository (or all buffers for that matter), and then narrow it down with occur search to find the buffer I want to switch to.
Yes, you can also use helm-multi-occur-1 for this purpose.
I lost you when you want to give a list of buffer to *multi-occur and narrow it down with occur.
Why not narrowing this list of buffers with a simple helm source that list buffers like helm-buffers-list would do?
I'm not sure if we are on the same page yet. I want to use buffer contents to filter down to a subset of given buffers and switch to one of them. It's debatable whether this should be added to to helm-buffers-list or helm-multi-occur.
Yes. I don't need to see each match, I just want to switch to a buffer without moving the point.
So it is not helm-multi-occur you want, though it would work, but would be unnecessary slow for this, you need something that search your buffers for a pattern like multi-occur does, but that return immediately at first match, (i.e no need to scan all buffer) and search the next buffer and so on.
I have this (may be not exactly what you want but similar) in ioccur.el, see ioccur-find-buffer-matching.
* helm-buffers.el (helm-c-buffer-match-major-mode): Issue #103 Match …
…inside buffers with @.
* helm-buffers.el (helm-multi-occur-as-action): Issue #103 Use @ inpu…
…t as default input when present.
* helm-regexp.el (helm-multi-occur-1): Take one more arg INPUT.
* helm-help.el: Document new behavior of helm-buffers-list.
Try M-x helm-buffers-list
Assume you have many helm buffers files open (helm-buffers.el, helm-regexp.el etc...)
enter in pattern:
lisp ^helm @moc
the buffers containing an occurence of "moc" will be selected.
Now you can mark all these buffers, and launch helm-multi-occur with C-s, the default pattern used will be "moc".
lisp ^helm @moc
Note that if you have buffers prefixed by "@" and you want to match these buffers, you can escape the "@" e.g:
If you want to enter a space in pattern when using "@", use "\s-"
e.g if you want to search inside buffers "le wang", use "@le\s-wang"
This is great.