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





_______________________________________________
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

Reply via email to