(require 'fcuny-vars) (use-package org :ensure t :hook ((org-mode . visual-line-mode) (org-mode . org-indent-mode)) :bind (("C-c c" . org-capture) ("C-c a" . org-agenda)) :config (progn () (org-babel-do-load-languages 'org-babel-load-languages '((shell . t) (python . t) (emacs-lisp . t)))) :custom ;; priorities. I use: ;; -1 important + urgent ;; -2 important + non-urgent ;; -3 non-important + urgent ;; -4 non-important + non-urgent (org-highest-priority ?1) (org-default-priority ?4) (org-lowest-priority ?4) (org-pretty-entities t) (org-src-fontify-natively t) ;; prevent the conversion of spaces into tabs (necessary for Python code exports) (org-src-preserve-indentation t) (org-edit-src-content-indentation t) (org-startup-indented t) (org-directory (expand-file-name "~/Documents/notebooks")) (org-default-inbox-file (concat org-directory "/gtd.org")) (org-default-notes-file (concat org-directory "/gtd.org")) (org-agenda-start-on-weekday 1) (org-tags-column -120) ;; I want to follow links on RET (org-return-follows-link t) (org-blank-before-new-entry (quote ((heading . nil) (plain-list-item . 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"))) ;; The sequence I want to use to navigate tasks (org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "STARTED(s)" "|" "DONE(d)" "CANCELED(c)"))) (org-enforce-todo-dependencies t) ;; list of files to use for the agenda (org-agenda-files (list (expand-file-name "tasks.org" org-directory) (expand-file-name "projects.org" org-directory) (expand-file-name "tw-journal.org" org-directory))) (org-export-with-toc nil) (org-export-with-section-numbers nil) ;; see https://github.com/abo-abo/swiper/issues/986 (org-goto-interface 'outline-path-completion) (org-outline-path-complete-in-steps nil) (org-refile-use-outline-path 'file) (org-refile-allow-creating-parent-nodes 'confirm) (org-refile-targets '((org-agenda-files :maxlevel . 4))) ;; for the agenda, I want to see tasks in order of priorities. (org-agenda-custom-commands '(("c" "Agenda by priorities" ((tags-todo "PRIORITY=\"1\"" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) (org-agenda-overriding-header "important and urgent:"))) (tags-todo "PRIORITY=\"2\"" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) (org-agenda-overriding-header "important and non-urgent:"))) (tags-todo "PRIORITY=\"3\"" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) (org-agenda-overriding-header "non-important and urgent:"))) (agenda "" ((org-agenda-ndays 1))) (alltodo "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))))) ((org-agenda-compact-blocks t))))) (org-capture-templates `(;; templates for general references, links, etc. They can be relevant for both work and personal learning. ("r" "Reference" entry (file ,(concat org-directory "/kb.org") "Reference") "* %^{TITLE} %^G\n:PROPERTIES:\n:Created: %U\n:END:\n%?") ("e" "Event" entry (file+headline ,(concat org-directory "/notes.org") "Event") "* %^{EVENT}\n:PROPERTIES:\n:Created: %U\n:Location: %^{prompt}\n:END:\n%?") ("b" "Bookmark" entry (file+headline ,(concat org-directory "/notes.org") "Bookmark") "* %(fcuny/get-page-title (current-kill 0)) %^g\n:PROPERTIES:\n:Created: %U\n:ReadLater: %^{read later|Yes|No}\n:Effort: %^{effort|1:00|0:05|0:15|0:30|2:00|4:00|5:00}\n:END:\n%?") ("q" "Quotes" entry (file+headline ,(concat org-directory "/notes.org") "Quote") "* %^{TITLE}\n:PROPERTIES:\n:Created: %U\n:Page: %^{page}\n:END:\n%?") ("d" "Debug" entry (file ,(concat org-directory "/debug.org") "Debug") "* %^{TITLE}\n:PROPERTIES:\n:Created: %U\n:END:\n%?") ;; templates for personal things only. ("j" "Personal Journal" entry (file+olp+datetree ,(concat org-directory "/journal.org")) "* %U %?\n" :tree-type week) ("w" "Weekly Review" entry (file+olp+datetree ,(concat org-directory "/journal.org")) (file ,(concat fcuny/path-emacs-etc "/weekly_review.org")) :tree-type week :jump-to-captured t) ;; templates for work related things only. ("J" "Work Journal" entry (file+olp+datetree ,(concat org-directory "/tw-journal.org")) "* %U %?\n" :tree-type week) ("m" "Meeting" entry (file+olp+datetree ,(concat org-directory "/tw-journal.org")) "* %U %^{TITLE}\n%?" :tree-type week) ("I" "Interview" entry (file+olp+datetree ,(concat org-directory "/tw-journal.org")) (file ,(concat fcuny/path-emacs-etc "/interview.org")) :tree-type week) ("t" "task entry" entry (file ,org-default-inbox-file ) "* TODO [#4] %? %^G\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n%i\n\nfrom: %a")))) (use-package htmlize :ensure t) (provide 'fcuny-org)