summary refs log tree commit diff
path: root/emacs/custom/fcuny-org.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom/fcuny-org.el')
-rw-r--r--emacs/custom/fcuny-org.el113
1 files changed, 113 insertions, 0 deletions
diff --git a/emacs/custom/fcuny-org.el b/emacs/custom/fcuny-org.el
new file mode 100644
index 0000000..92e0e65
--- /dev/null
+++ b/emacs/custom/fcuny-org.el
@@ -0,0 +1,113 @@
+(require 'fcuny-vars)
+
+(use-package htmlize
+  :ensure t)
+
+(use-package org
+  :ensure t
+  :mode (("\\.txt\\'" . org-mode))
+  :hook ((org-mode                     . org-indent-mode)
+         (org-mode                     . org-hide-block-all)
+         (org-mode                     . visual-line-mode)
+         (org-capture-after-finalize   . org-save-all-org-buffers)
+         (org-capture-prepare-finalize . org-save-all-org-buffers))
+  :bind (("C-c c" . org-capture)
+         ("C-c a" . org-agenda))
+
+  :config
+  (defvar load-language-list '((emacs-lisp . t)
+                               (python . t)
+                               (shell . t)))
+  (use-package ob-go
+    :ensure t
+    :init (cl-pushnew '(go . t) load-language-list))
+
+  (org-babel-do-load-languages 'org-babel-load-languages
+                               load-language-list)
+
+  :custom
+  (org-id-locations-file (concat fcuny/path-emacs-var "/org-id-locations"))
+
+  (org-directory (expand-file-name "~/Documents/Notebooks"))
+  (org-default-inbox-file (concat org-directory "/inbox.org"))
+  (org-default-notes-file (concat org-directory "/notes.org"))
+  (org-default-habit-file (concat org-directory "/habits.org"))
+  (org-default-tasks-file (concat org-directory "/personal-tasks.org"))
+  (org-default-work-tasks-file (concat org-directory "/work-tasks.org"))
+  (org-default-journal-file (concat org-directory "/personal-journal.org"))
+  (org-default-work-journal-file (concat org-directory "/work-journal.org"))
+  (org-default-interview-file (concat org-directory "/interviews.org"))
+
+  ;; when archiving, inherit the tags from the parent
+  (org-archive-subtree-add-inherited-tags t)
+
+  ;; display unicode characters
+  (org-pretty-entities t)
+
+  ;; log the time of completion
+  (org-log-done 'time)
+
+  ;; priorities
+  (org-priority-start-cycle-with-default nil) ;; Start one over/under default value.
+  (org-lowest-priority ?F)
+  (org-default-priority ?D) ;; Ensures unset tasks have low priority.
+
+  ;; agenda related
+  (calendar-week-start-day 1)      ;; org-mode uses calendar for the date picker, and I want this to start on Monday
+  (org-agenda-start-on-weekday 1)  ;; this is specific to org-agenda
+  (org-agenda-files `(,org-default-tasks-file
+                      ,org-default-work-tasks-file
+                      ,org-default-habit-file))
+
+  ;; org babel related
+  ;; prevent the conversion of spaces into tabs (necessary for Python code exports)
+  (org-src-fontify-natively t)
+  (org-src-preserve-indentation t)
+  (org-edit-src-content-indentation t)
+
+  ;; I want to follow links on RET
+  (org-return-follows-link t)
+
+  ;; some configurations for exporting document
+  (org-export-with-toc nil)
+  (org-export-with-section-numbers nil)
+
+  ;; A few abbreviations I use regularly
+  (org-link-abbrev-alist
+   '(("src"  . "~/workspace/%s")
+     ("jira" . "https://jira.twitter.biz/browse/%s")
+     ("ph"   . "https://phabricator.twitter.biz/%s")
+     ("go"   . "http://go/%s")))
+
+  ;; entries
+  (org-blank-before-new-entry nil)
+  (org-blank-before-new-entry (quote ((heading . nil)
+				      (plain-list-item . nil))))
+
+  ;; see https://github.com/abo-abo/swiper/issues/986
+  (org-goto-interface 'outline-path-completion)
+
+  (org-reverse-note-order t)
+
+  (org-capture-templates
+   `(("t" "Todo [inbox]" entry
+      (file+headline ,org-default-inbox-file "Tasks")
+      "* TODO [#D] %?\n:PROPERTIES:\n:ID: %(shell-command-to-string \"uuidgen\"):CREATED: %U\n:END:\n")
+
+     ("n" "Note" entry
+      (file ,org-default-notes-file)
+      "* NOTE %?\n:PROPERTIES:\n:ID: %(shell-command-to-string \"uuidgen\"):CREATED: %U\n:END:\n")
+
+     ("j" "Journal" entry
+      (file+olp+datetree ,org-default-journal-file)
+      "* %?\n:PROPERTIES:\n:ID: %(shell-command-to-string \"uuidgen\"):CREATED: %U\n:END:\n" :tree-type month)
+
+     ("i" "Interview notes" entry
+      (file+olp+datetree ,org-default-interview-file)
+      (file ,(concat fcuny/path-emacs-etc "/interview.org")))
+
+     ("J" "Work Journal" entry
+      (file+olp+datetree ,org-default-work-journal-file)
+      "* %?\n:PROPERTIES:\n:ID: %(shell-command-to-string \"uuidgen\"):CREATED: %U\n:END:\n" :tree-type month))))
+
+(provide 'fcuny-org)