emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Weird bug when babel used in a macro


From: amscopub-mail
Subject: [O] Weird bug when babel used in a macro
Date: Mon, 16 May 2011 13:36:49 -0700 (PDT)

Sample ORG file:

  #+MACRO: test src_emacs-lisp[:results raw]{(let (mRef) (progn (if (string= 
"$2" "1") (setq mRef "A") (if (string= "$2" "2") (setq mRef "B") (setq mRef 
"C"))) (concat "Test $1" mRef ": ")))}

  * *Hello World*

  {{{test(1,1)}}}

Desired HTML export:

   Test 1.A

Actual HTML export:

The babel macro takes the 2nd argument and maps it to the following: 1 => A, 2 
=> B, Everything else => C. Yeah, it may be convoluted, but it gets the job 
done i.e., the actual HTML file is fine.

HOWEVER, I get this error during the export process: 

  "No match - create this as a new heading? (y or n)" 

If you select "y", it adds an extra heading to the file. This heading is 

  * Hello World* (same heading minus the *)

If you un-bold the heading (change the heading to "* Hello World"), it exports 
fine. For some reason when the actual heading starts with a * character, it is 
throwing "something" off...

Using 7.4 (I'm in a production environment, so I can't upgrade right now).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]