From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] [bug] org-babel-use-quick-and-dirty-noweb-expansion Date: Mon, 19 Mar 2012 10:39:19 -0400 Message-ID: <87ipi0ac4o.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9dsC-0003Qm-Mu for emacs-orgmode@gnu.org; Mon, 19 Mar 2012 10:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9ds2-000563-DV for emacs-orgmode@gnu.org; Mon, 19 Mar 2012 10:47:48 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:48681) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S9ds2-00055m-74 for emacs-orgmode@gnu.org; Mon, 19 Mar 2012 10:47:38 -0400 In-Reply-To: (Nicolas Girard's message of "Sun, 18 Mar 2012 21:23:47 +0100") 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: Nicolas Girard Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Nicolas, Thanks for bringing up this bug. I'm attaching a patch to this email, once the current repositories issues are resolved I'll apply this patch to the repository. In the interim, you can apply this patch to your local copy of the git repository with. $ cd your/path/to/org $ git am /tmp/0001-fix-bug-in-src-name-regexp-when-using-org-babel-use-.patch --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-fix-bug-in-src-name-regexp-when-using-org-babel-use-.patch >From 13a43222a0ab8594647584844f1765e6f130d69e Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 19 Mar 2012 10:37:04 -0400 Subject: [PATCH] fix bug in src name regexp when using *org-babel-use-quick-and-dirty-noweb-expansion* * lisp/ob.el (org-babel-expand-noweb-references): Fix bug in src name regexp when using *org-babel-use-quick-and-dirty-noweb-expansion*. --- lisp/ob.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob.el b/lisp/ob.el index 9205a20..2e48524 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -2186,7 +2186,7 @@ block but are passed literally to the \"example-block\"." (when (org-babel-ref-goto-headline-id source-name) (org-babel-ref-headline-body))) ;; find the expansion of reference in this buffer - (let ((rx (concat rx-prefix source-name)) + (let ((rx (concat rx-prefix source-name "[ \t\n]")) expansion) (save-excursion (goto-char (point-min)) -- 1.7.9.4 --=-=-= Content-Type: text/plain Best, Nicolas Girard writes: > Hi all, > I've been succesfully using babel to make various literate programming work. > Unfortunately, tangling performance has dramatically decreased, to the > point of being barely usable. > I wish I could get advantage of the "quick & dirty noweb expansion" Eric > introduced in january, but it has an undesirable side effect. Consider the > following minimal example: > > ##### > #+name: abc > #+begin_src latex > Abc<> > #+end_src > > #+name: abc-d > #+begin_src latex > Def > #+end_src > > #+begin_src latex :noweb yes :tangle test.tex > <> > #+end_src > ##### > > Tangling with *org-babel-use-quick-and-dirty-noweb-expansion* set to nil > gives > > ##### > AbcDef > ##### > > while tangling with *org-babel-use-quick-and-dirty-noweb-expansion* set to > t gives > > ##### > AbcDef > Def > ##### > > I'd be very happy if this bug could be tracked down. > Thanks very much in advance ! > Cheers, > > Nicolas -- Eric Schulte http://cs.unm.edu/~eschulte/ --=-=-=--