emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Stop with an error if the LaTeX class is not known to th


From: Sebastien Vauban
Subject: Re: [O] [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
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.91 (windows-nt)

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 <address@hidden>
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]