Fix paths for emacs
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
(require 'org)
|
(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)
|
(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
|
is replaced the first time Emacs is started (assuming it has been renamed
|
||||||
to =~/.emacs.d=).
|
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.
|
This file replaces itself with the actual configuration at first run.
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(require 'org)
|
(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)
|
(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
|
#+END_SRC
|
||||||
|
|
||||||
It tangles the org-file, so that this file is overwritten with the actual
|
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
|
#+BEGIN_SRC emacs-lisp :tangle yes
|
||||||
(defun tangle-init ()
|
(defun tangle-init ()
|
||||||
(when (equal (buffer-file-name)
|
(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.
|
;; Avoid running hooks when tangling.
|
||||||
(let ((prog-mode-hook nil))
|
(let ((prog-mode-hook nil))
|
||||||
(org-babel-tangle))))
|
(org-babel-tangle))))
|
||||||
0
files/init.org
Normal file
0
files/init.org
Normal file
Reference in New Issue
Block a user