[Emacs] Remove w3m layer, compile configuration files when exported
The w3m layer is now removed as I did not use it at all. The conlanging layer is moved to ~/fromGIT/emacs-packages and now a symlink points to its new location. This is done in order to prevent Emacs from compiling its .el files when recompiling its configuration files. Configuration files are now compiled when emacs.org is tangled by Emacs itself or if the .el files are newer than the .elc files. TODO: find a way to natively compile and load these files instead of just byte-compile them if native compilation is available
This commit is contained in:
29
.spacemacs
29
.spacemacs
@@ -6,14 +6,14 @@ before layer configuration.
|
||||
It should only modify the values of Spacemacs settings."
|
||||
(setq phundrak//dotspacemacs-src-dir "~/.config/emacs/private/"
|
||||
phundrak//dotspacemacs-src "~/org/config/emacs.org"
|
||||
phundrak//dotspacemacs-si (concat phundrak//dotspacemacs-src-dir "spacemacs-init.el")
|
||||
phundrak//dotspacemacs-sl (concat phundrak//dotspacemacs-src-dir "spacemacs-layers.el")
|
||||
phundrak//dotspacemacs-uc (concat phundrak//dotspacemacs-src-dir "user-config.el")
|
||||
phundrak//dotspacemacs-ui (concat phundrak//dotspacemacs-src-dir "user-init.el"))
|
||||
(when (or (file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-si)
|
||||
(file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-sl)
|
||||
(file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-ui)
|
||||
(file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-uc))
|
||||
phundrak//dotspacemacs-si (concat phundrak//dotspacemacs-src-dir "spacemacs-init")
|
||||
phundrak//dotspacemacs-sl (concat phundrak//dotspacemacs-src-dir "spacemacs-layers")
|
||||
phundrak//dotspacemacs-uc (concat phundrak//dotspacemacs-src-dir "user-config")
|
||||
phundrak//dotspacemacs-ui (concat phundrak//dotspacemacs-src-dir "user-init"))
|
||||
(when (or (file-newer-than-file-p phundrak//dotspacemacs-src (concat phundrak//dotspacemacs-si ".el"))
|
||||
(file-newer-than-file-p phundrak//dotspacemacs-src (concat phundrak//dotspacemacs-sl ".el"))
|
||||
(file-newer-than-file-p phundrak//dotspacemacs-src (concat phundrak//dotspacemacs-ui ".el"))
|
||||
(file-newer-than-file-p phundrak//dotspacemacs-src (concat phundrak//dotspacemacs-uc ".el")))
|
||||
(message "Exporting new Emacs configuration from spacemacs.org through org-babel...")
|
||||
(with-temp-buffer
|
||||
(shell-command (format "emacs -Q --batch %s %s %s"
|
||||
@@ -22,13 +22,16 @@ It should only modify the values of Spacemacs settings."
|
||||
(format "--eval '(org-babel-tangle-file \"%s\")'"
|
||||
phundrak//dotspacemacs-src))
|
||||
(current-buffer)))
|
||||
(message "done"))
|
||||
(load-file phundrak//dotspacemacs-si))
|
||||
(message "Exporting new Emacs configuration from spacemacs.org through org-babel...done")
|
||||
(with-temp-buffer
|
||||
(byte-recompile-directory phundrak//dotspacemacs-src-dir
|
||||
0 t)))
|
||||
(load phundrak//dotspacemacs-si))
|
||||
|
||||
(defun dotspacemacs/layers ()
|
||||
"Layer configuration:
|
||||
This function should only modify configuration layer settings."
|
||||
(load-file phundrak//dotspacemacs-sl))
|
||||
(load phundrak//dotspacemacs-sl))
|
||||
|
||||
(defun dotspacemacs/user-env ()
|
||||
"Environment variables setup.
|
||||
@@ -44,7 +47,7 @@ This function is called immediately after `dotspacemacs/init', before layer
|
||||
configuration.
|
||||
It is mostly for variables that should be set before packages are loaded.
|
||||
If you are unsure, try setting them in `dotspacemacs/user-config' first."
|
||||
(load-file phundrak//dotspacemacs-ui))
|
||||
(load phundrak//dotspacemacs-ui))
|
||||
|
||||
(defun dotspacemacs/user-load ()
|
||||
"Library to load while dumping.
|
||||
@@ -59,7 +62,7 @@ This function is called at the very end of Spacemacs startup, after layer
|
||||
configuration.
|
||||
Put your configuration code here, except for variables that should be set
|
||||
before packages are loaded."
|
||||
(load-file phundrak//dotspacemacs-uc))
|
||||
(load phundrak//dotspacemacs-uc))
|
||||
|
||||
|
||||
;; Do not write anything past this comment. This is where Emacs will
|
||||
|
||||
Reference in New Issue
Block a user