From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [Babel] Tangling ignores LOB file? Date: Wed, 15 Dec 2010 10:18:18 -0700 Message-ID: <87lj3rkl0r.fsf@gmail.com> References: <80zkshfz0x.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=47962 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PSv4l-0007Wj-Fu for emacs-orgmode@gnu.org; Wed, 15 Dec 2010 12:23:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PSv4k-0005Fh-E7 for emacs-orgmode@gnu.org; Wed, 15 Dec 2010 12:23:39 -0500 Received: from mail-gw0-f48.google.com ([74.125.83.48]:64609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PSv4k-0005Fc-AI for emacs-orgmode@gnu.org; Wed, 15 Dec 2010 12:23:38 -0500 Received: by gwaa20 with SMTP id a20so1572776gwa.35 for ; Wed, 15 Dec 2010 09:23:37 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi Seb, I just pushed up a fix which should allow noweb references to be resolved using the library of babel. Thanks -- Eric S=C3=A9bastien Vauban writes: > #+TITLE: Tangling process ignores LOB? > #+DATE: 2010-12-07 > #+LANGUAGE: en_US > > #+BABEL: :cmdline -S server -U user -P password -d database -n -w 700 :re= sults output :exports both > > * Abstract > > References to named code blocks located in a LOB file seem to be ignored = by > the tangling process. > > * Example > > ** Common code > > These 2 SQL code blocks are, and will be, reused all over the place: > > #+srcname: set-count-off > #+begin_src sql :eval never > -- no longer display the count message > SET NOCOUNT ON > #+end_src > > #+srcname: defvar-now > #+begin_src sql :eval never > DECLARE @now smalldatetime > SET @now =3D CONVERT(smalldatetime, > CAST(YEAR(GETDATE()) AS char(4)) + '-' + > CAST(MONTH(GETDATE()) AS char(2)) + '-' + > CAST(DAY(GETDATE()) AS char(2)) + ' ' + > CAST(DATEPART(hh, GETDATE()) AS char(2)) + ':' + > CAST(DATEPART(mi, GETDATE()) AS char(2)) + ':' + > '00', > 120) -- ODBC canonical > #+end_src > > ** Specific code > > For example, I use them here: > > #+begin_src sql :engine msosql :noweb yes > <> > <> > SELECT TOP 5 @now AS now > FROM table > #+end_src > > #+results: > | now | > | ------------------- | > | 2010-12-07 15:14:00 | > | 2010-12-07 15:14:00 | > | 2010-12-07 15:14:00 | > | 2010-12-07 15:14:00 | > | 2010-12-07 15:14:00 | > | | > > And it works (see the /results/ table). But... > > * Problem > > If I put the *common code blocks* into some LOB file (i.e., I move them o= ut of > this file) and ingest it, then the specific code does not properly run > anymore. > > In other words, it seems that the tangle process does not take into accou= nt > the code blocks located in the LOB. > > Best regards, > Seb