all repos — nixfiles @ e23229baf851e14630889b21d956e23f13aae870

System and user configuration, managed by nix and home-manager

Replace emacs hook with makefile

Alan Pearce
commit

e23229baf851e14630889b21d956e23f13aae870

parent

9595844538a4bcf53bec628874605f8c49d589c5

2 files changed, 19 insertions(+), 17 deletions(-)

jump to
A emacs/.emacs.d/Makefile
@@ -0,0 +1,19 @@
+define EMACS_TANGLE +(progn\ + (setq vc-follow-symlinks nil)\ + (find-file \"init.org\")\ + (require 'ob-tangle)\ + (org-babel-tangle nil \"init.el\")) +endef + +all: init.elc +.PHONY: all + +init.el: + @emacs --batch --no-init-file --eval "$(EMACS_TANGLE)" --kill + +init.elc: init.el + @emacs --batch --no-init-file --funcall batch-byte-compile init.el + +clean: + rm init.el init.elc
D hooks/post-up/emacs
@@ -1,17 +0,0 @@
-#!/bin/sh - -EMACS_COMMAND=$(command -v Emacs || command -v emacs) - -if [[ -s $EMACS_COMMAND ]] -then - pushd ~/.emacs.d - emacs --batch --eval "(progn -(setq vc-follow-symlinks nil) -(find-file \"init.org\") -(require 'ob-tangle) -(org-babel-tangle nil \"init.el\") -(byte-compile-file \"init.el\") -(load-file \"init.el\") -)" - popd -fi