From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: [Babel] How to pass variables to SQL blocks? Date: Mon, 13 Dec 2010 22:23:56 +0100 Message-ID: <80fwu1pdsj.fsf@missioncriticalit.com> References: <80pqtoqfkh.fsf@missioncriticalit.com> <87ipzefcga.fsf@gmail.com> <80tyixlr0s.fsf@missioncriticalit.com> <87y67th2kj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Eric, "Eric Schulte" wrote: > S=C3=A9bastien Vauban writes: >> (I thought this feature would be implemented using "real" SQL vars, henc= e my @ >> prefix. But viewing the code shows the replacement is made outside of th= e 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 sho= uld 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 >>>> <> >>>> #+end_src > > The lack of notice (or error) was originally intentional. The logic > being that there may be languages in which <> 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 warnin= gs? 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 thre= ad [[http://mid.gmane.org/808w09foxd.fsf%40missioncriticalit.com][Re: imenu support for babel blocks]]. Thanks for any hint! Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode