From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [Babel] How to pass variables to SQL blocks?
Date: Mon, 13 Dec 2010 22:23:56 +0100 [thread overview]
Message-ID: <80fwu1pdsj.fsf@missioncriticalit.com> (raw)
In-Reply-To: 87y67th2kj.fsf@gmail.com
Hi Eric,
"Eric Schulte" wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> 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
_______________________________________________
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
next prev parent reply other threads:[~2010-12-13 21:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 16:07 [Babel] How to pass variables to SQL blocks? Sébastien Vauban
2010-12-01 2:34 ` Eric Schulte
2010-12-01 10:35 ` Sébastien Vauban
2010-12-13 19:53 ` Eric Schulte
2010-12-13 21:23 ` Sébastien Vauban [this message]
2010-12-13 22:06 ` Eric Schulte
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80fwu1pdsj.fsf@missioncriticalit.com \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.