Files
emacs.d/elisp/org-setup.el
2018-03-28 21:38:28 -03:00

67 lines
1.8 KiB
EmacsLisp

;; The following lines are always needed. Choose your own keys.
;; Org mode keys
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-iswitchb)
;; org publish
(require 'ox-publish)
(setq org-publish-project-alist
'(("org-notes"
:base-directory "~/repos/csphy/website/org/"
:base-extension "org"
:publishing-directory "~/repos/csphy/website/jekyll/"
:recursive t
:publishing-function org-html-publish-to-html
:headline-leves 4 ;Just the default for this project.
:html-extension "html"
:body-only f ;; Only export section between <body> </body>
)
("org-static"
:base-directory "~/repos/csphy/website/org/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|php"
:publishing-directory "~/repos/csphy/website/"
:recursive t
:publishing-function org-publish-attachment
)
("org" :components ("org-notes" "org-static"))))
;; preserve indentation on output
(setq org-src-preserve-indentation t)
;; some config for org-babel
(setq org-confirm-babel-evaluate nil
org-src-fontify-natively t
org-src-tab-acts-natively t
org-hide-emphasis-markers t)
;; use js2-mode instead of js-mode in org-mode
(add-to-list 'org-src-lang-modes '("js" . js2))
;; load languages babel
(org-babel-do-load-languages
'org-babel-load-languages
'((C . t)
(js . t)
(emacs-lisp . t)
(eukleides . t)
(haskell . t)
(scheme . t)
(shell . t)))
;;bullets in org-mode
(require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
;; default apps to open files with org-mode
(setq org-file-apps
(quote
((auto-mode . emacs)
("\\.mm\\'" . default)
("\\.x?html?\\'" . "seamonkey")
("\\.pdf\\'" . "mupdf %s")
("\\.djvu\\'" . "djview %s"))))