Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Remove The Delay In Helm Persistent Actions In Emacs

There is a delay in firing a persistent action on the initial search results from helm when doing an async source in emacs when `:follow 1` turns on helm-follow-mode.

I tried setting all of these variables to remove the delay, but none of them worked:

Code

(setq helm-follow-input-idle-delay 0.001)
  (setq helm-input-idle-delay 0.001)
  (setq helm-grep-input-idle-delay 0.001)
  (setq helm-exit-idle-delay 0.001)
  (setq eldoc-idle-delay 0.001)
  (setq helm-show-info-in-mode-line-delay 0.001)
  (setq helm-top-poll-delay-post-command 0.001)
  (setq x-wait-for-event-timeout 0.001)
  (setq helm-cycle-resume-delay 0.001)

The delay turned out to be hard coded in the file

Code

~/.emacs.d/elpa/28.1/develop/helm-core-20220514.725/helm-core.el

via this line:

Code

(helm-follow-execute-persistent-action-maybe 0.5)

I changed that to:

Code

(helm-follow-execute-persistent-action-maybe 0.01)

With that in place the persistent action is triggering without any appreciable delay.

** Notes

- I also removed the `helm-core.elc` file in the same directory. At some point I'll figure out how to recompile the .el file but for now this worked.