3 ms·
I strongly recommend storing your config in an org file and using Babel to load the init. I find it the only way to preserve my sanity as my config grows.
by BeetleB 5y ago
I strongly recommend storing your config in an org file and using Babel to load the init. I find it the only way to preserve my sanity as my config grows.
- daptaq 5y agoWhat advantages to find yourself having by using Org compared to say outline-minor-mode?
- Jtsummers 5y agoOrg provides a lot more features than an outline mode. Org-babel lets you mix code with prose, and execute (for many languages) the code in the code blocks. It works cleanly with the agenda/diary system. You can schedule items, marking both due and start dates and times. Tag items and query based on tags, it's a very handy thing.
- daptaq 5y agoI recognize the advantage of tags, but everything else seems superfluous for a personal configuration. For beginners it just one more thing that can go wrong. I have read dozens of supposedly literate configurations on the web, and most of them are just header, begin_src, code, end_src, repeat. There are rare exceptions, but these cannot be generated automatically.
- BeetleB 5y ago> but everything else seems superfluous for a personal configuration. I've not used outline minor mode, but reading up on it, it seems it's merely for presentation vs editing. As an example, can I move a heading and its subtree to another part of the document? Doing so makes managing configs much easier. > I have read dozens of supposedly literate configurations on the web, and most of them are just header, begin_src, code, end_src, repeat. Most code I've read is crap. That doesn't mean one can't write code well. My own literate configuration is probably 80+% as you describe, but it's the remaining 10-20% where I do write some prose, with links, etc that make it worthwhile. I agree that it is yet another level of complexity for beginners. My own personal experience, though, was it would be much harder to debug plain init.el files than the org ones. In any case, I have no objection to using outline-minor-mode instead. I just think that many users are going to learn org mode sooner or later, and it's less cognitive load to just jump into org mode. I'm pretty sure most people who put their config in outline mode will eventually migrate it to org anyway :-) And I don't see any actual advantage to outline minor mode in general.
- wara23arish 5y agoIs org file/babel something limited to org mode? I havent come across these yet. ill look into it
- BeetleB 5y agoYes. The idea is you store your init as code blocks in an org file, and you can organize your config into common headings (e.g. all C++ related config goes into the C++ heading, which itself goes under the Programming heading). The other benefit is that you can write prose around the code blocks describing what you're trying to do here (you can do that with comments, but org markup is much richer). I'm not saying you should do this now. My recommendation is you learn the basics of org mode, and then look up how to do this.
- wara23arish 5y agoI can see how handy that can be. Ive been trying to do the same in my init file but with a lot of comments instead. Seems like majority of the time Ill be spending in emacs is configuring rather coding! :’)
- michaelanckaert 5y agoI actually switched back to a plain elisp config file instead of having an org file loaded by babel. After spending about a year with an org-mode powered config file I felt like the surrounding "prose" just distracted me. The very few lines of config that required some explanation were easily documented with one or two lines of comments in elisp. After using it myself and viewing plenty of org-mode powered config files, I feel it's mostly good for people who publish their config files for others to read / learn. But for my own use it felt like just too much verbosity.