From ce79e36ff06ef6021628795d6410350e7b2ec703 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 6 Feb 2013 19:47:35 +0100 Subject: [PATCH] ox-latex/ox-beamer: Provide an error when LaTeX class is invalid MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lisp/ox-beamer.el (org-beamer-template): Provide an error when LaTeX class is invalid. * lisp/ox-latex.el (org-latex-template): Provide an error when LaTeX class is invalid. Patch suggested by Sébastien Vauban --- lisp/ox-beamer.el | 3 ++- lisp/ox-latex.el | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 5a87effc6..921bab6eb 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -828,7 +828,8 @@ holding export options." (replace-regexp-in-string "^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)" class-options header t nil 1))))) - (when document-class-string + (if (not document-class-string) + (user-error "Unknown LaTeX class `%s'") (org-latex-guess-babel-language (org-latex-guess-inputenc (org-splice-latex-header diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index d8a2af431..a49be0c37 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1108,7 +1108,8 @@ holding export options." (replace-regexp-in-string "^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)" class-options header t nil 1))))) - (when document-class-string + (if (not document-class-string) + (user-error "Unknown LaTeX class `%s'") (org-latex-guess-babel-language (org-latex-guess-inputenc (org-splice-latex-header -- 2.11.4.GIT