From bf669027f733d80eaf131b5bca4d7cb0a3768e7d Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 21 Apr 2015 21:11:48 +0200 Subject: [PATCH] Put the intro in a separate file --- emacs/.emacs.d/Makefile | 2 +- emacs/.emacs.d/init.org | 44 +----------------------------------- emacs/.emacs.d/org/intro.org | 44 ++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 44 deletions(-) create mode 100644 emacs/.emacs.d/org/intro.org diff --git a/emacs/.emacs.d/Makefile b/emacs/.emacs.d/Makefile index 058412a..bd60d48 100644 --- a/emacs/.emacs.d/Makefile +++ b/emacs/.emacs.d/Makefile @@ -6,7 +6,7 @@ all: init2.elc init.elc site-lisp/ @emacs -Q -batch -eval "(byte-compile-file \"$<\")" init.el: init2.el -init2.el: init.org +init2.el: init.org org/intro.org @echo "OBT $<" @emacs -Q -batch -l "ob-tangle" -eval "(org-babel-tangle-file \"init.org\")" diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 986d0c8..f0314ca 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -7,49 +7,7 @@ * About this file - Inspired by such other projects as the literal Emacs init from [[http://sachac.github.io/.emacs.d/Sacha.html][Sacha - Chua]] and also from [[http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.html][Grant Rettke]], here is my Emacs initialization - file. - - *Note:* This is not my entire Emacs initialization file. It's a - work-in-progress. To keep on top of any changes to this file, or any - other part of my Emacs init, I recommend you follow [[http://code.ryuslash.org/dot/tom/emacs/][This project]] - ([[http://code.ryuslash.org/dot/tom/emacs/atom/?h=master][Atom feed]]), which is where I keep my configuration. - -** Preparation - - I could use org-babel to load this file, but I don't like my - initialization file being dependent on too many things, especially - big things, and org is a big thing. It may be strange for you to - read this, as I have placed my entire Emacs configuration in an - org-mode file, but here are the make targets I use to tangle and - subsequently byte-compile my init file: - - #+BEGIN_SRC makefile :tangle no - %.elc: %.el - emacs -Q -batch -eval "(byte-compile-file \"$<\")" - - init.el: init.org - emacs -Q -batch -l "ob-tangle" -eval "(org-babel-tangle-file \"init.org\") - #+END_SRC - - Executing the second target (either through make, or manually) will - get you my Emacs initialization file in plain Emacs Lisp. - - *Note:* If you look at this file in it's org-mode form you will - notice that I actually tangle ~init.org~ into ~init2.el~. This is a - temporary measure so that I can gradually move my configuration - from my existing ~init.el~ file into ~init.org~ without much trouble. - Once I've emptied out my ~init.el~ I will instruct babel to tangle - into ~init.el~, this code already reflects that. - -** The ~oni:~ prefix - - To keep my functions and variables from ever accidentally - interfering with other packages or Emacs internal variables I - prefix all the functions I write and variables I declare with ~oni:~. - You don't have to copy it if you copy anything from this file, as - long as you do it consistently. +#+INCLUDE: "org/intro.org" :minlevel 2 * Use lexical binding diff --git a/emacs/.emacs.d/org/intro.org b/emacs/.emacs.d/org/intro.org new file mode 100644 index 0000000..fc6fd7f --- /dev/null +++ b/emacs/.emacs.d/org/intro.org @@ -0,0 +1,44 @@ +#+STARTUP: showall + +Inspired by such other projects as the literal Emacs init from [[http://sachac.github.io/.emacs.d/Sacha.html][Sacha +Chua]] and also from [[http://www.wisdomandwonder.com/wordpress/wp-content/uploads/2014/03/C3F.html][Grant Rettke]], here is my Emacs initialization file. + +*Note:* This is not my entire Emacs initialization file. It's a +work-in-progress. To keep on top of any changes to this file, or any +other part of my Emacs init, I recommend you follow [[http://code.ryuslash.org/dot/tom/emacs/][This project]] ([[http://code.ryuslash.org/dot/tom/emacs/atom/?h=master][Atom +feed]]), which is where I keep my configuration. + +* Preparation + + I could use org-babel to load this file, but I don't like my + initialization file being dependent on too many things, especially + big things, and org is a big thing. It may be strange for you to + read this, as I have placed my entire Emacs configuration in an + org-mode file, but here are the make targets I use to tangle and + subsequently byte-compile my init file: + + #+BEGIN_SRC makefile + %.elc: %.el + emacs -Q -batch -eval "(byte-compile-file \"$<\")" + + init.el: init.org + emacs -Q -batch -l "ob-tangle" -eval "(org-babel-tangle-file \"init.org\") + #+END_SRC + + Executing the second target (either through make, or manually) will + get you my Emacs initialization file in plain Emacs Lisp. + + *Note:* If you look at this file in it's org-mode form you will + notice that I actually tangle ~init.org~ into ~init2.el~. This is a + temporary measure so that I can gradually move my configuration + from my existing ~init.el~ file into ~init.org~ without much trouble. + Once I've emptied out my ~init.el~ I will instruct babel to tangle + into ~init.el~, this code already reflects that. + +* The ~oni:~ prefix + + To keep my functions and variables from ever accidentally + interfering with other packages or Emacs internal variables I + prefix all the functions I write and variables I declare with ~oni:~. + You don't have to copy it if you copy anything from this file, as + long as you do it consistently.