-;; Time-stamp: <2017-10-20 16:47:58 kmodi>
+;; Time-stamp: <2017-10-23 11:30:46 kmodi>
 ;; Hi-lock: (("\\(^;\\{3,\\}\\)\\( *.*\\)" (1 'org-hide prepend) (2 '(:inherit org-level-1 :height 1.3 :weight bold :overline t :underline t) prepend)))
 ;; Hi-Lock: end
 

        ;; Now if a region was selected, and `content' was saved from that,
        ;; paste it back in.
        (when content
          ;; A special case for org source blocks.. need to escape "*" and "#+"
          ;; with commas -- (org) Literal examples.
          (when (string= "org" lang)
            (setq content (org-escape-code-in-string content)))
          (insert content)
          (deactivate-mark)

      ("Q" nil "quit"))

    (defun modi/org-template-maybe ()
      "Insert org-template if point is at the beginning of the
line, or if a region is selected.  Else call
`self-insert-command'."
      (interactive)
      (let ((is-region? (use-region-p)))
        (if (or is-region?
                (and (not is-region?)
                     (looking-back "^[[:blank:]]*")))
            (hydra-org-template/body)
          (self-insert-command 1))))
