From ecf3f749df612e1a46ea708c87aefeb666eb5031 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Thu, 16 Apr 2020 10:49:57 -0500 Subject: emacs: redo org mode config --- emacs/.emacs.d/init.el | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'emacs/.emacs.d/init.el') 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") -- cgit v1.2.3