emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [babel] Some variables with no default value don't provoke an error


From: Sebastien Vauban
Subject: [O] [babel] Some variables with no default value don't provoke an error
Date: Wed, 14 Sep 2011 11:05:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (windows-nt)

Hi Eric,

As said previously, I've been forced to add a default value to many code
blocks I had in my local LOB, which I ingest in my `.emacs' file:

#+begin_src emacs-lisp
 (when (try-require 'ob-lob)
   (org-babel-lob-ingest "~/emacs/site-lisp/my-local-lob.org"))
#+end_src

Weirdly enough, in the following code block, I must add a default value for
vars `table', `column' and `type' but not for the var `nullability'.

I've even been able to add fake vars `something' and `else' with no error
being reported (at ingestion time):

#+srcname: add-column-in-table(table="", column="", something, type="", else, 
nullability)
#+begin_src sql
-- add column `$column' (if column does not exist yet)
IF NOT EXISTS (SELECT *
               FROM INFORMATION_SCHEMA.COLUMNS
               WHERE TABLE_NAME = '$table'
               AND COLUMN_NAME = '$column')
BEGIN
    ALTER TABLE $table
    ADD $column $type $nullability
END
#+end_src

Note that, in the above state, the code block is ingested with no error, but,
if I remove the default value of var `table', it then generates back an
error...

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]