From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Richard Subject: Re: Loading several latex classes for ox-latex Date: Wed, 10 Jul 2013 15:33:28 +0200 Message-ID: <871u7635g7.fsf@yahoo.fr> References: <87wqoy4k8q.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwuWH-0003DH-ML for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 09:33:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwuWG-0007WK-Gj for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 09:33:21 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:40298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwuWG-0007Vt-AS for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 09:33:20 -0400 In-Reply-To: <87wqoy4k8q.fsf@free.fr> (Julien Cubizolles's message of "Wed, 10 Jul 2013 15:28:37 +0200") 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: Julien Cubizolles Cc: emacs-orgmode@gnu.org Julien Cubizolles writes: > I tried the following: > --8<---------------cut here---------------start------------->8--- > (eval-after-load 'ox-latex > (progn '(add-to-list 'org-latex-classes > '("mpsi_beamer" "\\documentclass{mpsi_beamer}\n [NO-DEFAULT-PACKAGES]" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > )) > '(add-to-list 'org-latex-classes > '("mpsi" "\\documentclass[cours,Version,colonne]{mpsi}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > )) > )) > --8<---------------cut here---------------end--------------->8--- > > but only the second one (mpsi) is loaded. that's because your (progn) is unquoted and thus evaluated at the same time as eval-after-load, i.e. it returns its last value (which is the second add-to-list form) and that is what is being added to the eval-after-load list. What you want is the whole (progn) added there, so an easy fix probably is to say '(progn ...) *and* remove the quotes around the calls to add-to-list. -- Nico.