Since a recent packages update (and still with the latest helm version 20220114), (almost) each time I try to use helm-for-files, I get the following error:

Error running timer: (void-function helm-completion--flex-transform-pattern)

I must admit I have a lot of packages installed but I'd like to know what's the culprit.

BTW, I enabled toggle-debug-on-error but can't provide the backtrace since it appears while I'm typing something in the mini-buffer and disappears if I try to select and copy the content of its buffer.

  • 1
    M-x list-timers will give you a list of timers running in your Emacs. Knowing what each of them runs might get you closer to the culprit. If you can't guess which timer might cause the problem, maybe you can start Emacs without helm and see what timers it is running: comparing with the other list might narrow things down to one timer (or a few). Unfortunately debugging is hard and remote debugging is almost impossible, so these are only suggestions for small steps that might help: good luck!
    – NickD
    Jan 14 at 20:50
  • Nothing new appears when running helm-for-files after M-x list-timers. Jan 14 at 21:17
  • 1
    What does (featurep 'helm-mode) return? If it says nil, add (require 'helm-mode) to your init file. If it says t, then see if the "missing" function is now defined. It's possible that helm-mode is not loaded to begin with and the timer calls it, getting the error. When eventually helm-mode is loaded, the function is now defined and the error goes away.
    – NickD
    Jan 14 at 21:45
  • @NickD (featurep 'helm-mode) returns nil and adding (require 'helm-mode) to my init file seems to do the trick! :) Would you make your comment into an answer in order I can accept it? Jan 15 at 13:28
  • Sure - glad it helped!
    – NickD
    Jan 15 at 15:39

As I suggested in a comment, it seems that a timer gets started that calls helm-completion--flex-transform-pattern but the function is not defined yet. The function is defined in helm-mode.el[c] and that file provides the feature helm-mode: when the OP tested for the feature with (featurep 'helm-mode), the return value was nil indicating that the file was not loaded yet, so the function was undefined. So the solution is to make sure that the file is loaded at initialization, before the timer gets started.

To do that, one has to add

(require 'helm-mode)

in the Emacs initialization file, ideally before the timer gets set up, but the details of which timer it is and how it gets set up have not been clarified, so the safest thing to do is to add the require fairly early in the initialization file.


This happened to me as well. I found that, after the helm package update, helm.el was missing. Downloading helm from github and simply placing helm.el in my emacs.d/elpa/helm directory solved the issue for me. Well, solved it as far as I can notice.

New contributor
dsh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • I haven't any .emacs.d/elpa/helm directory. But I have, in the directory .emacs.d/elpa/helm-core-20220104.1344, a helm.el file which is identical to the one in the GitHub helm's repo. Jan 14 at 17:52
  • sorry, I cut and pasted it wrong, helm.el is in my .emacs.d/elpa/helm-20220114.658/ If files are identical then I'm not sure if I can help you. Maybe open a new issue on helm github account github.com/emacs-helm/helm/issues
    – dsh
    Jan 14 at 18:02

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.