When I use helm-mark-ring or helm-imenu, I would like to jump to the current candidate automatically in the other buffer while keeping the helm session (i.e., similar to helm-swoop). I tried the following codes mentioned on this thread, but didn't work for me.

(add-hook 'helm-before-initialize-hook #'(lambda () (helm-attrset 'follow 1 helm-source-mark-ring)))

Result: It shows [Display not ready] in echo area when I change the helm candidate (by C-n).

Any help appreciated!

1 Answer 1


Put this in your .emacs (setq helm-follow-mode-persistent t) and whenever you enter helm-imenu or helm-mark-ring, press C-<up> or C-<down> to follow to that line in helm.

  • Thanks for the reply. I added the setq, but the helm session closed when I do C-<up or C-<down>.
    – AhLeung
    Aug 15, 2016 at 17:44
  • That is strange, it works perfectly fine for me. Can you elaborate on what exactly happens when you press C-<up> or C-<down> ? Have you bound C-<up> or C-<down> to some other command ? And if you still have the add-hook command you mentioned in the post, i.e. `(add-hook 'helm-before-initialize-hook #'(lambda () (helm-attrset 'follow 1 helm-source-mark-ring)))' , please uncomment or remove this line and reload .emacs. Aug 15, 2016 at 17:51
  • More details: For helm-mark-ring, it jumps to the location correctly, but the session closed when I pressed C-<up> or C-<down>. For helm-imenu, I got the following error when I pressed C-<up> or C-<down>: (wrong-type-argument stringp #<marker at 150961 in work.txt). I removed the hook command, and I didn't redefine the key. I will try emacs -Q later.
    – AhLeung
    Aug 15, 2016 at 17:51
  • Maybe you have something in your .emacs that is messing things up. Can you think of anything in your .emacs that is messing things up ? If not, edit the post adding the lines in your .emacs used for helm config Aug 15, 2016 at 17:56
  • You are right! The following code messed up the persistent action: (advice-add 'helm-execute-persistent-action :around #'dwim-helm-find-files-navigate-forward). After removing that, your answer works for me now. Thank you very much!
    – AhLeung
    Aug 15, 2016 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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