- Emacs Nougat
Collaborative Emacs configuration is currently limited to the following options:
- Encapsulate features of configuration into packages and distribute them
- Hand pick snippets out of other people's config and never benefit from enhancements they make later.
- Something even worse like a [[https://www.emacswiki.org/emacs/EmacsWiki][Emacs Wiki]].
Emacs-nougat is a repository of "not-quite-packagable" snippets (nougat) and a system for composing them into a config file.
** How does it work?
It's crazy simple.
*** Create an outline
An outline, like those you'll find in [[https://github.com/dustinlacewell/emacs-nougat/tree/master/user-outlines][user-outlines/]] is an =org-mode= document which can be structured however you like. Put elisp inside of =#+begin_src emacs-lisp .. #+end_src= blocks to have them part of your emacs config.
*** Include some nougat
Browse the [[https://github.com/dustinlacewell/emacs-nougat/tree/master/nougat][nougat/]] directory and find snippets that you find useful. Then anywhere within your outline you can include it. There is one snippet you must include, so start with that:
#+begin_src text #+INCLUDE: "../nougat/required.org" #+end_src
If you want to include a specific heading from a nougat file you can do that too. For example to only include the bit that disables the menubar from =disable.org= you can do something like this:
#+begin_src text #+INCLUDE: "../nougat/emacs/disable.org::menubar" #+end_src
There are many flexible options for specifying what you want to include from the target file explained in the org-mode documentation on [[https://orgmode.org/manual/Include-files.html][including files]] and [[https://orgmode.org/manual/Search-options.html#Search-options][search options]].
*** Build your config
With an outline located at =user-outlines/my-config.org=, then from the root of the repository run the build script:
#+begin_src shell ./bin/build-elisp.sh my-outline less ./user-outlines/my-config.el #+end_src
You can copy this to =~/.emacs.d/init.el= or create a symlink to it, or simply run =(load-file path-to-el-file)= from your existing config.
*** Overriding Settings
Some snippets will contain key-bindings or other settings. You can override these by assigning to the associated variable. Key-bindings are usually prefixed =kbd-= and other settings =nougat-=
#+begin_src emacs-lisp (setq kbd-hydra-registers "C-c e r") #+end_src
** Contributing Fork us, add your outline, and contribute your nougat!