From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Hofer Subject: Re: Problem with sectioning function for LaTeX export Date: Fri, 30 Apr 2010 01:05:18 +0200 Message-ID: References: <87aasmxxvh.wl%sebhofer@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7cnn-00041P-0R for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 19:05:51 -0400 Received: from [140.186.70.92] (port=56466 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7cnk-00040T-F1 for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 19:05:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7cng-0004zK-PY for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 19:05:48 -0400 Received: from lo.gmane.org ([80.91.229.12]:37191) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7cng-0004z9-Ez for emacs-orgmode@gnu.org; Thu, 29 Apr 2010 19:05:44 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O7cnc-0008Pm-JT for emacs-orgmode@gnu.org; Fri, 30 Apr 2010 01:05:40 +0200 Received: from d86-33-46-75.cust.tele2.at ([86.33.46.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Apr 2010 01:05:40 +0200 Received: from sebhofer by d86-33-46-75.cust.tele2.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Apr 2010 01:05:40 +0200 In-Reply-To: <87aasmxxvh.wl%sebhofer@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Oh, nevermind. I figured it out, (cons Heading (cons "\section[year]{%s}" "\section*[year]{%s}")) solves the problem. I guess I really need to learn more about the different types of sequences in lisp. Sorry for that. Cheers, Sebastian On 29.04.10 14:10 Uhr, Sebastian Hofer wrote: > Hi Carsten, > thanks for your reply! > > At Tue, 27 Apr 2010 17:44:07 +0200, > Carsten Dominik wrote: >> I think it must be >> >> ("Heading" "\section[year]{%s}" "\section*[year]{%s}") >> >> Note the %s for the heading, and also it i just one flat list of 3 >> items. >> >> And yes, this is not too well documented. > > I tried that actually but to no avail. I tracked down the problem to the following code in org-latex.el > > (if (consp (cdr sec)) > (setq start (nth (if num 0 2) sec) > end (nth (if num 1 3) sec)) > (setq start (if num (car sec) (cdr sec)))) > > For a flat list as you suggested sec is ("\section[year]{%s}" "\section*[year]{%s}"). The thing is that then (consp (cdr sec)) evaluates to true, which I think is not the supposed behaviour. Replacing (cdr sec) by (cadr sec) would fix this. Is this a bug or just me being too stupid? > > On another subject: Wouldn't it be nice if the properties of the current headline would be accessible by the sectioning function? I think that would proof very powerful to create customized export classes (together with customized latex commands). And I guess it would be quite easy to implement, right? > > Anyway, thanks for your help (and of course for your great work on org-mode, I really love it!) > Sebastian > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode >