From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Buffer local value lost when exporting? (was Evaluate all org tables in file before exporting) Date: Fri, 13 May 2016 08:04:40 +0100 Message-ID: <87mvnujv5j.fsf@ucl.ac.uk> References: <1ce7789874d84d4d861eabf587693621@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b179c-00008R-C4 for emacs-orgmode@gnu.org; Fri, 13 May 2016 03:04:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b179W-0003Sz-9L for emacs-orgmode@gnu.org; Fri, 13 May 2016 03:04:55 -0400 Received: from mail-db3on0136.outbound.protection.outlook.com ([157.55.234.136]:54271 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b179V-0003R8-VM for emacs-orgmode@gnu.org; Fri, 13 May 2016 03:04:50 -0400 In-Reply-To: <1ce7789874d84d4d861eabf587693621@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Kaushal Modi's message of "Thu, 12 May 2016 15:54:09 +0000") 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: Kaushal Modi Cc: emacs-org list On Thursday, 12 May 2016 at 15:54, Kaushal Modi wrote: > Hi all, > > I almost have a squeaky clean solution to this thanks to the hint > provided by someone on emacs.SE ( > http://emacs.stackexchange.com/a/22215/115 ). > > But in the process, I seem to have stumbled upon a bug.. the buffer > local value of variables are not respected at the time of exports. It's not a bug but a known design feature. A new buffer is created as part of the export process and this buffer does not inherit local variable values. What you need to do is tell org to set specific variables upon export. You can use the #+BIND: directive to do this. I don't know where this is documented but there is mention of whether to allow this to happen in the org info manual: If =E2=80=98org-export-allow-bind-keywords=E2=80=99 is non-=E2=80=98nil= =E2=80=99, Emacs variables can become buffer-local during export by using the BIND keyword. Its syntax is =E2=80=98#+BIND: variable value=E2=80=99. This is particularl= y useful for in-buffer settings that cannot be changed using specific keywords. Give this a try. --=20 : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-775-g3308a5