summaryrefslogtreecommitdiff
path: root/settings/setup-org-mode.el
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--settings/setup-org-mode.el84
1 files changed, 58 insertions, 26 deletions
diff --git a/settings/setup-org-mode.el b/settings/setup-org-mode.el
index a2ec85f..bef8ba1 100644
--- a/settings/setup-org-mode.el
+++ b/settings/setup-org-mode.el
@@ -1,31 +1,63 @@
;; Pretty bullets
-(add-hook 'org-mode-hook (lambda() (org-bullets-mode 1)))
-
-(setq org-log-done 'time)
-(setq org-src-fontify-natively t)
-(setq org-src-tab-acts-natively t)
-(setq org-todo-keywords
- '((sequence "TODO" "IN-PROGRESS" "BLOCKED" "DONE")))
-(setq org-tag-alist
- '((:startgroup . nil)
- ("blocker" . ?b)
- ("!critical" . ?u)
- ("!major" . ?m)
- ("!minor" . ?n)
- ("!trivial" . ?t)
- (:endgroup . nil)
- ("@home" . ?h)
- ("@store" . ?s)
- ("@work" . ?w)
- ("reading" . ?r)
- ("studying" . ?s)
- ("implementation" . ?i)))
-
(global-set-key (kbd "C-c a") 'org-agenda)
-(org-babel-do-load-languages
- 'org-babel-load-languages
- '((emacs-lisp . t)
- (python . t)))
+;; open org mode planner
+(global-set-key (kbd "C-c b")
+ (lambda () (interactive)
+ (delete-other-windows)
+ (find-file "~/workspace/.org/planner.org")))
+
+(require 'rainbow-mode)
+(add-hook 'org-mode-hook 'rainbow-mode)
+
+(setq org-base-directory "~/workspace/.org")
+
+(setq
+ org-export-html-postamble nil
+ org-log-done 'note
+ org-todo-keywords '((sequence "Todo" "In-Progress" "Waiting" "Done"))
+ org-agenda-files (list "~/workspace/.org/planner.org"))
+
+;; org publish
+(require 'ox-publish)
+
+(defun publishing-entry (project)
+ `(,project
+ :base-directory ,(concat org-base-directory "/" project)
+ :base-extension "org"
+ :headline-levels 4
+ :html-head-include-default-style nil
+ :html-head-include-scripts nil
+ :html-head-extra ,(concat "<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/style.css\"")
+ :html-mathjax nil
+ :html-preamble nil
+ :html-validation-link nil
+ :publishing-directory ,(concat org-base-directory "/" project "/public/")
+ :publishing-function org-html-publish-to-html
+ :recursive t
+ :section-numbers nil
+ :time-stamp-file nil
+ :with-toc nil
+ :with-author nil
+ :with-creator nil))
+
+(defun publishing-static (project)
+ `(,(concat project "-static")
+ :base-directory ,(concat org-base-directory "/" project)
+ :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
+ :publishing-directory ,(concat org-base-directory "/" project "/public/")
+ :recursive t
+ :publishing-function org-publish-attachment))
+
+(setq
+ projects '("rse8.com")
+ org-html-htmlize-output-type 'css)
+
+(setq org-publish-project-alist
+ `(
+ ,@(mapcar (lambda (proj) (publishing-entry proj)) projects)
+ ,@(mapcar (lambda (proj) (publishing-static proj)) projects)
+ ("rse8-site" :components ("rse8.com" "rse8.com-static"))
+ ))
(provide 'setup-org-mode)