4

After doing a helm-ag search there is an option to 'save results in buffer'. My issue is that the result buffer disappears if another buffer or file is opened.

Is there some way to prevent the buffer from disappearing? Or is there some generic way of saving a buffer to the buffer list?

Note that saving the buffer to a file is not an option for me, nor is using helm-resume (in stead of the buffer).

ned_zeppelin
  • 113
  • 6

2 Answers2

3

To anyone who might have the same issue, I found a solution: M-x rename-buffer.

After the buffer has been given a new name it becomes persistent

ned_zeppelin
  • 113
  • 6
1

For a more persistent solution, you can customize the variable

helm-boring-buffer-regexp-list

and remove the regexes you want so the Helm result buffers stays in your buffer list

Kernael
  • 111
  • 2
  • This sounds really promising, but it would be a lot more useful if there was an example of a regex given which excluded all other `*helm` buffers except `*helm ag results*`. The answers in this [question](https://emacs.stackexchange.com/questions/12500/exclude-a-string-in-emacs-regexp) suggests that is impossible. – wdkrnls Jul 26 '22 at 00:01
  • The above is not ideal because that leaves a zombie `*helm M-x*` buffer around as well as `*helm-mode-cd*` and a few other "mode files" along with a zombie `*helm-ag*` buffer of the original results. – wdkrnls Jul 26 '22 at 00:15
  • Another solution is to abandon helm for this task and use `ag.el` instead. https://agel.readthedocs.io/en/latest/index.html – wdkrnls Jul 26 '22 at 01:01