From ba1fb5cd67a56159f2d8eea8d071862d67f55b88 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Mon, 24 Jan 2022 09:37:09 +0100 Subject: [PATCH] Fix paths for emacs --- files/emacs/.emacs.d/init.el | 4 ++-- files/emacs/{ => .emacs.d}/init.org | 11 +++-------- files/init.org | 0 3 files changed, 5 insertions(+), 10 deletions(-) rename files/emacs/{ => .emacs.d}/init.org (98%) create mode 100644 files/init.org diff --git a/files/emacs/.emacs.d/init.el b/files/emacs/.emacs.d/init.el index b54fd53..c0fc46a 100644 --- a/files/emacs/.emacs.d/init.el +++ b/files/emacs/.emacs.d/init.el @@ -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")) diff --git a/files/emacs/init.org b/files/emacs/.emacs.d/init.org similarity index 98% rename from files/emacs/init.org rename to files/emacs/.emacs.d/init.org index 2b1cb7d..327f224 100644 --- a/files/emacs/init.org +++ b/files/emacs/.emacs.d/init.org @@ -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)))) diff --git a/files/init.org b/files/init.org new file mode 100644 index 0000000..e69de29