diff options
Diffstat (limited to 'init.org')
-rw-r--r-- | init.org | 69 |
1 files changed, 69 insertions, 0 deletions
@@ -175,6 +175,74 @@ no Internet connection. (init--install-packages)))) #+END_SRC +* TODO Org-mode +This is my org mode configuration. Document it. + +#+BEGIN_SRC elisp :noweb-ref org-mode-part1 +(setq org-ellipsis "⤵") +(setq org-src-fontify-natively t) + +(global-set-key (kbd "C-c o l") 'org-store-link) +(global-set-key (kbd "C-c o a") 'org-agenda) + +;; TODO: make these available in org-mode only +(global-set-key (kbd "C-c o s") 'org-schedule) +(global-set-key (kbd "C-c o c") 'org-capture) + +(setq org-log-done t) +(setq org-return-follows-link t) + +(setq org-directory "~/Documents/org") +(setq org-agenda-files (mapcar (lambda (x) (concat org-directory x)) + (list "/master.org" + "/work.org" + "/study.org" + "/home.org"))) +(setq org-default-notes-file (concat org-directory "/notes.org")) + +(setq org-agenda-custom-commands + '(("w" todo "WAITING" nil) + ("n" todo "NEXT" nil) + ("d" "Agenda + Next Actions" ((agenda) (todo "NEXT"))))) + +(defun my/modify-org-done-face () + (setq org-fontify-done-headline t) + (set-face-attribute 'org-done nil :strike-through t) + (set-face-attribute 'org-headline-done nil + :strike-through t + :foreground "light gray")) + +(require 'org-bullets) +(add-hook 'org-add-hook 'my/modify-org-done-face) +(add-hook 'org-mode-hook + (lambda () + (org-bullets-mode 1) + + ;; render with variable pitch font (with a few exceptions) + (variable-pitch-mode 1) + (dolist (face '(org-block-begin-line + org-block-end-line + org-table + org-verbatim + org-block-background)) + (set-face-attribute face nil :inherit 'fixed-pitch)))) + +(defun gtd () + (interactive) + (find-file (concat org-directory "/master.org"))) +#+END_SRC + +And here’s how to load it lazily: + +#+BEGIN_SRC elisp :noweb-ref org-mode +(provide 'my/init-org) +(eval-after-load "org" + '(progn + <<org-mode-part1>> + )) +(require 'org) +#+END_SRC + * TODO Initial stuff :PROPERTIES: :noweb-ref: initial @@ -248,6 +316,7 @@ put them all together to build the init file <<initial>> <<packages>> <<initial-after-packages>> +<<org-mode>> (load "~/.emacs.d/old-init.el") #+END_SRC |