I've noticed some people have their init files in org-mode, using org-babel-load-file.

Are there significant performance penalties or other disadvantages to doing this?

  • Enough that some people avoid using org-babel for this task, myself included. – wasamasa Jul 31 '17 at 19:02
  • 1
    Essentially you're doing literate programming. You should be able to make your config easily readable by just adding good comments to it. If you think it makes your config file better, go for it. My guess is that it will have a negative impact on startup time, but I didn't run any benchmarks to confirm that. – user12563 Jul 31 '17 at 20:00
  • Slower startup time would be by guess too, but thats not necessarily the case if there is some byte-code caching of the resulting config going on behind the scenes (in that case only slower after config edits). – ideasman42 Jul 31 '17 at 20:11

One disadvantage is that if you use org-based config only, and it re-writes init.el file on each save or restart (example), then any changes made via Easy Customization Interface are lost after restarting Emacs, since those changes are written into .el file directly.

You can avoid this by having a slightly different setup, but then your configuration might end up in two different places (org-file and el-file), which goes against the premise and convenience of having org-based configs.

  • 1
    This is easy to avoid, just customize custom-file, move the customizations to the new path and load the file before that customization (as explained in the custom-file docstring). – wasamasa Aug 24 '18 at 7:43

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.