Fix paths for emacs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
(require 'org)
|
||||
(find-file (concat (getenv "HOME") "/dots/files/init.org"))
|
||||
(find-file (concat (getenv "HOME") "/dots/files/emacs/.emacs.d/init.org"))
|
||||
(org-babel-tangle)
|
||||
(load-file (concat (getenv "HOME") "/dots/files/init.el"))
|
||||
(load-file (concat (getenv "HOME") "/dots/files/emacs/.emacs.d/init.el"))
|
||||
|
||||
@@ -9,17 +9,12 @@ All changes to the configuration should be done in =init.org=, *not* in
|
||||
is replaced the first time Emacs is started (assuming it has been renamed
|
||||
to =~/.emacs.d=).
|
||||
|
||||
To use the tangled =init.el=, I link it to =~/.emacs.d/init.el=:
|
||||
#+begin_src sh :tangle no
|
||||
ln -s ~/dots/files/init.el ~/.emacs.d/init.el
|
||||
#+end_src
|
||||
|
||||
This file replaces itself with the actual configuration at first run.
|
||||
#+BEGIN_SRC emacs-lisp :tangle no
|
||||
(require 'org)
|
||||
(find-file (concat (getenv "HOME") "/dots/files/init.org"))
|
||||
(find-file (concat (getenv "HOME") "/dots/files/emacs/.emacs.d/init.org"))
|
||||
(org-babel-tangle)
|
||||
(load-file (concat (getenv "HOME") "/dots/files/init.el"))
|
||||
(load-file (concat (getenv "HOME") "/dots/files/emacs/.emacs.d/init.el"))
|
||||
#+END_SRC
|
||||
|
||||
It tangles the org-file, so that this file is overwritten with the actual
|
||||
@@ -58,7 +53,7 @@ the =after-save-hook= ensuring to always tangle and byte-compile the
|
||||
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||
(defun tangle-init ()
|
||||
(when (equal (buffer-file-name)
|
||||
(expand-file-name (concat (getenv "HOME") "/dots/files/init.org")))
|
||||
(expand-file-name (concat (getenv "HOME") "/dots/files/emacs/.emacs.d/init.org")))
|
||||
;; Avoid running hooks when tangling.
|
||||
(let ((prog-mode-hook nil))
|
||||
(org-babel-tangle))))
|
||||
0
files/init.org
Normal file
0
files/init.org
Normal file
Reference in New Issue
Block a user