From mboxrd@z Thu Jan 1 00:00:00 1970 From: amscopub-mail@yahoo.com Subject: Weird bug when babel used in a macro Date: Mon, 16 May 2011 13:36:49 -0700 (PDT) Message-ID: <148857.21069.qm@web120703.mail.ne1.yahoo.com> Reply-To: amscopub-mail@yahoo.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QM4X6-0000HC-1d for emacs-orgmode@gnu.org; Mon, 16 May 2011 16:36:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QM4X4-0002U7-Su for emacs-orgmode@gnu.org; Mon, 16 May 2011 16:36:52 -0400 Received: from nm28.bullet.mail.ne1.yahoo.com ([98.138.90.91]:35491) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QM4X4-0002Tq-K0 for emacs-orgmode@gnu.org; Mon, 16 May 2011 16:36:50 -0400 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: emacs-orgmode@gnu.org 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).