blob: a1df3f8fdb5f5cc547ca4f662d386d9b0c80b68b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#+title: Emacs Configuration
Force the use of a =custom.el= file instead of appending to =init.el=.
#+begin_src emacs-lisp
(defun jj/force-custom-file ()
(setq custom-file (concat user-emacs-directory "custom.el"))
(when (file-exists-p custom-file)
(load custom-file)))
#+end_src
Use the correct =PATH= variable.
#+begin_src emacs-lisp
(defun jj/set-exec-path-from-shell-PATH ()
(interactive)
(let ((path-from-shell (replace-regexp-in-string
"[ \t\n]*$" "" (shell-command-to-string
"$SHELL --login -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
#+end_src
Load files for config.
#+begin_src emacs-lisp :tangle ~/.config/emacs/init.el :mkdirp yes
(load "~/.config/emacs/force-custom-file.el")
(load "~/.config/emacs/package-setup.el")
(load "~/.config/emacs/user-interface.el")
(load "~/.config/emacs/tools.el")
(load "~/.config/emacs/languages.el")
#+end_src
|