Skip to content

Latest commit

 

History

History
343 lines (310 loc) · 12.3 KB

org-config.org

File metadata and controls

343 lines (310 loc) · 12.3 KB

Personal config of orgmode

This is just an example config that works well for me. You will need to tune it for yourself to really get the most out of orgmode

[[*Capturing templates C-c c=][Capturing templates]] | =C-c cEntering capture mode where templates are available
[[*Todo lists C-c C-t=][Todo lists]] | =C-c C-tAdd a todo to an org-heading

Little function to help with formulas

(defun my-to-string (arg)
 (replace-regexp-in-string "\\`[ \t\n]*" "" (replace-regexp-in-string "[ \t\n]*\\'" "" arg))
   )

Agenda views

(custom-set-variables
 '(org-agenda-custom-commands
   (quote
    (("c" "Simple agenda view"
      ((agenda "" nil))
      nil)
     ("i" "My summary"
      ((todo "PHYS"
             ((org-agenda-sorting-strategy
               (quote
                (deadline-up)))
              (org-agenda-span
               (quote fortnight))
              (org-agenda-overriding-header "Quantum Physics!")))
       (todo "BLOAT"
             ((org-agenda-span
               (quote day))
              (org-agenda-overriding-header "Stuff at home")))
       ;; (todo "HOUSE"
       ;; ((org-agenda-span
       ;; (quote fortnight))
       ;; (org-agenda-overriding-header "Renovation")))
       (todo "SINO|REACH|DREAMS-AI"
             ((org-agenda-overriding-header "Dreams-AI")
              (org-agenda-span
               (quote fortnight)))))
      nil nil)))))

Org files to monitor

(setq org-agenda-files (list "~/creamy_seas/antlers.org"
                             "~/creamy_seas/monday_starts_on_saturday/adventure_brief.org"
                             "~/creamy_seas/monday_starts_on_saturday/cqps/cqps_notes.org"
                             "~/creamy_seas/monday_starts_on_saturday/photon/photon_counting_notes.org"
                             "~/creamy_seas/monday_starts_on_saturday/power-meter/adventure_brief.org"
                             "~/creamy_seas/monday_starts_on_saturday/lab-results/log_file.org"
                             "~/creamy_seas/drill.org"
                             "~/creamy_seas/projects/dai/2022-10_helium-pay/adventure-brief.org"
                             ;; "~/mydrive/people.org"
                             ))

Capturing templates C-c c

Emacs/orgmode has an intense feature where you can quickly call upon templates to insert into your org files.

The structure of the template is the following:

  • keymapping
  • description
  • file/org-id of where to insert the template. If using ids, you must include the file in General Parameters
  • template to insert

Tasks

(setq org-capture-templates
      '(("b" "Bloat"
         entry
         (id "antlers-bloat")
         "** BLOAT %^{stuff-to-be-done}\nSHEDULED: %^T")

        ("e" "East India Data Company Task"
         entry
         (file "~/mydrive/east-data-company.org")
         "** %^{TODO-STATE} %^{stuff-to-be-done}:\nDEADLINE: %^T")))

Copy pasta

(my/org/add-to-capture '("c" "Copy Pasta"
                         entry
                         (id "copy-pasta")
                         "** %^{Pasta Title} %t\n%?"))

(my/org/add-to-capture '("u" "Save URL"
                         entry
                         (file+headline "~/creamy_seas/1488.org.gpg" "URL too good to throw away")
                         "** %^L %? %^G"
                         :kill-buffer t))

(my/org/add-to-capture '("s" "Stories"
                         entry (id "stories")
                         "** %^{Title} %t\n%?"
                         :empty-lines-after 1))

Physics

(my/org/add-to-capture '("p" "PhD Tasks"))

(my/org/add-to-capture '("pp" "Photon"
                         entry
                         (id "phd-photon")
                         "*** PHYS %^{stuff-to-be-done} [/] :PHOTON:\nDEADLINE: %^T\n- [ ] %?"))

(my/org/add-to-capture '("pl" "Laboratory"
                         entry
                         (file "~/creamy_seas/monday_starts_on_saturday/lab-results/log_file.org")
                         "*** PHYS %^{stuff-to-be-done} [/] :MEASUREMENT:\nDEADLINE: %^T\n- [ ] %?"))

(my/org/add-to-capture '("pq" "CQPS"
                         entry
                         (id "phd-cqps")
                         "*** PHYS %^{stuff-to-be-done} [/] :CQPS:\nDEADLINE: %^T\n- [ ] %?"))

(my/org/add-to-capture '("pg" "General"
                         entry
                         (id "phd-general")
                         "*** PHYS %^{stuff-to-be-done} [/] :GENERAL:\nDEADLINE: %^T\n- [ ] %?"))

Drills

(my/org/add-to-capture '("d" "Drill"))

(my/org/add-to-capture '("dm" "Myth"
                         entry
                         (id "drill-myth")
                         "** %^{Title} :drill:
    :PROPERTIES:
    :END:
Added: %U
*** Definition
%?
"
                         ))

(my/org/add-to-capture '("dt" "Trading"
                         entry
                         (id "drill-trading")
                         "** %^{Title} :drill:
    :PROPERTIES:
    :END:
Added: %U
*** Definition
%?
"
                         ))


(my/org/add-to-capture '("do" "Church"
                         entry
                         (id "drill-church")
                         "** %^{Title} :drill:
    :PROPERTIES::
    :END:
Added: %U
*** Definition
%?
"
                         ))
(my/org/add-to-capture '("ds" "Stoicism"
                         entry
                         (id "drill-stoic")
                         "** %^{Title} :drill:
:PROPERTIES:
:DRILL_CARD_TYPE: twosided
:END:
Added: %U
*** Definition
%?"
                         ))

