Fix paths for emacs

This commit is contained in:
Marco Thomas
2022-01-24 09:37:09 +01:00
parent b458b1f911
commit ba1fb5cd67
3 changed files with 5 additions and 10 deletions

View File

@@ -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"))

View File

@@ -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))))