From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: #+INCLUDE causes error when it attmepts to expand a LaTeX macro in source block Date: Sun, 08 Dec 2019 09:46:46 +0100 Message-ID: <87tv6btdah.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44165) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idsDV-0002H0-DB for emacs-orgmode@gnu.org; Sun, 08 Dec 2019 03:47:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idsDR-0000Hk-EY for emacs-orgmode@gnu.org; Sun, 08 Dec 2019 03:47:00 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59891) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1idsDP-0000DK-SB for emacs-orgmode@gnu.org; Sun, 08 Dec 2019 03:46:56 -0500 In-Reply-To: (Charles Millar's message of "Sat, 7 Dec 2019 22:07:27 -0500") 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" To: Charles Millar Cc: "emacs-orgmode@gnu.org" Hello, Charles Millar writes: > In my init file I have > > (setq org-confirm-babel-evaluate nil) This is totally unrelated to inclusion, see below. > File "A" is attached as an org file. I evaluate the source blocks (C-c > C-v s), the table is generated and then I export it to PDF. The source > blocks do not evaluate during export. > > In file B I have > > #+INCLUDE: "/path/to/FileA::*SCHEDULE A1112" > > When I attempt to export File B to PDF/LaTeX the following error occurs > > Debugger entered--Lisp error: (error "Undefined Org macro: cmhfill; > aborting") > signal(error ("Undefined Org macro: cmhfill; aborting")) > error("Undefined Org macro: %s; aborting" "cmhfill") > [...] > Also, please note that the cmhfill macro is in the table headings. This is the problem, IMO. > Is this an error, i.e. the #+INCLUDE does not honor the setting in my > init file? Generally speaking, INCLUDE does not honor any Babel related setting because inclusion happens before almost anything else (e.g., Babel) during the export process. But I don't think this is related to your issue. > Is there a header or property setting for File B to prevent the exporter > from evaluating the source blocks when executing through an #+INCLUDE, > more particularly to prevent the attempted macro expansion within the > source blocks? Org does not expand within source blocks. It tried to expand macro in your table header, but cannot find the macro definitions. > > Both File A and File B had identical LaTeX settings, i.e. the macro was > defined in both files. Where is it defined? I cannot see it. Regards, -- Nicolas Goaziou