1

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)

   (main-module-message)

   (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.

Thanks

1 Answer 1

4

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.

1
  • Yup, works like a charm) Commented Dec 26, 2016 at 10:52

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.