From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [PATCH] Stop with an error if the LaTeX class is not known to the new exporter Date: Fri, 15 Feb 2013 11:09:51 +0100 Message-ID: <86y5epoplc.fsf@somewhere.org> References: <86pq0eg415.fsf@somewhere.org> <87mwvhmg5z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello Nicolas, Nicolas Goaziou wrote: > "Sebastien Vauban" writes: > >> I've lost (a bit of) time looking at why my documents were wrong with the new >> exporter. The fact is I've customized: >> >> (setq org-e-latex-default-class "myarticle") >> >> but hadn't added yet that private class to the list `org-e-latex-classes'. >> >> The result: a PDF, but completely undreadable, as it's missing the >> `documentclass' directive. >> >> Here a patch to throw an error to the user, signaling he's forgotten some >> pieces of the puzzle, in case he played with such vars. Better stop early, and >> giving hints to the user how to correct the problem, no? >> >> Feel free to adapt it to your wishes. > > Thank you. I have applied it on the soon to be merged back-end. Your fix misses an argument to the error message, hence the `format-string' function is failing. Here is the patch: >From da73b71d13cac5705c8987c87e26a673a52345be Mon Sep 17 00:00:00 2001 From: Sebastien Vauban Date: Fri, 15 Feb 2013 10:54:36 +0100 Subject: [PATCH] Add missing class argument in error string * ox-latex.el (org-latex-template): Add missing `class' argument for `format-string'. --- lisp/ox-latex.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index c135042..9d5b5c5 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1112,7 +1112,7 @@ holding export options." "^[ \t]*\\\\documentclass\\(\\(\\[.*\\]\\)?\\)" class-options header t nil 1))))) (if (not document-class-string) - (user-error "Unknown LaTeX class `%s'") + (user-error "Unknown LaTeX class `%s'" class) (org-latex-guess-babel-language (org-latex-guess-inputenc (org-splice-latex-header -- 1.7.9 Best regards, Seb -- Sebastien Vauban