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

How to save ivy results to a buffer like with rgrep? #1583

Open
neojski opened this issue May 19, 2018 · 4 comments
Open

How to save ivy results to a buffer like with rgrep? #1583

neojski opened this issue May 19, 2018 · 4 comments

Comments

@neojski
Copy link
Contributor

neojski commented May 19, 2018

Since resuming the search with counsel-ag doesn't quite work (#1095) and it's not even obvious how to do it I was wondering whether it's possible to just save the search results to a file and navigate through them using SPC e n and SPC e p.

There's C-c C-s. However, it asks for a file (if I give it a file it asks again, actually) and then after I save it to, say, /tmp and try to use it with grep mode it doesn't quite work because it's in the wrong directory.

I think it would just be very useful to add something to counsel-ag's hydra menu to bring up something similar to grep buffer in the appropriate grep-mode. Or maybe even a dedicated keybinding for that.

@manuel-uberti
Copy link
Contributor

manuel-uberti commented May 21, 2018

If I understand what you want to do, you can switch from ivy to ivy-occur with C-c C-o and save that buffer.

@neojski
Copy link
Contributor Author

neojski commented May 23, 2018

Oh, yes, it's that.

There is some problems with it, though:

  • in the make plain emacs if I do C-c C-o on the big search it just freezes until it finishes search
  • in spacemacs it doesn't freeze but it only shows this:
-*- mode:grep; default-directory: "/home/neo/" -*-


2 candidates:
./
./3 chars more

@manuel-uberti
Copy link
Contributor

manuel-uberti commented May 23, 2018

I don't use Spacemacs, but it always works fine for me, although I rarely have more than 50/60 search results.

Let's wait @abo-abo on this.

@abo-abo
Copy link
Owner

abo-abo commented Jun 6, 2018

in the make plain emacs if I do C-c C-o on the big search it just freezes until it finishes search

This is the intended behavior. For things like grep or counsel-locate it's almost never useful to have the partial results on occur. I always want all results, even if I have to wait a second or two.

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

No branches or pull requests

3 participants