From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lewis Subject: #+LaTeX_CLASS regex too restrictive? Date: Sat, 29 Oct 2011 12:19:09 +0100 Message-ID: <877h3om4eq.wl%richard.lewis@gold.ac.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK6wV-0007dx-7J for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 07:19:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RK6wT-00041R-TY for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 07:19:15 -0400 Received: from out5.smtp.messagingengine.com ([66.111.4.29]:44973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK6wT-00040c-Kf for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 07:19:13 -0400 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 265B92091A for ; Sat, 29 Oct 2011 07:19:11 -0400 (EDT) Received: from toverstaf.gold.ac.uk.mail.messagingengine.com (host81-141-145-47.wlms-broadband.com [81.141.145.47]) by mail.messagingengine.com (Postfix) with ESMTPSA id A85F1483442 for ; Sat, 29 Oct 2011 07:19:10 -0400 (EDT) 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi there, I updated my org-mode repository last night and found today that my LaTeX export wasn't working anymore because it couldn't find the LaTeX class: "No definition for class `%s' in `org-export-latex-classes'". The class name I'm using includes "/" characters. However, the regex for matching #+LaTeX_CLASS allows only alphabetic characters or "-". The following change fixed this for me, but perhaps it's now a little too inclusive? diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 649e4a7..e9502ae 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1346,7 +1346,7 @@ LEVEL indicates the default depth for export." (save-restriction (widen) (goto-char (point-min)) - (and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\([-a-zA-Z]+\\)" nil t) + (and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\(.+\\)$" nil t) (match-string 1)))) (plist-get org-export-latex-options-plist :latex-class) org-export-latex-default-class) Best, Richard -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Lewis ISMS, Computing Goldsmiths, University of London Tel: +44 (0)20 7078 5134 Skype: richardjlewis JID: ironchicken@jabber.earth.li http://www.richardlewis.me.uk/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-