From: "Eric Schulte" <schulte.eric@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Babel] Tangling ignores LOB file?
Date: Wed, 15 Dec 2010 10:18:18 -0700 [thread overview]
Message-ID: <87lj3rkl0r.fsf@gmail.com> (raw)
In-Reply-To: 80zkshfz0x.fsf@missioncriticalit.com
Hi Seb,
I just pushed up a fix which should allow noweb references to be
resolved using the library of babel.
Thanks -- Eric
Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> 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 :results 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 = 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
> <<set-count-off>>
> <<defvar-now>>
> 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 out 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 account
> the code blocks located in the LOB.
>
> Best regards,
> Seb
next prev parent reply other threads:[~2010-12-15 17:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 14:17 [Babel] Tangling ignores LOB file? Sébastien Vauban
2010-12-15 17:18 ` Eric Schulte [this message]
2010-12-20 14:13 ` Sébastien Vauban
2010-12-20 15:31 ` Sébastien Vauban
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lj3rkl0r.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=wxhgmqzgwmuf@spammotel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).