home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 9518210c8f56bac5b4ae07d45408ce32ae7890e0
parent 3c84ac55ab7d33c3c03c3936c7690e34f4f16468
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri, 12 Jun 2020 15:12:19 +0200

tools/emacs: update org constants

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/config/config-org.el | 67++++++++++++++++++++++++++++---------------------------------------
1 file changed, 28 insertions(+), 39 deletions(-)

diff --git a/tools/emacs/config/config-org.el b/tools/emacs/config/config-org.el @@ -5,24 +5,22 @@ ;; OrgConstants (defconst org-directory "~/desktop/org/" "org-mode directory, where most of the org-mode file lives") -(defconst org-default-projects-dir (concat org-directory "projects") "Primary tasks directory.") -(defconst org-default-technical-dir (concat org-directory "technical") "Directory of shareable, technical notes.") -(defconst org-default-personal-dir (concat org-directory "personal") "Directory of un-shareable, personal notes.") -(defconst org-default-completed-dir (concat org-directory "archive/projects") "Directory of completed project files.") -(defconst org-default-inbox-file (concat org-directory "projects/inbox.org") "New stuff collected in this file.") -(defconst org-default-next-file (concat org-directory "projects/next.org") "Todo *next* collected in this file.") -(defconst org-default-incubate-file (concat org-directory "projects/incubate.org") "Ideas simmering on back burner.") -(defconst org-default-notes-file (concat org-directory "personal/notes.org") "Non-actionable, personal notes.") -(defconst org-default-journal-file (concat org-directory "personal/journal.org") "Journaling stuff.") -(defconst org-default-meeting-notes-file (concat org-directory "projects/meetings.org") "Meeting notes stuff.") +(defconst org-projects-dir (expand-file-name "projects" org-directory) "Primary tasks directory.") +(defconst org-notes-dir (expand-file-name "notes" org-directory) "Directory of shareable, technical notes.") +(defconst org-archive-dir (expand-file-name "archive" org-directory) "Directory of shareable, technical notes.") +(defconst org-completed-dir (expand-file-name "projects" org-archive-dir) "Directory of completed project files.") +(defconst org-inbox-file (expand-file-name "projects/inbox.org" org-projects-dir) "New stuff collected in this file.") +(defconst org-next-file (expand-file-name "projects/next.org" org-projects-dir) "Todo *next* collected in this file.") +(defconst org-incubate-file (expand-file-name "projects/incubate.org" org-projects-dir) "Ideas simmering on back burner.") +(defconst org-journal-file (expand-file-name "notes/journal.private.org" org-notes-dir) "Journaling stuff.") +(defconst org-meeting-notes-file (expand-file-name "projects/meetings.org" org-projects-dir) "Meeting notes stuff.") ;; -OrgConstants ;; OrgRegisters -(set-register ?i `(file . ,org-default-inbox-file)) -(set-register ?I `(file . ,org-default-incubate-file)) -(set-register ?N `(file . ,org-default-next-file)) -(set-register ?n `(file . ,org-default-notes-file)) -(set-register ?j `(file . ,org-default-journal-file)) +(set-register ?i `(file . ,org-inbox-file)) +(set-register ?I `(file . ,org-incubate-file)) +(set-register ?N `(file . ,org-next-file)) +(set-register ?j `(file . ,org-journal-file)) ;; -OrgRegisters ;; OrgMain @@ -38,7 +36,7 @@ ("<f12>" . org-agenda) ("C-c o c" . org-capture)) :config - (setq org-agenda-files `(,org-default-projects-dir + (setq org-agenda-files `(,org-projects-dir "~/src/home" "~/src/home/docs" "~/src/www/articles" @@ -71,11 +69,11 @@ org-log-reschedule 'time org-log-into-drawer t org-enforce-todo-dependencies t - org-refile-targets (append '((org-default-inbox-file :level . 0)) + org-refile-targets (append '((org-inbox-file :level . 0)) (->> - (directory-files org-default-projects-dir nil ".org") + (directory-files org-projects-dir nil ".org") (--remove (s-starts-with? "." it)) - (--map (format "%s/%s" org-default-projects-dir it)) + (--map (format "%s/%s" org-projects-dir it)) (--map `(,it :level . 1)))) org-refile-use-outline-path 'file org-refile-allow-creating-parent-nodes 'confirm @@ -84,9 +82,9 @@ org-fontify-whole-heading-line t org-pretty-entities t org-ellipsis " ⤵" - org-archive-location (concat org-default-completed-dir "/%s::datetree/") + org-archive-location (concat org-completed-dir "/%s::datetree/") org-use-property-inheritance t - org-default-priority 67 + org-priority 67 org-priority-faces '((?A . "#ff2600") (?B . "#ff5900") (?C . "#ff9200") @@ -257,13 +255,9 @@ ;; OrgCaptureOldTemplate (add-to-list 'org-capture-templates `("l" "Link" entry - (file ,org-default-inbox-file) + (file ,org-inbox-file) "* %a\n%U\n%?\n%i" :empty-lines 1)) - (add-to-list 'org-capture-templates - '("n" "Thought or Note" entry - (file org-default-notes-file) - "* %?\n\n %i\n\n See: %a" :empty-lines 1)) ;; -OrgCaptureOldTemplate ;; OrgCaptureTask @@ -271,12 +265,12 @@ `("t" "Tasks")) (add-to-list 'org-capture-templates `("tt" "New task" entry - (file ,org-default-inbox-file) + (file ,org-inbox-file) "* %?\n:PROPERTIES:\n:CREATED:%U\n:END:\n\n%i\n\nFrom: %a" :empty-lines 1)) (add-to-list 'org-capture-templates `("tr" "PR Review" entry - (file ,org-default-inbox-file) + (file ,org-inbox-file) "* TODO review gh:%^{issue} :review:\n:PROPERTIES:\n:CREATED:%U\n:END:\n\n%i\n%?\nFrom: %a" :empty-lines 1)) ;; -OrgCaptureTask @@ -291,7 +285,7 @@ `("j" "Journal entry")) (add-to-list 'org-capture-templates `("jj" "Journal entry" entry - (file+datetree ,org-default-journal-file) + (file+datetree ,org-journal-file) (file ,(concat user-emacs-directory "/etc/orgmode/journal.org")) :empty-lines 1 :clock-in t :clock-resume t)) ;; -OrgCaptureJournalEntry @@ -299,7 +293,7 @@ ;; OrgCaptureWorklog (add-to-list 'org-capture-templates `("jw" "Worklog (journal) entry" entry - (file+datetree ,org-default-journal-file) + (file+datetree ,org-journal-file) (file ,(concat user-emacs-directory "/etc/orgmode/worklog.org")) :unnarrowed t)) ;; -OrgCaptureWorklog @@ -307,7 +301,7 @@ ;; OrgCaptureWeekly (add-to-list 'org-capture-templates `("je" "Weekly review" entry - (file+datetree,org-default-journal-file) + (file+datetree,org-journal-file) (file ,(concat user-emacs-directory "/etc/orgmode/weekly.org")) :clock-in t :clock-resume t :unnarrowed t)) ;; -OrgCaptureWeekly @@ -315,7 +309,7 @@ ;; OrgCaptureMeetingNote (add-to-list 'org-capture-templates `("m" "Meeting notes" entry - (file+datetree ,org-default-meeting-notes-file) + (file+datetree ,org-meeting-notes-file) (file ,(concat user-emacs-directory "/etc/orgmode/meeting-notes.org")))) ;; -OrgCaptureMeetingNote @@ -524,11 +518,6 @@ Switch projects and subprojects from STARTED back to TODO" org-babel-execute:zsh)) ;; -OrgBabel -;; OrgExportConstants -(defconst site-directory "~/desktop/sites/" "Website folder that holds exported orgmode files and more.") -(defconst org-default-publish-technical (concat site-directory "sbr.pm/technical") "Publish directory for the technical orgmode files.") -;; -OrgExportConstants - ;; OrgExportCfg (use-package ox-publish :after org @@ -599,7 +588,7 @@ With prefix argument, also display headlines without a TODO keyword." :map org-mode-map (("C-c n i" . org-roam-insert))) :custom - (org-roam-directory org-default-technical-dir) + (org-roam-directory org-notes-dir) :custom-face (org-roam-link ((t (:inherit org-link :foreground "#C991E1")))) :config @@ -653,7 +642,7 @@ With prefix argument, also display headlines without a TODO keyword." :custom (org-journal-date-prefix "#+TITLE: ") (org-journal-file-format "%Y-%m-%d.private.org") - (org-journal-dir org-default-technical-dir) + (org-journal-dir org-notes-dir) (org-journal-date-format "%A, %d %B %Y") (org-journal-enable-agenda-integration t))