From mboxrd@z Thu Jan  1 00:00:00 1970
From: cberry@tajo.ucsd.edu
Subject: [BUG] org-export-with-current-buffer-copy drops local variable
 WAS:Re: new exporter - noweb substitution issues
Date: Wed, 21 Nov 2012 21:10:46 -0800
Message-ID: <87txsi8bop.fsf_-_@tajo.ucsd.edu>
References: <87ehjogdgb.fsf@tajo.ucsd.edu> <87a9ubbh3j.fsf@tajo.ucsd.edu>
Mime-Version: 1.0
Content-Type: text/plain
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([208.118.235.92]:37471)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1TbP3z-0004wq-Bb
	for emacs-orgmode@gnu.org; Thu, 22 Nov 2012 00:11:00 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1TbP3y-0000FP-3l
	for emacs-orgmode@gnu.org; Thu, 22 Nov 2012 00:10:59 -0500
Received: from plane.gmane.org ([80.91.229.3]:44485)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1TbP3x-0000FL-Tq
	for emacs-orgmode@gnu.org; Thu, 22 Nov 2012 00:10:58 -0500
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geo-emacs-orgmode@m.gmane.org>) id 1TbP46-00063e-Lm
	for emacs-orgmode@gnu.org; Thu, 22 Nov 2012 06:11:06 +0100
Received: from tajo.ucsd.edu ([137.110.122.165])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Thu, 22 Nov 2012 06:11:06 +0100
Received: from cberry by tajo.ucsd.edu with local (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <emacs-orgmode@gnu.org>; Thu, 22 Nov 2012 06:11:06 +0100
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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

cberry@tajo.ucsd.edu writes:

> cberry@tajo.ucsd.edu writes:
>
>> When I tried to export a large subtree, it took over *5 minutes* to
>> export with release_7.9.2-597-gd4b739.
>>
>> Using the contrib/lisp/*.el files from org-mode-7.8.11
>> it took *5 seconds*.
>>
[...]
>>
>> Both cases use:
>>
>>   # Local variables:
>>   # *org-babel-use-quick-and-dirty-noweb-expansion*:t
>
[...]
>
> Could it be that the buffer local version
> of *org-babel-use-quick-and-dirty-noweb-expansion* got lost??
>

The answer is "YES".

org-export-with-current-buffer-copy calls org-clone-local-variables
which uses a regexp to detect buffer-local variables, but
*org-babel-use-quick-and-dirty-noweb-expansion* is not detected, so it
gets dropped.

Solution add "\\*org-babel-use-.*dirty.*\\*\\|" or something like that
to the regexp.

Chuck