Following the advice of Mastering Emacs I'm trying to use the project.el package. My problem is that C-x p isn't bound to the prefix keymap and I can't figure out how to bind it correctly.

I'm pretty sure I'm trying to get this part of the package to load: https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/project.el#L618

I've tried this:

(use-package project
  :bind-keymap ("C-x p" . project-prefix-map))

but I get a Wrong type argument: sequencep

I've tried bind-key but I don't know what to put in for the COMMAND argument so I tried this:

(bind-key "C-x p" project-prefix-map)

which is also wrong.

I'm running Emacs on MacOS. The Emacs version is GNU Emacs 27.1 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H15)) installed using macports.

  • 1
    All you have to do is uncomment line 639, the line that reads ;;;###autoload (define-key ctl-x-map "p" project-prefix-map): just get rid of the three semicolons and then reload project.el.
    – NickD
    Feb 25, 2021 at 21:04
  • 1
    I'm not sure editing a core library is the way to go but I can copy the code and make the map work that way.
    – afrosteve
    Feb 25, 2021 at 22:49
  • 2
    You can just add the (define-key ctl-x-map "p" project-prefix-map) to your init file anywhere after you (require 'project) instead of changing the file.
    – NickD
    Feb 26, 2021 at 2:07
  • Cool, I will try that. Thank you!
    – afrosteve
    Feb 26, 2021 at 15:32
  • To close the loop adding the key-map directly in the init file fixed the problem. I also found that upgrading the project.el package fixes it.
    – afrosteve
    Mar 3, 2021 at 16:07

1 Answer 1


I found that upgrading the project.el package to 0.5.3 fixes the binding problem.

To do this I first had to fix the GNU TLS algorithm priority as described in this Emacs Stack Exchange answer. Once this was added I could successfully load the GNU ELPA package list and upgrade to the latest project.el package.

With the 0.5.3 version I can use (require 'project) or use-package to load project and get the key map bound correctly.

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.