Am going through this Helm tutorial at the moment; I pasted in the code verbatim (for now, I'll adapt it to suit my preferences later).

I did a quick google search for this particular error but it doesn't seem common.

For context, prior to adding the elisp code from the tutorial, I was indeed able to use the helm mini-buffer (i.e., helm is indeed installed correctly; i did it through MELPA).

Am including below the full error message that I see after running emacs --debug-init - please see top two lines. (The initialization looks a bit funky in the lines further down because I have Emacs load from the init.el file in my Dropbox.)

Debugger entered--Lisp error: (void-variable helm-map)
  (define-key helm-map (kbd "C-i") (quote helm-execute-persistent-action))
  eval-buffer(#<buffer  *load*-462666> nil "/home/dchaudh/Dropbox/dchaudhUbuntu/emacs/.emacs.d/init.el" nil t)  ; Reading at buffer position 3629
  load-with-code-conversion("/home/dchaudh/Dropbox/dchaudhUbuntu/emacs/.emacs.d/init.el" "/home/dchaudh/Dropbox/dchaudhUbuntu/emacs/.emacs.d/init.el" nil nil)
  eval-buffer(#<buffer  *load*> nil "/home/dchaudh/.emacs" nil t)  ; Reading at buffer position 220
  load-with-code-conversion("/home/dchaudh/.emacs" "/home/dchaudh/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "\205\262 \306=\203\307\310Q\202; \311=\204\307\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320\nB\321\202;\316\322\323\322\211#\210\322=\203a\324\325\326\307\327Q!\"\323\322\211#\210\322=\203`\210\203\243\330!\331\232\203\243\332!\211\333P\334!\203}\211\202\210\334!\203\207\202\210\314\262\203\241\335\"\203\237\336\337#\210\340\341!\210\266\f?\205\260\314\323\342\322\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
  • Could you paste the Helm code inside ~/.emacs.d/init.el and just this file? And move your ~/.emacs elsewhere. It seems like your ~/.emacs is loading the other init.el inside your Dropbox directory. Your problem is that Helm is not yet loaded. Properly you run the Helm code prior to (package-initialized)? The same code is inside module helm-everywhere in Emacs Prelude, and it works fine.
    – Tu Do
    Oct 24, 2014 at 8:33
  • The code is split into two in Emacs Prelude; aside from helm-everywhere module, you also have prelude-helm. Would it be fine if you show your configuration?
    – Tu Do
    Oct 24, 2014 at 8:39
  • You're right, it was because I hadn't initialized the package. Happy to share my new Helm config...it's a copy paste of the helm setup from this emacs file: p.writequit.org/org/settings.html. (Yes, I have it set up such that ~/.emacs loads the init.el in my dropbox - it's intentional.)
    – iceman
    Oct 24, 2014 at 9:16

2 Answers 2


The problem is that you are trying to configure Helm before it has been loaded.

If your init file contains code which depends on packages being available, then you need to call (package-initialize) beforehand.

See Emacs 24 Package System Initialization Problems for details.

  • If (package-initialize) does not work, try (require 'helm) instead. That is what worked for me at least.
    – Brian Z
    Mar 6, 2015 at 12:23
  • 1
    Yes, you have to put (package-initialize) and then load helm. Otherwise, Helm won't be available. If you do not put (package-initialize) first before (require 'helm), then the error like the OP will occur. It seems like you are new to Helm; my guide might be helpful.
    – Tu Do
    Mar 6, 2015 at 13:20

Here solution:

(eval-after-load "shell"
  '(define-key shell-mode-map (kbd "C-c C-l") 'helm-comint-input-ring))
  • The idea might be right, but the question has nothing to do with shell-mode-map, so please edit your answer to actually fix the OP's problem. It's also good to additionally explain why it's a solution.
    – Stefan
    Sep 24, 2018 at 16:05

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.