From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [RFC] Standardized code block keywords Date: Thu, 20 Oct 2011 22:57:47 -0400 Message-ID: <8895.1319165867@alphaville.dokosmarshall.org> References: <87pqhrih3s.fsf@gmail.com> <30891.1319141196@alphaville.dokosmarshall.org> <87fwinifqu.fsf@gmail.com> <32184.1319143892@alphaville.dokosmarshall.org> <808vofwf1w.fsf@somewhere.org> <87y5wfgwn7.fsf_-_@gmail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RH5Iz-0005Y0-2J for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 22:57:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RH5Ix-000489-P5 for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 22:57:57 -0400 Received: from g6t0185.atlanta.hp.com ([15.193.32.62]:42616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RH5Ix-00047o-KA for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 22:57:55 -0400 In-Reply-To: Message from tsd@tsdye.com (Thomas S. Dye) of "Thu, 20 Oct 2011 15:52:04 -1000." 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 To: "Thomas S. Dye" Cc: Sebastien Vauban , nicholas.dokos@hp.com, emacs-orgmode@gnu.org Thomas S. Dye wrote: > Eric Schulte 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. > > > > 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... > > Hi Eric, > > 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 agree on [2] "call". 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)? Thanks, Nick