diff --git a/.emacs.d/config.org b/.emacs.d/config.org index 8b42cf0..4010c26 100644 --- a/.emacs.d/config.org +++ b/.emacs.d/config.org @@ -25,7 +25,7 @@ M-x =all-the-icons-install-fonts= Store custom-file separately, don't freak out when it's not found. #+BEGIN_SRC emacs-lisp - (setq custom-file "~/.emacs.d/custom.el") + (setq custom-file (concat emacs-d "/custom.el")) (load custom-file 'noerror) #+END_SRC @@ -616,12 +616,12 @@ Functions that only use built-in Emacs functionality. (defun config-visit () "Config edit." (interactive) - (find-file "~/.emacs.d/config.org")) + (find-file (concat emacs-d "/config.org"))) (defun config-reload () "Config reload." (interactive) - (org-babel-load-file (expand-file-name "~/.emacs.d/config.org"))) + (org-babel-load-file (concat emacs-d "/config.org"))) (defun display-startup-echo-area-message () "Hide default startup message." diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 14c9c36..9597dc0 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2,7 +2,7 @@ ;;; Commentary: -;; Setup package manager and build configuration org file. +;; Setup package manager and build configuration file. ;;; Code: @@ -15,7 +15,9 @@ ; -------------------------------------- (defvar emacs-cache (concat (getenv "XDG_CACHE_HOME") "/emacs") - "Directory where cache data is stored.") + "Directory where Emacs cache data is stored.") +(defvar emacs-d (concat (getenv "HOME") "/.emacs.d") + "Additional per-user Emacs-specific files.") ; -------------------------------------- @@ -35,7 +37,7 @@ ;; Tangle configuration file (require 'org) -(when (file-readable-p (expand-file-name "config.org" user-emacs-directory)) - (org-babel-load-file (expand-file-name "config.org" user-emacs-directory))) +(when (file-readable-p (concat emacs-d "/config.org")) + (org-babel-load-file (concat emacs-d "/config.org"))) ;;; init.el ends here