emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Classification of Org mode elements
@ 2013-06-16 22:50 Thomas S. Dye
  2013-06-17  6:34 ` Thorsten Jolitz
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas S. Dye @ 2013-06-16 22:50 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Notes on the classification of Org mode elements --]
[-- Type: text/x-org, Size: 7195 bytes --]

#+TITLE: org-syntax-element-table
#+DATE: <2013-06-16 Sun>
#+AUTHOR: Thomas Dye
#+EMAIL: tsd@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                     |

[-- Attachment #3: Type: text/plain, Size: 40 bytes --]


-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-06-18 18:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-16 22:50 Classification of Org mode elements Thomas S. Dye
2013-06-17  6:34 ` Thorsten Jolitz
2013-06-17  6:50   ` Thorsten Jolitz
2013-06-18  7:08   ` Thomas S. Dye
2013-06-18  8:26     ` Suvayu Ali
2013-06-18 18:06     ` Nicolas Goaziou
2013-06-18 18:24       ` Thomas S. Dye

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).