I created personal my-config in .doom.d and have 'my-org-agenda` etc within it.

#+BEGIN_SRC shell :results output
tree ~/.doom.d  | head 

├── config.el
├── init.el
├── my-config
│   ├── my-org-agenda.el
│   ├── my-org-babel.el
│   ├── my-org.el
│   └── my-org-note.el
├── packages.el
├── snippets


I do the following configuration:

Add (add-to-list 'load-path "~/.doom.d/my-config/") as the first line of config.el

and require the appropriate personal configs

;;Note taking
;;GTD agenda
;;literature programming

(require 'my-org-note)
(require 'my-org-babel)
(require 'my-org-agenda)

Restart emacs but got the errors:

    /home/me/Documents/primary.doom.d/my-config/my-org-note.el failed to provide feature ‘my-org-note’

What the problem with my usage of load and require?


You should insert (provide 'my-org-note) at the end of your my-org-note.el file. (and similar for the other files).
Through this call Emacs can update the feature list with the required package symbol. This mechanism prevents re-evaluation of lisp code multiple times.

Have a read at Xah's Website or the official Emacs documentation for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.