Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to modularize an emacs configuration?
    primarykey
    data
    text
    <p>I've decided to rewrite my .emacs from the ground up, and I want to setup something that's modular, in order to avoid a dreaded 1k+ LoC init.el file...</p> <p>I think there are some basic concerns that each configuration needs to address :</p> <ul> <li>global options</li> <li>editing functions</li> <li>navigation (frames &amp; buffers)</li> <li>keybindings</li> <li>modes customizations</li> </ul> <p>While I'm still tying to think the structure through, I'm looking for some pointers on how to achieve this.<br> I've looked at some .emacs on github and such, and there seems to be deifferent approaches, and no preferred way to go with this, which is a bit confusing.<br> I would be interested in reading some ideas regarding how to structure such a setup, and especially some related elisp code.</p> <hr> <p>edit : Been caught up with things, and haven't had much time to play with this yet. Will try out the proposed methods in a few days, and see what's best, meanwhile thanks for all the recommendations !</p> <hr> <p>edit2 : I've been using a <a href="http://orgmode.org/worg/org-contrib/babel/intro.php#literate-programming" rel="noreferrer">literate init file with org-mode</a>, and this is absolutely terrific !<br> I 'm not yet set on a specific load mechanism, I've been using this code, to recursively load my elisp directory, then require or whatever the setup instructions say. </p> <pre><code> (if (fboundp 'normal-top-level-add-subdirs-to-load-path) (let* ((my-lisp-dir "~/.emacs.d/elisp/") (default-directory my-lisp-dir)) (setq load-path (cons my-lisp-dir load-path)) (normal-top-level-add-subdirs-to-load-path))) </code></pre> <p>I still need to polish this, maybe using autoload, and some byte-recompile if modified tricks ; would love to hear suggestions on that.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload