emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Weird bug when babel used in a macro
@ 2011-05-16 20:36 amscopub-mail
  0 siblings, 0 replies; only message in thread
From: amscopub-mail @ 2011-05-16 20:36 UTC (permalink / raw)
  To: emacs-orgmode

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).

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-16 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-16 20:36 Weird bug when babel used in a macro amscopub-mail

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).