             (setq content (org-escape-code-in-string content)))
           (insert content)
           (deactivate-mark)
-          (when post-src ;Case where user needs to specify the #+BEGIN_SRC language
-            (goto-char post-src)))))
+          (when post-src-export ;Case where user needs to specify the #+BEGIN_SRC language,
+            (goto-char post-src-export))))) ;or the #+BEGIN_EXPORT backend.
 
     (defhydra hydra-org-template (:color blue
                                   :hint nil)


    ;; Sun Nov 05 09:30:51 EST 2017 - kmodi
    ;; Copy of the old "Easy Templates" feature that was removed in
    ;; http://orgmode.org/cgit.cgi/org-mode.git/diff/lisp/org.el?id=c04e357f3d5d93484277a7e439847b1233b872bd
    (defcustom org-easy-template-alist  ;Old `org-structure-template-alist'
      '(("s" "#+BEGIN_SRC ?\n\n#+END_SRC")
        ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE")
        ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE")

        ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM")
        ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER")
        ("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT")
        ("X" "#+BEGIN_EXPORT ?\n\n#+END_EXPORT")
        ("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT")
        ("L" "#+LaTeX: ")
        ("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT")
