summaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init.el
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2020-04-16 10:49:57 -0500
committerBobby Bingham <koorogi@koorogi.info>2021-02-06 10:39:37 -0600
commitecf3f749df612e1a46ea708c87aefeb666eb5031 (patch)
tree750b2fbdfb4e0f8633bab01a90c69188340caa22 /emacs/.emacs.d/init.el
parent53476d328239ead584ee6020d3c775c48fefb72a (diff)
emacs: redo org mode config
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r--emacs/.emacs.d/init.el21
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")