                 (replace-regexp "\\[\\[.*?\\(\\]\\[\\(.*?\\)\\)*\\]\\]" "\\2"
                                 nil start end)))))))
 
-    ;; epresent
+    ;; Update TODAY macro with current date
+    (defun modi/org-update-TODAY-macro (&rest ignore)
+      "Update TODAY macro to hold string with current date."
+      (interactive)
+      (when (derived-mode-p 'org-mode)
+        (save-excursion
+          (goto-char (point-min))
+          (while (re-search-forward
+                  "^\\s-*#\\+MACRO:\\s-+TODAY"
+                  nil 'noerror)
+            (forward-line 0)
+            (when (looking-at ".*TODAY\\(.*\\)")
+              (replace-match
+               (concat " "
+                       (format-time-string "%b %d %Y, %a" (current-time)))
+               :fixedcase :literal nil 1))))))
+    (add-hook 'org-export-before-processing-hook #'modi/org-update-TODAY-macro)
+
+;;;; org-linkid - Support markdown-style link ids
+    (use-package org-linkid
+      :load-path "elisp/org-linkid")
+
+;;; Diagrams
+    ;; http://pages.sachachua.com/.emacs.d/Sacha.html
+    (setq org-ditaa-jar-path (expand-file-name
+                              "ditaa.jar"
+                              (concat user-emacs-directory "software/")))
+    (setq org-plantuml-jar-path (expand-file-name
+                                 "plantuml.jar"
+                                 (concat user-emacs-directory "software/")))
+
+    ;; (setq org-startup-with-inline-images t)
+    ;; (add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
+
+    (org-babel-do-load-languages
+     'org-babel-load-languages '((ditaa    . t)   ; activate ditaa
+                                 (plantuml . t)   ; activate plantuml
+                                 (latex    . t)   ; activate latex
+                                 (dot      . t))) ; activate graphviz
+
+;;; Confirm evaluate
+    (defun my-org-confirm-babel-evaluate (lang body)
+      (and (not (string= lang "ditaa"))    ; don't ask for ditaa
+           (not (string= lang "plantuml")) ; don't ask for plantuml
+           (not (string= lang "latex"))    ; don't ask for latex
+           (not (string= lang "dot"))      ; don't ask for graphviz
+           ))
+    (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
+    (setq org-confirm-elisp-link-function 'yes-or-no-p)
+
+;;; epresent
     (use-package epresent
       :commands (epresent-run))
 
-    ;; org-tree-slide
+;;; org-tree-slide
     ;; https://github.com/takaxp/org-tree-slide
     (use-package org-tree-slide
       :load-path "elisp/org-tree-slide"

    ;; http://orgmode.org/manual/Easy-Templates.html
    ;; http://oremacs.com/2015/03/07/hydra-org-templates
    ;; https://github.com/abo-abo/hydra/wiki/Org-mode-block-templates
    (defhydra hydra-org-template (:color blue :hint nil)
      "
_c_enter  _q_uote     _e_macs-lisp    _L_aTeX:

          :load-path "elisp/org-include-img-from-archive")
        ))

;;; Bindings
    ;; http://endlessparentheses.com/emacs-narrow-or-widen-dwim.html
    ;; Pressing `C-x C-s' while editing org source code blocks saves and exits
    ;; the edit.
