From 99d13e7117c20e7306dfd22798ad3a8a6acb72b6 Mon Sep 17 00:00:00 2001 From: Lars Tveito Date: Wed, 8 Apr 2015 00:39:16 +0200 Subject: [PATCH] Added bit about tracking/untracking init.el. --- init.org | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/init.org b/init.org index 77bd717..13d4385 100644 --- a/init.org +++ b/init.org @@ -78,9 +78,24 @@ It tangles the org-file, so that this file is overwritten with the actual configuration. - We can use =C-c C-v t= to run =org-babel-tangle=, which extracts the code - blocks from the current file into a source-specific file (in this case a - =.el=-file). + There is no reason to track the =init.el= that is generated; by running + the following command =git= will not bother tracking it: + + #+BEGIN_SRC sh :tangle no + git update-index --assume-unchanged init.el + #+END_SRC + + If one wishes to make changes to the repo-version of =init.el= start + tracking again with: + + #+BEGIN_SRC sh :tangle no + git update-index --no-assume-unchanged init.el + #+END_SRC + + The =init.el= should (after the first run) mirror the source blocks in + the =init.org=. We can use =C-c C-v t= to run =org-babel-tangle=, which + extracts the code blocks from the current file into a source-specific + file (in this case a =.el=-file). To avoid doing this each time a change is made we can add a function to the =after-save-hook= ensuring to always tangle and byte-compile the