diff options
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r-- | emacs/.emacs.d/init.el | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index a554a64..b5df141 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -1,3 +1,7 @@ +;; --- FUNCTIONS --- +(defun load-if-exists (filename) + (when (file-exists-p filename) (load-file filename))) + ;; --- BUG WORKAROUNDS --- ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341 @@ -17,7 +21,7 @@ ;; --- PACKAGE REPOSITORIES --- (require 'package) (setq package-archives - '(("gnu" . "https://elpa.gnu.org/packages/") + '(("gnu" . "https://elpa.gnu.org/packages/") ("melpa" . "https://melpa.org/packages/"))) (package-initialize) @@ -40,6 +44,19 @@ enable-recursive-minibuffers t) (ivy-mode 1)) +;; --- ORG MODE --- +(use-package org + :mode + (("\\.org$" . org-mode)) + :init + (add-to-list 'auto-mode-alist `(,(expand-file-name "~/org/") . org-mode)) + :bind + (("C-c a" . org-agenda)) + :config + (load-file "~/.emacs.d/org-mode.el") + (load-if-exists "~/.emacs.d/org-mode.local.el") + ) + ;; --- PROJECTS --- (use-package projectile :demand t @@ -181,8 +198,6 @@ (dolist (face faces) (set-face-attribute face nil :foreground fg :background bg))) -(defun load-if-exists (filename) - (when (file-exists-p filename) (load-file filename))) (load-if-exists "~/.emacs.d/local.el") (setq custom-file "~/.emacs.d/custom.el") |