Aloha all,

The attached Org mode document contains some notes on the classification
of Org mode elements that might be a useful addition to Nicolas
Goaziou's draft Org syntax document
(http://orgmode.org/worg/dev/org-syntax.org).

It distinguishes nine classes of element and proposes names for them.  

I'm hoping for some comments.  The classification stuff makes sense to
me, given my anthropology and archaeology background, but I'm not
certain if it will be sensible to the Org mode community, which is
mostly programmers.

All the best,
Tom

#+TITLE: org-syntax-element-table
#+DATE: <2013-06-16 Sun>
#+AUTHOR: Thomas Dye
#+EMAIL: t...@tsdye.com
#+OPTIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:t c:nil creator:comment d:(not LOGBOOK) date:t e:t
#+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil stat:t tags:t
#+OPTIONS: tasks:t tex:t timestamp:t toc:t todo:t |:t
#+CREATOR: Emacs 24.3.1 (Org mode 8.0.2)
#+DESCRIPTION:
#+EXCLUDE_TAGS: noexport
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export

* Org mode document

An Org mode document contains headlines and sections.  A section
contains one or more elements, which are either paragraphs or are
recognized by the parser as one of 28 Org mode constructs.  Org mode
does not distinguish different classes of headline.

* Element table

There are 26 different elements that can be classified according to
four boolean properties:
  - greater :: an element that can contain another element
  - restricted :: an element that must be contained by another element
  - attributable :: an element that can have an affiliated keyword
  - direct object :: an element that can directly contain an object

The four boolean properties describe a paradigmatic classification
with 16 (2^4) classes, only nine of which are realized (table
[[element-table]]). Five of the nine classes---2, 3, 4, 8, and 9---each
comprise a single instance. These are referred to as "singleton
classes." Two classes---6 and 7---comprise two instances. Class 1
comprises six instances and Class 5 comprises eleven instances.

Nicolas Goaziou's draft [[http://orgmode.org/worg/dev/org-syntax.org][Org Syntax description]] classified the elements
on the greater property, distinguishing Greater elements from
Elements.  The proposed class names in table [[element-table]] build on
this distinction, keeping the name Greater element and substituting
Lesser element for Element.  Singleton classes are named after the
element they comprise.  Lesser elements that don't take an affiliated
keyword are called Unattributable lesser elements, and lesser
elements that can directly contain an object are called Direct object
lesser elements.

#+name: element-table
| Element             | Greater | Restricted | Attributable | Direct object | Class | NGZ             | Proposed class names          |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Drawer              | true    | false      | true         | false         |     1 | Greater element | Greater element               |
| Dynamic block       | true    | false      | true         | false         |     1 | Greater element | Greater element               |
| Footnote definition | true    | false      | true         | false         |     1 | Greater element | Greater element               |
| Greater block       | true    | false      | true         | false         |     1 | Greater element | Greater element               |
| Plain list          | true    | false      | true         | false         |     1 | Greater element | Greater element               |
| Table               | true    | false      | true         | false         |     1 | Greater element | Greater element               |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Inline task         | true    | false      | false        | false         |     2 | Greater element | Inline task                   |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Property drawer     | true    | true       | true         | false         |     3 | Greater element | Property drawer               |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Item                | true    | true       | false        | false         |     4 | Greater element | List item                     |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Babel call          | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Comment             | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Comment block       | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Diary               | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Example block       | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Fixed width area    | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Horizontal rule     | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Keyword             | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| LaTeX environment   | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Sexp                | false   | false      | true         | false         |     5 | Element         | Lesser element                |
| Source block        | false   | false      | true         | false         |     5 | Element         | Lesser element                |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Paragraph           | false   | false      | true         | true          |     6 | Element         | Direct object lesser element  |
| Verse block         | false   | false      | true         | true          |     6 | Element         | Direct object lesser element  |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Clock               | false   | false      | false        | false         |     7 | Element         | Unattributable lesser element |
| Planning (Plan?)    | false   | false      | false        | false         |     7 | Element         | Unattributable lesser element |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Node property       | false   | true       | false        | false         |     8 | Element         | Node property                 |
|---------------------+---------+------------+--------------+---------------+-------+-----------------+-------------------------------|
| Table row           | false   | true       | false        | true          |     9 | Element         | Table row                     |
-- 
Thomas S. Dye
http://www.tsdye.com

Reply via email to