(require 'fcuny-vars) (use-package dash :ensure t) (use-package org :after (dash) :ensure t :hook ((org-mode . visual-line-mode) (org-mode . org-indent-mode) (org-capture-mode-hook . delete-other-windows)) :bind (("C-c c" . org-capture) ("C-c a" . org-agenda) ("C-c o" . hydra-org-menu/body)) :config (progn () (org-babel-do-load-languages 'org-babel-load-languages '((shell . t) (python . t) (emacs-lisp . t)))) :custom ;; cosmetic (org-pretty-entities t) (org-startup-indented t) (org-tags-column -120) ;; files (org-directory (expand-file-name "~/Documents/notebooks")) (org-archive-dir (concat org-directory "/archive/")) (org-default-projects-dir (concat org-directory "/projects")) (org-default-personal-dir (concat org-directory "/personal")) (org-default-completed-dir (concat org-directory "/completed")) (org-default-technical-dir (concat org-directory "/technical")) (org-default-completed-file nil) (org-default-inbox-file (concat org-directory "/inbox.org")) (org-default-tasks-file (concat org-directory "/tasks.org")) (org-default-incubate-file (concat org-directory "/incubate.org")) (org-default-media-file (concat org-directory "/media.org")) (org-default-notes-file (concat org-directory "/notes.org")) ;; how to manage tasks (org-todo-keywords '((sequence "TODO(t)" "DOING(g)" "|" "DONE(d)") (sequence "|" "CANCELED(c)"))) ;; agenda related (org-agenda-start-on-weekday 1) (org-agenda-files `(,org-default-projects-dir ,org-default-inbox-file ,org-default-tasks-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) ;; behavior ;; I want to follow links on RET (org-return-follows-link t) (org-enforce-todo-dependencies t) (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 (quote ((heading . nil) (plain-list-item . nil)))) ;; see https://github.com/abo-abo/swiper/issues/986 (org-goto-interface 'outline-path-completion) ;; refile and capture (org-refile-use-outline-path 'file) (org-outline-path-complete-in-steps nil) (org-refile-allow-creating-parent-nodes 'confirm) (org-refile-targets (append '((org-default-media-file :level . 1) (org-default-notes-file :level . 0)) (->> (directory-files org-default-projects-dir nil ".org$") (-remove-item (file-name-base org-default-media-file)) (--remove (s-starts-with? "." it)) (--map (format "%s/%s" org-default-projects-dir it)) (--map (cons it (cons :level 1)))))) (org-capture-templates `(("t" "task entry" entry (file ,org-default-inbox-file ) "* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n%i"))) :config (defhydra hydra-org-menu (:columns 6) " ^Navigate^ ^Refile^ ^Move^ ^Update^ ^Go To^ ^Dired^ ^^^^^^^^^^--------------------------------------------------------------------------------------- _k_: ↑ previous _t_: tasks _m X_: projects _T_: todo task _g t_: tasks _g X_: projects _j_: ↓ next _p_: personal _m P_: personal _S_: schedule _g i_: incubate _g P_: personal _c_: archive _r_: refile _m T_: technical _D_: deadline _g n_: notes _g T_: technical _d_: delete _i_: incubate _R_: rename _g x_: inbox _g C_: completed " ("" org-previous-visible-heading) ("" org-next-visible-heading) ("k" org-previous-visible-heading) ("j" org-next-visible-heading) ("c" fcuny/org-archive-subtree-as-completed) ("d" org-cut-subtree) ("t" fcuny/org-refile-to-task) ("i" fcuny/org-refile-to-incubate) ("p" fcuny/org-refile-to-personal-notes) ("r" org-refile) ("m X" fcuny/org-refile-to-projects-dir) ("m P" fcuny/org-refile-to-personal-dir) ("m T" fcuny/org-refile-to-technical-dir) ("T" org-todo) ("S" org-schedule) ("D" org-deadline) ("R" org-rename-header) ("g t" (find-file-other-window org-default-tasks-file)) ("g i" (find-file-other-window org-default-incubate-file)) ("g x" (find-file-other-window org-default-inbox-file)) ("g c" (find-file-other-window org-default-completed-file)) ("g n" (find-file-other-window org-default-notes-file)) ("g X" (dired org-default-projects-dir)) ("g P" (dired org-default-personal-dir)) ("g T" (dired org-default-technical-dir)) ("g C" (dired org-default-completed-dir)) ("[\t]" (org-cycle)) ("s" (org-save-all-org-buffers) "save") ("q" nil "quit"))) (use-package htmlize :ensure t) (use-package org-journal :ensure t :after (org) :custom (org-journal-file-format "%Y-%m.org") (org-journal-dir "~/Documents/notebooks/journal/") (org-journal-date-format 'fcuny/org-journal-date-format-func) (org-journal-file-type `monthly)) (provide 'fcuny-org)