I opened Emacs, and executed C-x C-f. A beep sounded and the following message appeared in the status line:

Wrong type argument: commandp, counsel-find-file

All I wanted was to open an existing file. What's wrong with my Emacs, and how can I fix it?

GNU Emacs 25.1.1
macOS Sierra Version 10.12.6

  • It sounds like you might be new to Emacs. If so, you might want to get a little more familiar with plain Emacs, before adding 3rd-party packages, changing key bindings, etc. (Please ignore, if I misunderstand.)
    – Drew
    Commented Oct 13, 2017 at 18:45

1 Answer 1


You have bound C-x C-f to the command counsel-find-file, which is part of the Counsel Package. Apparently, the counsel package is not getting loaded by your config files, so when you try to call it, Emacs doesn't know what you mean.

First, I'd try installing counsel via package-list-packages. If that doesn't fix the problem, or if counsel is already installed, something in your config is broken. If that's the case, start here: How do I troubleshoot Emacs problems?

  • I think if counsel was not loaded, the error would be command-execute: Symbol's function definition is void: counsel-find-file, no?
    – npostavs
    Commented Oct 13, 2017 at 20:33
  • I tried this from emacs -Q, and got the reported error
    – Tyler
    Commented Oct 13, 2017 at 20:35
  • Oh, it seems to have changed across Emacs versions. In 24.5 I get function definition is void, in 26 I get Wrong type argument: commandp.
    – npostavs
    Commented Oct 13, 2017 at 20:45
  • Thank you. Installing counsel via package-list-packages did the trick.
    – Evan Aad
    Commented Oct 14, 2017 at 6: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.