emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: [Babel] How to pass variables to SQL blocks?


From: Sébastien Vauban
Subject: [Orgmode] Re: [Babel] How to pass variables to SQL blocks?
Date: Mon, 13 Dec 2010 22:23:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Eric,

"Eric Schulte" wrote:
> Sébastien Vauban <address@hidden> writes:
>> (I thought this feature would be implemented using "real" SQL vars, hence my 
>> @
>> prefix. But viewing the code shows the replacement is made outside of the SQL
>> snippet's knowledge.)
>
> I agree that using real SQL variables would be preferable.  If you want
> to submit a patch to this effect I would be happy to review it and apply.

I'll give a shot -- not in the really short term, though. Which example should
I look at?  shell?


>> Maybe the following should be put on some TODO list, even if not urgent?
>>
>>>> * No warning if block does not exist
>>>>
>>>> Please note that inexistent references are ignored, without further
>>>> notice. That's the case for such a block (where I forgot the number
>>>> suffix):
>>>>
>>>> #+srcname: contains-inexistent-ref
>>>> #+begin_src sql :noweb yes
>>>> <<add-column-in-table>>
>>>> #+end_src
>
> The lack of notice (or error) was originally intentional.  The logic
> being that there may be languages in which <<something>> constructs are
> part of the language syntax, and in those languages Org-mode should
> ignore such constructs unless the "something" contained in the <<>>'s is
> actually the name of a code block.
>
> It may make sense to revisit this design decision.

IMHO, it should, yes. Because a typo is so easy, and the results can be very
different then, from what's expected... OK, there is always a preview mode,
but an alert is better (for me).

Maybe adding an option for those languages, that would suppress such warnings?

Re helper functions for such named code blocks, do you have an idea what I
should do to have the IMenu index of code blocks working? See previous thread
[[http://mid.gmane.org/808w09foxd.fsf%40missioncriticalit.com][Re: imenu
support for babel blocks]].

Thanks for any hint!

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

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