23

It seems that the order of helm results is never useful... I either have to navigate through the long list or keep typing until I've narrowed the list enough.

Is there any way to sort the results in order of usage frequency?

Edit: That is, the most commonly selected helm results should appear at the top of the list, whether it's for files, commands, variables, etc

  • Any particular helm commands? Helm-M-x does give me recent commands at the top for example – stsquad Dec 11 '14 at 23:34
  • Hmm I think I was just using whatever stock helm completion when I hit M-x, I've just switched to using helm-M-x and it works now. I guess I need to read a bit more about helm – aiguofer Dec 12 '14 at 15:26
14

There is an adaptive sorting option for Helm which sorts the result according to their usage frequency. According to the helm source code it can be activated with the minor mode helm-adaptive-mode:

https://github.com/emacs-helm/helm/blob/master/helm-adaptive.el

  • Thanks, this seems to be what I'm looking for although it doesn't seem to be working as expected (not saving history) but I'll mark it as the answer since it does answer the question. – aiguofer Dec 12 '14 at 15:30
  • @aiguofer Open a bug on github if you found a bug. – Tom Dec 12 '14 at 15:44
1

Although helm-adaptive-mode is supposed to do this as Tom pointed out, unfortunately not many helm commands use it as per: https://groups.google.com/forum/#!topic/emacs-helm/S6FXhGfDFqA

I will leave his answer as accepted since it is the closest answer possible and raised https://github.com/emacs-helm/helm/issues/751

  • Part of the discussion pointed to in aiguofer's answer can usefully be brought in here: "I figured out how to save variables as mentioned in the previous comment. That only addresses the issue with helm-M-x." [...] "Good, you have also external packages that do this, mine is psession.el." Since this solution and the helm-adaptive-mode have different limitations, perhaps they can be used together. Long term, perhaps additional variables should be created that can be saved in the same way. – Joe Corneli May 27 '15 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.