 ;; (add-to-list 'org-export-latex-packages-alist '("" "minted")) in org version < 8.0
 
 (use-package ox-latex
-  :config
+  :idle
   (progn
     ;; Previewing latex fragments in org mode
     ;; http://orgmode.org/worg/org-tutorials/org-latex-preview.html

  (org-capture 0))

(add-hook 'org-agenda-mode-hook
          (lambda ()
            ;; Override the key definition for org-exit
            (define-key org-agenda-mode-map "x" 'sacha/org-agenda-done)
            (define-key org-agenda-mode-map "X" 'sacha/org-agenda-mark-done-and-add-followup)
            ;; New key assignment
            (define-key org-agenda-mode-map "N" 'sacha/org-agenda-new)))

;; org-ref - JKitchin
;; http://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citations-and-references/

;; Pressing `C-x C-s' while editing org source code blocks saves and exits
;; the edit.
(with-eval-after-load 'org-src
  (bind-key "C-x C-s" #'org-edit-src-exit org-src-mode-map))

;; ;; Enable org export to odt (OpenDocument Text)
;; ;; It is disabled by default in org 8.x
