I have create a quite large emacs package now its split over many files.

currently i am running an org block with multiple load calls to load them, this is not idea for redistribution.

How should I setup my project so loading the core file loads all other files ?



Currently i have a structure like the above, i have placed require calls in main.el but these do not find or load my files, seems it should invoke a load if not available this could be due to require not looking in the current folder ?

Any advice on how to setup this structure so that:

A I can load main.el should i use load or load library

B how to load the files that main.el requires.

Needed to add to load path with the below commands, then all files load via require correctly, thanks to tylor below.

  (add-to-list 'load-path "~/.emacs/dc/")
  (load "dc-popups")

1 Answer 1


The usual way to bundle elisp code for redistribution to Emacs users is via package.el, which is described in the elisp manual. This information is available from within emacs as well, C-h i m elisp <RET> m packaging <RET>.

Start there, and if you have specific questions about that process open a new question here.

For the particular issue you note, where require fails to load the additional files, you should check that ~/.emacs/folder/ is in the load-path. Otherwise, we need more info (i.e., actual code) to debug your problem.

  • I had read at least some of that guide, I missed the part about adding in a folder to my path, this i guess will not be needed when installed from melpa, but for testing it is, added to question for others reference.
    – Oly
    Commented Oct 11, 2017 at 21:25

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.