(my/org/add-to-capture '("dC" "Crypto"
                         entry
                         (id "drill-crypto")
                         "** %^{Title} :drill:
:PROPERTIES:
:END:
Added: %U
*** Definition
%?
"
                         ))


(my/org/add-to-capture '("dg" "Gitlab"
                         entry
                         (id "drill-gitlab")
                         "** %^{Title} :drill:
Added: %U
*** Definition
%?
"))

Archived

;; (my/org/add-to-capture '("dL" "Lord of the Rings"
;;                          entry
;;                          (id "drill-lotr")
;;                          "** %^{Title} :drill:
;;     :PROPERTIES::
;;     :END:
;; Added: %U
;; *** Definition
;; %?
;; "
;;                          ))

;; (my/org/add-to-capture '("dD" "Dune"
;;                          entry
;;                          (id "drill-dune")
;;                          "** %^{Title} :drill:
;;     :PROPERTIES::
;;     :END:
;; Added: %U
;; *** Definition
;; %?
;; "
;;                          ))

;; (my/org/add-to-capture '("l" "Boomer Entry"
;;                          item
;;                          (file+headline "~/creamy_seas/1488.org.gpg" "Becoming a boomer")
;;                          "%^{What did Luke say} %^G\n%?"
;;                          (file "~/creamy_seas/1488.org.gpg")
;;                          "%?"))

;; ("x" "People")
;; ("xe" "Ernest"
;;  entry
;;  (id "ernest")
;;  "** SKYPE Ernest: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xb" "Benjamin"
;;  entry
;;  (id "benjamin")
;;  "** SKYPE Benjamin: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xf" "Fred"
;;  entry
;;  (id "fred")
;;  "** SKYPE Fred: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xv" "Vlad"
;;  entry
;;  (id "vlad")
;;  "** SKYPE Vlad: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xm" "Milan"
;;  entry
;;  (id "milan")
;;  "** SKYPE Milan: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xs" "Sam"
;;  entry
;;  (id "sam")
;;  "** SKYPE Sam: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xa" "Alan"
;;  entry
;;  (id "alan")
;;  "** SKYPE Alan: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xi" "Vivian"
;;  entry
;;  (id "vivian")
;;  "** SKYPE Vivian: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

;; ("xh" "Heili"
;;  entry
;;  (id "heili")
;;  "** SKYPE Heili: Catchup:\nDEADLINE: %^T"
;;  :empty-lines-after 1)

Todo lists C-c C-t

These todo blocks can be put in front of any org heading with C-c C-t

  • Must be capital letters
(setq org-todo-keywords '((sequence "TODO(t)"
                                    "BLOAT(B)"
                                    ;; "BRYAN(z)"
                                    "PHYS(p)"
                                    "DREAMS-AI(a)"
                                    ;; "HORSE(h)"
                                    ;; "SA36(3)"
                                    ;; "HOUSE(h)"
                                    ;; "SCHOOLS"
                                    "DOWN(D)"
                                    ;; "TUTORING(l)"
                                    ;; "CURRENT(c)"
                                    ;; "SKYPE(s)"
                                    ;; "SINO"
                                    ;; "REACH"
                                    "|"
                                    "DONE(d)"
                                    "DOMINATED(x)"
                                    "PACKAGE"
                                    "MANUAL-PACKAGE"
                                    "CONFIG"
                                    ;; "BUREUCRACY(b)"
                                    )))
(setq org-todo-keyword-faces (quote (
                                     ("STARTED" . "yellow")
                                     ("CURRENT" . (:foreground "#ffff0a" :background "#754ec1" :weight bold))
                                     ("DREAMS-AI" . (:foreground "#68c3c1" :background "#fdc989" :weight bold))
                                     ;; ("SA36" . (:background "#01168a" :foreground "#fdc989" :weight bold))
                                     ("MANUAL-PACKAGE" . (:background "#ffe7ba" :foreground "#3d3d3d" :weight bold))
                                     ;; ("SKYPE" . (:background "#00AFF0" :foreground "#ffffff" :weight bold))
                                     ("SINO" . (:background "#ffe7ba" :foreground "#3d3d3d" :weight bold))
                                     ;; ("HORSE" . (:background "#68c3c1" :foreground "#fdc989" :weight bold))
                                     ("REACH" . (:background "#68c3c1" :foreground "#fdc989" :weight bold))
                                     ("HOUSE" . (:background "#68c3c1" :foreground "#fdc989" :weight bold))
                                     ("PHYS" . (:foreground "yellow" :background "#FF3333"))
                                     ("DOWN" . (:foreground "yellow" :background "#FF3333"))
                                     ;;("DONE" . (:foreground "yellow" :background "#FF3333"))
                                     ;; ("SCHOOLS" . (:foreground "#090C42" :background "#9DFE9D"))
                                     ("Dominated" . (:foreground "#9DFE9D" :weight bold))
                                     ("BLOAT" . (:foreground "#000001" :background "#ffffff"))
                                     ;; ("TUTORING" . (:foreground "#090C42" :background "#FFD700": weight bold))
                                     ;; ("BRYAN" . (:foreground "#090C42" :background "#33ccff" :weight bold))
                                     ("PACKAGE" . (:background "#00AFF0" :foreground "#ffffff" :weight bold))
                                     ("CONFIG" . (:background "#00AFF0" :foreground "#090C42" :weight bold))
                                     ("BUREUCRACY" . (:background "#ab82ff" :foreground "#8b6969" :weight bold))
                                     )))
(setq org-agenda-span 15)

Timestamp

(setq org-time-stamp-custom-formats '("<%d %b %Y>" . "<%d %b %Y %a %H:%M>"))