Sébastien Vauban <wxhgmqzgw...@spammotel.com> writes:

> Hi Eric,
>
> "Eric Schulte" wrote:
>> Sébastien Vauban <wxhgmqzgw...@spammotel.com> writes:
>>> The variables are not exported to HTML (and LaTeX?), making the readability
>>> of such a documented code a bit difficult. Feature or bug?
>>
>> The variable names should be exported to both HTML and LaTeX (when
>> org-export-latex-listings is set to true) when the following declaration
>> schema is used (at least they are for me).
>>
>> #+source: something(x=9)
>> #+begin_src emacs-lisp
>>   x
>> #+end_src
>
> I confirm that variable names are not exported when they don't get a value,
> such as here:
>
> #+source: add-column-in-table(table, column, type, 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
>

Ah, That is the problem.

Babel currently only support variable names *with* default values.  This
simplifies our internal variable handling.  I agree that in the future
it would be good to allow variable names which don't have default values
specified but currently all behavior is undefined when variables
definitions don't have an assignment.

I'm noting this with our variable-handling related development tasks.

Best -- Eric

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to