From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Oberbrunner Subject: Re: Org-mode as a metalanguage: calling SQL "functions" Date: Fri, 5 Apr 2013 11:43:15 -0400 Message-ID: References: <87vc85raoh.fsf@ericabrahamsen.net> <87y5d1itxx.fsf@gmail.com> <87mwtgr346.fsf@gmail.com> <16857F81-04F6-4F71-96C2-E9FBBD36BCA0@gmail.com> <87k3ojpwsd.fsf@gmail.com> <86bo9uzdlr.fsf@somewhere.org> <87fvz6qx0q.fsf@gmail.com> <86mwtekqfg.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8fb1f7f00874e004d99ef2e0 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:32935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO8nT-0005sv-1J for emacs-orgmode@gnu.org; Fri, 05 Apr 2013 11:43:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO8nM-0004t9-SR for emacs-orgmode@gnu.org; Fri, 05 Apr 2013 11:43:22 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:61025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO8nM-0004su-M9 for emacs-orgmode@gnu.org; Fri, 05 Apr 2013 11:43:16 -0400 Received: by mail-oa0-f45.google.com with SMTP id o6so4194187oag.32 for ; Fri, 05 Apr 2013 08:43:15 -0700 (PDT) In-Reply-To: <86mwtekqfg.fsf@somewhere.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: Orgmode Mailing List --e89a8fb1f7f00874e004d99ef2e0 Content-Type: text/plain; charset=ISO-8859-1 What I'd really like in the org-mode doc somewhere (or on worg?) is the babel syntax broken out like a traditional programming language, by which I mean describe the syntax[es] for *defining* a function in one place (including all the ways to define args and their default values), and describe the syntax[es] for *calling* a function in a separate section (including how to pass args). If the variable semantics vary by language (as they do), just say so (e.g. when defining a SQL function, vars are substituted into the body by prefixing the names with $, but in python they are local vars in non-session mode and global vars in session mode and so on. Maybe this doc section shouldn't try to enumerate all those languages, but just redirect to the proper worg babel language page for details on arg handling. I think all this info is already there in one place or another, but IMHO it's not organized in such a way that a newbie can start to use org-mode as a metaprogramming language without lots of false starts and reading the source (like I did). On Thu, Apr 4, 2013 at 4:10 PM, Sebastien Vauban wrote: > Eric, > > Eric Schulte wrote: > > "Sebastien Vauban" writes: > >> Eric Schulte wrote: > >>>>> At this point I'm not sure if the documentation or the code should be > >>>>> amended. I've personally never liked the args-in-block-name syntax, > but > >>>>> I don't recall if we formally decided to abandon it, or if it has > simply > >>>>> been broken in a recent commit. > >>>> > >>>> I am not sure if I have any say here, but I agree that the args in > >>>> name notation looks not as good and might be considered for > >>>> abolishment. > >>> > >>> Great, I agree wholeheartedly and I'll update the documentation > >>> accordingly (and take a look at lob-ingest to ensure it no longer uses > >>> this var-in-name style). > >> > >> I confirm that, following a discussion we had, you had decided to drop > the > >> alternate syntax, a couple of months ago (more than 2 ;-)). > > > > Great, so I'm not imagining things. Thanks Seb. > > For the sake of clarity, it all began (in September 2011) with the fact it > was > more difficult to trap errors such as missing default value, in the > functional-syntax style. See > http://article.gmane.org/gmane.emacs.orgmode/46888. > > This also lead, a couple of weeks later (October 2011), to questionning the > multiple keywords used for code blocks, such as #+source: and #+srcname:. > See > http://article.gmane.org/gmane.emacs.orgmode/48399. > > Best regards, > Seb > > -- > Sebastien Vauban > > > -- Gary --e89a8fb1f7f00874e004d99ef2e0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
What I'd really like in the org-mode doc somewhere (or= on worg?) is the babel syntax broken out like a traditional programming la= nguage, by which I mean describe the syntax[es] for *defining* a function i= n one place (including all the ways to define args and their default values= ), and describe the syntax[es] for *calling* a function in a separate secti= on (including how to pass args). =A0If the variable semantics vary by langu= age (as they do), just say so (e.g. when defining a SQL function, vars are = substituted into the body by prefixing the names with $, but in python they= are local vars in non-session mode and global vars in session mode and so = on. =A0Maybe this doc section shouldn't try to enumerate all those lang= uages, but just redirect to the proper worg babel language page for details= on arg handling.

I think all this info is already there in one place or= another, but IMHO it's not organized in such a way that a newbie can s= tart to use org-mode as a metaprogramming language without lots of false st= arts and reading the source (like I did).



On Thu, Apr 4, 2013 at 4:10 PM, Sebastien Vauban <w= xhgmqzgwmuf@spammotel.com> wrote:
Eric,

Eric Schulte wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:
>> Eric Schulte wrote:
>>>>> At this point I'm not sure if the documentation or= the code should be
>>>>> amended. =A0I've personally never liked the args-i= n-block-name syntax, but
>>>>> I don't recall if we formally decided to abandon i= t, or if it has simply
>>>>> been broken in a recent commit.
>>>>
>>>> I am not sure if I have any say here, but I agree that the= args in
>>>> name notation looks not as good and might be considered fo= r
>>>> abolishment.
>>>
>>> Great, I agree wholeheartedly and I'll update the document= ation
>>> accordingly (and take a look at lob-ingest to ensure it no lon= ger uses
>>> this var-in-name style).
>>
>> I confirm that, following a discussion we had, you had decided to = drop the
>> alternate syntax, a couple of months ago (more than 2=A0;-)).
>
> Great, so I'm not imagining things. =A0Tha= nks Seb.

For the sake of clarity, it all began (in September 2011) with the fa= ct it was
more difficult to trap errors such as missing default value, in the
functional-syntax style. See
http://article.gmane.org/gmane.emacs.orgmode/46888.

This also lead, a couple of weeks later (October 2011), to questionning the=
multiple keywords used for code blocks, such as #+source: and #+srcname:. S= ee
http://article.gmane.org/gmane.emacs.orgmode/48399.

Best regards,
=A0 Seb

--
Sebastien Vauban





--
= Gary
--e89a8fb1f7f00874e004d99ef2e0--