From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [RFC] Standardized code block keywords
Date: Fri, 21 Oct 2011 10:17:56 +0200 [thread overview]
Message-ID: <80hb32vjuz.fsf@somewhere.org> (raw)
In-Reply-To: 8895.1319165867@alphaville.dokosmarshall.org
Hi Nick, Tom, Eric and all,
Nick Dokos wrote:
> Thomas S. Dye <tsd-P0awH739Ni4AvxtiuMwx3w@public.gmane.org> wrote:
>> Eric Schulte <schulte.eric-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>>>> [1] I have the same "annoying" feelings with #+SOURCE, #+SRCNAME, #+FUNCTION,
>>>> #+CALL, #+LOB, and SBE, some of which are interchangeable; some
>>>> not. I'd prefer deprecating an old form when a better one is found.
>>>
>>> This point of view has been raised previously both on the mailing list
>>> and in the #org-mode IRC chat room. I think it is time that we decided as
>>> a community what we want to do about the prevalence of code block
>>> synonyms -- we should make this decision before the release of Emacs24
>>> after which syntax will become harder to change.
Thanks for tackling this.
>>> There are currently a number of instances of synonymous keywords when
>>> dealing with code blocks, specifically.
>>>
>>> named code blocks [1] -- "source" "srcname" "function"
>>> calling external functions [2] -- "call" "lob"
>>> named data [3] -- "tblname" "resname" "results" "data"
>>>
>>> Ideally if we limit each of the above to only one alternative we could
>>> simplify the specification of code blocks in Org-mode making them easier
>>> to learn and use and removing some of the mystery around their syntax.
>>>
>>> What does everyone think?
>>>
>>> Are there suggestions for the best names for each code block entity
>>> (either in the list or not in the list)?
>>>
>>> Are there cases where we want to continue to allow synonyms (e.g., in
>>> named data so that "results" can be used for code block results but
>>> "data" can be used for hand-written data)?
>>>
>>> Thanks -- Eric
>>>
>>> Footnotes:
>>> [1] named code blocks
>>>
>>> #+source: foo
>>> #+begin_src emacs-lisp
>>> 'foo
>>> #+end_src
>>>
>>> #+srcname: foo
>>> #+begin_src emacs-lisp
>>> 'foo
>>> #+end_src
>>>
>>> #+function: foo
>>> #+begin_src emacs-lisp
>>> 'foo
>>> #+end_src
>>>
>>> [2] calling external functions
>>>
>>> #+call: foo()
>>>
>>> #+lob: foo()
>>>
>>> [3] named data
>>>
>>> #+data: something
>>> : something
>>> #+results: something
>>> : something
>>>
>>> etc...
>>
>> named code blocks [1] "source"
>> calling external functions [2] "call"
>> named data [3] "object"
>>
>> My motivation for [3] "object" instead of the suggested alternates is the
>> hope that it will be possible to name things like lists and paragraphs
>> (that aren't results or data) and pass these objects to source code blocks.
>
> I disagree with Tom on [1]: it should clearly be "srcname", in analogy
> to #+tblname - and also so I don't have to change my files :-} (but see my
> question about tblname below).
I have low attraction for "function" as this seems too-programming oriented:
IMHO, it's too much minded toward the "results value" aspect of Babel
("functional mode"), and not at all toward the "scripting mode" (shell
scripts, SQL commands).
Moreover, in fact, in such blocks, we don't have executable code per se: just
think at Ledger transactions that I would want to wrap...
#+srcname: journal
#+begin_src ledger
2008/01/03 * ( ) ME
Assets:Bank:Checking:799997045030 550.00 EUR
Assets:Bank:Transferred
2008/01/01 * ( ) UNKNOWN-PAYEE
Assets:Bank:Checking:799997045030 21.91 EUR
Expenses:Unknown
#+end_src
..., and reuse in a block later (through the Noweb expansion):
#+srcname: ledger-balance
#+begin_src ledger :cmdline bal :noweb yes
<<journal>>
#+end_src
Though, in this latter case, one could object I could maybe (?) refer them
through the "object" name facility -- I'm referring to point 3 of Tom's
answer, see below.
Note -- Then, I would loose the language-editing facility. When we create
an "object" ("results" or "data"), there is no "language" associated,
hence no ability to edit easily via C-c ', and no correct "native
fontification". In fact, such an object has no delimiter either, so it
would never be a true replacement.
Now, between "srcname" and "source": I'm used to whatever my Yasnippet is
entering for me. That's currently "srcname". I don't have a strong opinion,
though, to choose one over the other, except that I like Nick's argument with
the table analogy.
> I agree on [2] "call".
I clearly agree on "call" as well.
Here, I'd like to ask: what about "sbe"? In my own understanding, it's a
call, absolutely similar to "call". Is there a technical reason to be forced
to differentiate both? If no, can we use "call" as well instead of "sbe"?
> I'm confused by [3] so I will say nothing for now, except to ask some
> questions: are we talking about what a human would use to label a piece of
> data for consumption by a block (including perhaps the future possibilities
> of lists and paragraphs that Tom brought up)? what babel would use to label
> a results block (possibly so that it could be consumed by another block in a
> chain)? both? would that mean that #+tblname would go the way of the dodo
> and that tables would be labelled with #+data (or #+object or whatever else
> we come up with)?
For point 3, Eric, I guess that whichever term is chosen, that does not mean
that "results" will change (I mean: when it's a result of a block execution)?
In other words, if we choose for "object", we still will have the possibility
to use "results" (automatically generated) and "object" to refer to something
we want to use in another call?
>>> named data [3] -- "tblname" "resname" "results" "data"
I don't specifically like "resname".
I would keep "results" for automatically generated "results".
I do like "data", but can learn to like "object" as a more generic term,
future-proof for coming extensions.
Last remark: we could get one step further and wonder if it wouldn't be good
to impose a single way to pass variables? We currently have two different
mechanisms:
#+srcname: convert-date-to-French-format
#+begin_src sql :var column=""
CONVERT(varchar(10), $column, 103) AS $column
#+end_src
and
#+srcname: convert-date-to-French-format(column="")
#+begin_src sql
CONVERT(varchar(10), $column, 103) AS $column
#+end_src
I guess that the first one is easier if we want to construct complex variable
values (which call Emacs Lisp code or such), but...
Thanks for your comments...
Best regards,
Seb
--
Sebastien Vauban
next prev parent reply other threads:[~2011-10-21 8:17 UTC|newest]
Thread overview: 132+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 19:43 [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines Eric Schulte
2011-10-20 20:06 ` Nick Dokos
2011-10-20 20:12 ` Eric Schulte
2011-10-20 20:51 ` Nick Dokos
2011-10-20 21:04 ` Sebastien Vauban
2011-10-20 21:50 ` [RFC] Standardized code block keywords Eric Schulte
2011-10-21 1:52 ` Thomas S. Dye
2011-10-21 2:57 ` Nick Dokos
2011-10-21 7:26 ` Christian Moe
2011-10-21 16:12 ` Eric Schulte
2011-10-21 19:10 ` Thomas S. Dye
2011-10-23 12:20 ` Daniel Bausch
2011-10-23 16:09 ` Thomas S. Dye
2011-10-24 5:49 ` Daniel Bausch
2011-10-21 8:17 ` Sebastien Vauban [this message]
2011-10-21 16:17 ` Eric Schulte
2011-10-21 17:37 ` Sebastien Vauban
[not found] ` <CAGhLh6GXg6nMZ-xdu-EP=YRx7Pznrme2Yq1S0vdc6Yq0tPMxFg@mail.gmail.com>
2011-10-25 6:59 ` Rainer M Krug
2011-10-21 16:08 ` Eric Schulte
2011-10-21 16:05 ` Eric Schulte
2011-10-21 18:02 ` Thomas S. Dye
2011-10-22 15:19 ` Eric Schulte
2011-10-21 7:43 ` Torsten Wagner
2011-10-21 8:27 ` Sebastien Vauban
2011-10-21 16:25 ` Eric Schulte
2011-10-21 16:24 ` Eric Schulte
2011-10-21 17:41 ` Sebastien Vauban
2011-10-24 1:06 ` Torsten Wagner
2011-10-25 6:44 ` Rainer M Krug
2011-10-25 7:24 ` Jambunathan K
2011-10-25 8:21 ` Sebastien Vauban
2011-10-21 12:22 ` Nicolas Goaziou
2011-10-21 16:27 ` Eric Schulte
2011-10-21 17:48 ` Eric Schulte
2011-10-21 19:24 ` Viktor Rosenfeld
2011-10-23 12:42 ` Daniel Bausch
2011-10-24 7:37 ` Eric S Fraga
2011-10-24 14:39 ` Darlan Cavalcante Moreira
2011-10-24 7:47 ` Sebastien Vauban
2011-10-25 1:30 ` Eric Schulte
2011-10-25 7:14 ` Daniel Bausch
2011-10-25 8:14 ` Sebastien Vauban
2011-10-25 14:44 ` Eric Schulte
2011-10-25 15:38 ` Christian Moe
2011-10-25 15:42 ` Nick Dokos
2011-10-25 16:28 ` Martyn Jago
2011-10-25 16:49 ` Eric Schulte
2011-10-25 17:21 ` Nick Dokos
2011-10-26 5:58 ` Daniel Bausch
2011-10-26 13:10 ` Giovanni Ridolfi
2011-10-26 14:41 ` Daniel Bausch
2011-10-26 15:04 ` Nick Dokos
2011-10-27 5:25 ` Daniel Bausch
2011-10-28 16:49 ` Eric Schulte
2011-10-28 18:31 ` Eric Schulte
2011-10-28 18:40 ` Nick Dokos
2011-10-28 18:52 ` Eric Schulte
2011-10-28 23:22 ` Nick Dokos
2011-10-28 23:39 ` Thomas S. Dye
2011-10-29 2:18 ` Nick Dokos
2011-10-31 7:25 ` Daniel Bausch
2011-10-31 19:01 ` Eric Schulte
2011-11-01 6:34 ` C-c C-c not working at end of #+end_src line (was: [RFC] Standardized code block keywords) Daniel Bausch
2011-10-25 14:17 ` [RFC] Standardized code block keywords Eric Schulte
2011-10-26 5:41 ` Daniel Bausch
2011-10-26 6:17 ` Thomas S. Dye
2011-10-26 12:16 ` Eric Schulte
2011-10-21 18:14 ` Thorsten
2011-10-20 21:34 ` [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines Eric Schulte
2011-10-20 21:44 ` suvayu ali
2011-10-20 21:52 ` Eric Schulte
2011-10-20 22:23 ` Suvayu Ali
2011-10-20 21:47 ` Sebastien Vauban
2011-10-20 21:54 ` Eric Schulte
2011-10-20 21:57 ` Nick Dokos
2011-10-20 21:48 ` Nick Dokos
2011-10-20 21:57 ` Eric Schulte
2011-10-20 22:08 ` Nick Dokos
2011-10-20 22:18 ` Eric Schulte
2011-10-21 7:28 ` Sebastien Vauban
2011-10-21 8:14 ` Christian Moe
2011-10-21 9:12 ` Rainer M Krug
2011-10-21 10:47 ` Christian Moe
2011-10-21 10:59 ` Rainer M Krug
2011-10-21 11:17 ` Christian Moe
2011-10-21 11:18 ` Rainer M Krug
2011-10-21 17:37 ` Eric Schulte
2011-10-21 18:09 ` Nick Dokos
2011-10-22 15:25 ` Eric Schulte
2011-10-21 18:35 ` Rainer M Krug
2011-10-21 18:40 ` Rainer M Krug
2011-10-22 7:58 ` Christian Moe
2011-10-24 9:44 ` Rainer M Krug
2011-10-22 15:52 ` Eric Schulte
2011-10-22 19:07 ` Christian Moe
2011-10-24 10:10 ` Rainer M Krug
2011-10-24 11:37 ` Christian Moe
2011-10-24 12:11 ` Sebastien Vauban
2011-10-24 12:38 ` Christian Moe
2011-10-24 15:07 ` Nicolas Goaziou
2011-10-24 9:50 ` Rainer M Krug
2011-10-25 9:35 ` Sebastien Vauban
2011-10-25 10:06 ` Rainer M Krug
2011-10-25 10:31 ` Sebastien Vauban
2011-10-25 11:47 ` Rainer M Krug
2011-10-25 14:13 ` Eric Schulte
2011-10-26 14:00 ` Sebastien Vauban
2011-10-26 15:20 ` Eric Schulte
2011-10-22 15:26 ` Eric Schulte
2011-10-21 20:24 ` Christian Moe
2011-10-21 21:05 ` Darlan Cavalcante Moreira
2011-10-22 7:08 ` Sebastien Vauban
2011-10-22 15:53 ` Eric Schulte
2011-10-24 18:07 ` Darlan Cavalcante Moreira
2011-10-31 18:53 ` Eric Schulte
2011-10-31 20:18 ` Samuel Wales
[not found] ` <87obwwkia5.fsf@gmail.com>
[not found] ` <CAJcAo8scJXx=3s0f_FDAJXFKW2uh5gFTHwgDRbM6xXohr5ZPzQ@mail.gmail.com>
2011-10-31 22:22 ` Samuel Wales
2011-11-01 1:28 ` Eric Schulte
2011-11-01 14:26 ` Nick Dokos
2011-11-01 15:02 ` Nick Dokos
2011-11-01 15:17 ` Eric Schulte
2011-11-02 11:12 ` Rainer M Krug
2011-11-02 12:18 ` Nicolas Goaziou
2011-11-02 14:16 ` Rainer M Krug
2011-11-03 18:40 ` Eric Schulte
2011-11-03 18:51 ` Jambunathan K
2011-11-04 9:15 ` Rainer M Krug
2011-11-02 12:57 ` Brian Wightman
2011-11-02 14:18 ` Rainer M Krug
2011-11-03 1:29 ` Bastien
2011-10-20 21:27 ` Christian Moe
2011-10-20 21:32 ` Nick Dokos
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80hb32vjuz.fsf@somewhere.org \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).