I've been learning how to use modules using the cider-mode source code but I've run into a very basic issue.

The contents of my files are

  • main.el
 (require 'main-module)


   (provide 'main)
  • main-module.el
(defun main-module-message ()
  (message-box "this is defined in the module")

(provide 'module)

When I do (load "~/Projects/modules-test/main.el")

It can't sense themain-module.el file kept inside the same directory.

Could you please point to the relevant documentation, I can't seem to find anything useful on require and provide apart from a couple paragraphs.


1 Answer 1


What you are looking for is

(add-to-list 'load-path "~/Projects/modules-test")

See docs:

The best thing you can do is C-h v load-path RET and follow links in the *Help* buffer.


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.