From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
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 [thread overview]
Message-ID: <86y5epoplc.fsf@somewhere.org> (raw)
In-Reply-To: 87mwvhmg5z.fsf@gmail.com
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 <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
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
next prev parent reply other threads:[~2013-02-15 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 15:43 [PATCH] Stop with an error if the LaTeX class is not known to the new exporter Sebastien Vauban
2013-02-06 0:15 ` Eric S Fraga
2013-02-06 7:33 ` Sebastien Vauban
2013-02-06 18:49 ` Nicolas Goaziou
2013-02-15 10:09 ` Sebastien Vauban [this message]
2013-02-15 13:23 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y5epoplc.fsf@somewhere.org \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).