From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Formal description of Org files Date: Tue, 19 Jul 2011 01:35:23 +0200 Message-ID: <87ipqzupqc.fsf@gnu.org> References: <4213EBED-2EFC-413F-8618-2A594AECEDCF@gmail.com> <877hav8lup.fsf@gmail.com> <2970.1302892280@alphaville.americas.hpqcorp.net> <20110420123741.GA21304@buga.lan> <87vcuzhmsq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QixL5-00074y-BD for emacs-orgmode@gnu.org; Mon, 18 Jul 2011 19:35:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QixL3-0001HA-Bq for emacs-orgmode@gnu.org; Mon, 18 Jul 2011 19:35:03 -0400 Received: from mail-fx0-f52.google.com ([209.85.161.52]:35693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QixL2-0001Gn-Sf for emacs-orgmode@gnu.org; Mon, 18 Jul 2011 19:35:01 -0400 Received: by fxd18 with SMTP id 18so6042474fxd.39 for ; Mon, 18 Jul 2011 16:35:00 -0700 (PDT) In-Reply-To: <87vcuzhmsq.fsf@gmail.com> (Nicolas Goaziou's message of "Mon, 18 Jul 2011 13:04:53 +0200") 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: Nicolas Goaziou Cc: Nick Dokos , emacs-orgmode mailing list , Marcelo de Moraes Serpa , Carsten Dominik Hi Nicolas, Nicolas Goaziou writes: > I didn't follow closely the thread, but I think having a formal > description of Org files is unrealistic at the moment. Still it would be useful to *try* to describe Org's various elements as formally as possible. > Org "format" is heavily dependant on user-configurable variables deeply > installed within emacs. Some of these variables can drastically change > the grammar of the Org file. Example: > > #+begin_src org > - item 1 > > - item a > #+end_src > > Now, if org-empty-line-terminates-plain-lists is a non-nil value, any > parser should detect two lists of one item each, while keeping it to nil > will imply there is one list of two items. > > Another example: (setq org-deadline-string "ZORGLUB:"). I let you > imagine what confusion it might introduce if the external tool you want > to use/implement isn't aware of this change. > > Sure, it's all plain text, so Org files are accessible from outside > emacs. But, for now, only the plain-text structure is accessible from > the wild, not the Org one. > > I can see three options here: > > - We remove every configurability concerning Org structure: we enforce > DEADLINE to stay DEADLINE, lists items to be separated by a blank > line, etc. But this isn't serious, is it? Nope :) > - We consider that Org "format" is a package containing the body _and_ > every configuration variable. But it isn't plain-text nor a format > anymore. Not really useful -- the purpose of better defining the format is to make it parsable outside Emacs. > - We implement an intermediary real format (maybe in plain text, but > I'd favor a nested-lists construct) that would serve as the common > denominator for every exporter _and_ importer out there. I already > suggested something like this in a recent thread about > exporters. Obviously, I think this one is the only viable (and, > icing on the cake, this would also be very useful for Org > development). I see yet another option: Describe a plain text format with the _default_ config options. Meaning DEADLINE will be DEADLINE -- and nothing else. -- Bastien