|
|
@ -44,9 +44,9 @@ These functions updates config.el whenever changes in config.org are made. The u |
|
|
|
(lambda () |
|
|
|
(or (not (process-live-p (get-process "tangle-process"))) |
|
|
|
(y-or-n-p "\"my/tangle-config\" is running; kill it? ")))) |
|
|
|
(org-babel-tangle-file config-org config-el) |
|
|
|
(org-babel-tangle-file config-org init-el) |
|
|
|
(message "reloading user-init-file") |
|
|
|
(load-file config-el)) |
|
|
|
(load-file init-el)) |
|
|
|
|
|
|
|
(add-hook 'org-mode-hook |
|
|
|
(lambda () |
|
|
@ -57,20 +57,20 @@ These functions updates config.el whenever changes in config.org are made. The u |
|
|
|
"Add buffer-local hook." |
|
|
|
(add-hook hook function :local t)) |
|
|
|
|
|
|
|
(defun my/async-process (command &optional name filter) |
|
|
|
"Start an async process by running the COMMAND string with bash. Return the |
|
|
|
process object for it. |
|
|
|
;; (defun my/async-process (command &optional name filter) |
|
|
|
;; "Start an async process by running the COMMAND string with bash. Return the |
|
|
|
;; process object for it. |
|
|
|
|
|
|
|
NAME is name for the process. Default is \"async-process\". |
|
|
|
;; NAME is name for the process. Default is \"async-process\". |
|
|
|
|
|
|
|
FILTER is function that runs after the process is finished, its args should be |
|
|
|
\"(process output)\". Default is just messages the output." |
|
|
|
(make-process |
|
|
|
:command `("bash" "-c" ,command) |
|
|
|
:name (if name name |
|
|
|
"async-process") |
|
|
|
:filter (if filter filter |
|
|
|
(lambda (process output) (message output))))) |
|
|
|
;; FILTER is function that runs after the process is finished, its args should be |
|
|
|
;; \"(process output)\". Default is just messages the output." |
|
|
|
;; (make-process |
|
|
|
;; :command `("bash" "-c" ,command) |
|
|
|
;; :name (if name name |
|
|
|
;; "async-process") |
|
|
|
;; :filter (if filter filter |
|
|
|
;; (lambda (process output) (message output))))) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
A small function to measure start up time. |
|
|
@ -2000,3 +2000,13 @@ Maybe a problem on Windows? |
|
|
|
#+begin_src emacs-lisp |
|
|
|
;(setq gc-cons-threshold (* 2 1000 1000)) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
Rest of early-init.el |
|
|
|
#+begin_src emacs-lisp :tangle early-init.el |
|
|
|
(defconst config-org (expand-file-name "config.org" user-emacs-directory)) |
|
|
|
(defconst init-el (expand-file-name "init.el" user-emacs-directory)) |
|
|
|
|
|
|
|
(unless (file-exists-p init-el) |
|
|
|
(require 'org) |
|
|
|
(org-babel-tangle-file config-org init-el)) |
|
|
|
#+end_src |