diff options
-rw-r--r-- | init.org | 69 | ||||
-rw-r--r-- | lisp/init-org.el | 55 | ||||
-rw-r--r-- | old-init.el | 1 |
3 files changed, 69 insertions, 56 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 diff --git a/lisp/init-org.el b/lisp/init-org.el deleted file mode 100644 index e41a170..0000000 --- a/lisp/init-org.el +++ /dev/null @@ -1,55 +0,0 @@ -(provide 'my/init-org) -(eval-after-load "org" - '(progn - (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-verbatim - org-block-background)) - (set-face-attribute face nil :inherit 'fixed-pitch)))) - - (defun gtd () - (interactive) - (find-file (concat org-directory "/master.org"))))) - -(require 'org) diff --git a/old-init.el b/old-init.el index d01e0cc..669b507 100644 --- a/old-init.el +++ b/old-init.el @@ -105,7 +105,6 @@ (setq tab-width 4) (load "email.el") -(load "init-org.el") (require 'my/init-org) (load "init-ido.el") (load "init-completion.el") |