aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason2017-09-29 09:14:25 -0600
committerjason2017-09-29 09:14:25 -0600
commitf4d169d9c90d7cc4f90c5192f69eb5ebe2430d20 (patch)
tree3c95a7482a878f68b126e24af668497546f706ee
parent4e7ff0d43376e86775a81cfb9eab9628db950113 (diff)
downloaddotemacs-f4d169d9c90d7cc4f90c5192f69eb5ebe2430d20.tar.gz
dotemacs-f4d169d9c90d7cc4f90c5192f69eb5ebe2430d20.zip
Add org-mode configuration
-rw-r--r--config.org158
1 files changed, 151 insertions, 7 deletions
diff --git a/config.org b/config.org
index 4709723..62ff8f8 100644
--- a/config.org
+++ b/config.org
@@ -529,11 +529,9 @@ Installation:
529#+END_SRC 529#+END_SRC
530* org-mode 530* org-mode
531** Setup 531** Setup
532Start org-indent-mode. This displays a single indented star instead of many
533stars in org-mode headings.
534
535#+BEGIN_SRC emacs-lisp 532#+BEGIN_SRC emacs-lisp
536(setq 533(setq org-directory "~/org"
534
537 ;; Indents headers instead of displaying all of the asterisks 535 ;; Indents headers instead of displaying all of the asterisks
538 org-startup-indented t 536 org-startup-indented t
539 537
@@ -542,17 +540,44 @@ stars in org-mode headings.
542 540
543 ;; Don't split the line when hitting M-RET for a new heading 541 ;; Don't split the line when hitting M-RET for a new heading
544 ;org-M-RET-may-split-line '((default . nil)) 542 ;org-M-RET-may-split-line '((default . nil))
543
544 ;; Define the default drawers
545 org-drawers (quote ("PROPERTIES" "LOGBOOK"))
546
547 ;; define some frequently used tags for the add tag menu
548 org-tag-alist '(
549 ("project" . ?p)
550 ("@work" . ?w)
551 ("@home" . ?h)
552 ("eventmq" . ?q))
553
554
555 ;; Define a default width for inline images. this can be overridden
556 ;; by +ATTR_*: width="200"
557 org-image-actual-width '(400)
545) 558)
559;; these extensions should be considered org-mode files
560(add-to-list 'auto-mode-alist '("\\.\\(org\\|org\.gpg\\|org_archive\\)$" . org-mode))
561
546#+END_SRC 562#+END_SRC
547** Key Bindings 563** Key Bindings
548Define the keybindings for org-mode related things 564Define the keybindings for org-mode related things
549 565
550| Key | Function | Description | 566| Key | Function | Description |
551|-----+------------+-----------------------------| 567|--------+-------------------+-------------------------------------|
552| F12 | org-agenda | Display the org-agenda menu | 568| F12 | org-agenda | Display the org-agenda menu |
569| F9 c g | org-clock-goto | Go to the current clocked task |
570| F9 c l | org-clock-in-last | Clock into the last clocked in task |
571| F9 c o | org-clock-out | Clock out of the current task |
572| C-c c | org-capture | Display the org-capture menu |
553 573
554#+BEGIN_SRC emacs-lisp 574#+BEGIN_SRC emacs-lisp
555(global-set-key (kbd "<f12>") 'org-agenda) 575(global-set-key (kbd "<f12>") 'org-agenda)
576(global-set-key (kbd "<f9> c g") 'org-clock-goto)
577(global-set-key (kbd "<f9> c l") 'org-clock-in-last)
578(global-set-key (kbd "<f9> c o") 'org-clock-out)
579(global-set-key (kbd "C-c c") 'org-capture)
580
556#+END_SRC 581#+END_SRC
557** Agenda 582** Agenda
558Rather than using ~C-[~ and ~C-]~ for adding files to the agenda manually this 583Rather than using ~C-[~ and ~C-]~ for adding files to the agenda manually this
@@ -560,6 +585,125 @@ defines directories that include all org files in the agenda.
560#+BEGIN_SRC emacs-lisp 585#+BEGIN_SRC emacs-lisp
561(setq org-agenda-files '("~/org/")) 586(setq org-agenda-files '("~/org/"))
562#+END_SRC 587#+END_SRC
588
589Set up org capture. This feature lets me hit C-c c to quickly capture
590information from any buffer.
591
592#+BEGIN_SRC emacs-lisp
593(setq
594 ;; Define the default file for org-capture items
595 org-default-notes-file "~/org/refile.org"
596
597 ;; Define how many levels to display when refiling org items
598 org-refile-targets (quote ((nil :maxlevel . 3)
599 (org-agenda-files :maxlevel . 3)))
600
601 ;; Show the full org header path when displaying refile options
602 org-refile-use-outline-path t
603
604 ;; Define the menu options for org-capture
605 org-capture-templates (quote
606 (("t" "TODO" entry
607 (file+headline org-default-notes-file "Inbox")
608 "* TODO %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n")
609
610 ("T" "TODO w/ file location" entry
611 (file+headline org-default-notes-file "Inbox")
612 "* TODO %?\n:PROPERTIES:\n:CREATED: %U\n:LOCACTION: %a\n:END:\n%i")
613
614 ("i" "Interrupting Task" entry
615 (file+headline org-default-notes-file "Inbox")
616 "* Started %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
617 :clock-in :clock-resume)
618
619 ("e" "Emacs idea" entry
620 (file+headline "~/org/emacs.org" "Emacs")
621 "* TODO %^{Task}\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
622 :immediate-finish t)
623
624 ("n" "note" entry (file org-default-notes-file)
625 "* %? :NOTE:\n:PROPERTIES:\n:CREATED: %U\n:END:\n%U\n%a\n")
626
627 ("j" "Journal" entry (file+datetree "~/org/diary.org.gpg")
628 "* %u\n%U\n"
629 :unnarrowed t)
630
631 ("w" "Web site" entry (file "~/Code/org/refile.org")
632 "* %a :website:\n:PROPERTIES:\n:CREATED: %U\n:END:\n%:initial")))
633
634
635)
636#+END_SRC
637
638Set up org's TODO system
639
640#+BEGIN_SRC emacs-lisp
641(setq
642 ;; Allows selecting capture method by pressing the letter in the parenthesis
643 ;; after C-c C-t
644 org-use-fast-todo-selection t
645
646 ;; Define the default states for TODO items
647 org-todo-keywords '((sequence "TODO(t)" "NEXT" "STARTED" "WAITING" "|" "DONE(d)" "DELEGATED(g)")
648 (sequence "|" "CANCELED"))
649
650 ;; Define the colors for the TODO states
651 org-todo-keyword-faces '(("NEXT" . "orange")
652 ("STARTED" . "dark yellow")
653 ("WAITING". "dark orange")
654 ("DELEGATED" . "light blue")
655 ("CANCELED" . "dark red"))
656
657 ;; Block parent TODO items which have incomplete child TODO items from being
658 ;; marked DONE
659 org-enforce-todo-dependencies t
660
661 ;; Block parent TODO items which have incomplete check boxes from being
662 ;; marked DONE
663 org-enforce-todo-checkbox-dependencies t
664
665 ;; Log the time a TODO task is marked as DONE
666 org-log-done 'time
667)
668#+END_SRC
669
670org-mode has a built in time tracking system that I like to use.
671
672#+BEGIN_SRC emacs-lisp
673(setq
674 ;; Put clock, state, and note entries into the LOGBOOK drawer
675 org-clock-into-drawer t
676
677 ;; Show a lot of clock history
678 org-clock-history-length 23
679
680 ;; Automatically clock-in if the clock is already open
681 org-clock-in-resume t
682
683 ;; Automatically clock out when a task is marked as done
684 org-clock-out-when-done t
685
686 ;; Quickly changing tasks will add a time of 0 to the log book. These aren't
687 ;; very helpful so they should be removed
688 org-clock-out-remove-zero-time-clocks t
689
690 ;; save running clock and history when exiting and reopening Emacs
691 org-clock-persist t
692
693 ;; Don't prompt when resuming an active clock after close
694 org-clock-persist-query-resume nil
695
696 ;; enable autoresolution for open clocks
697 org-clock-auto-clock-resolution 'when-no-clock-is-running
698
699 ;; Include the current clocked in task in clock reports
700 org-clock-report-include-clocking-task t
701
702 ;; display a warning when idle for x minutes
703 org-clock-idle-time 15
704
705)
706#+END_SRC
563** HTMLize 707** HTMLize
564Styles source code blocks when exporting an org file to HTML 708Styles source code blocks when exporting an org file to HTML
565 709