ArticleslgStudy

computer science

Org-mode

Org-mode is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Org-mode rather than just read about it. In short: Org Mode (also: org-mode; ) is a mode for document editing, formatting, and organizing within the free software text editor GNU Emacs and its derivatives, designed for notes, planning, and authoring. The name is used to encompass plain text files ("org files") that include simple marks to indicate levels of a hierarchy (such as the outline of an essay, a topic list with subtopics, nested computer code, etc.), and an…

Org-mode — main illustration
Org-mode — illustration

Key takeaways

  • Org-mode belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Org-mode to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Org-mode from memory before moving on to harder problems.

Reference excerpt

Org Mode (also: org-mode; ) is a mode for document editing, formatting, and organizing within the free software text editor GNU Emacs and its derivatives, designed for notes, planning, and authoring. The name is used to encompass plain text files ("org files") that include simple marks to indicate levels of a hierarchy (such as the outline of an essay, a topic list with subtopics, nested computer code, etc.), and an editor with functions that can read the markup and manipulate hierarchy elements (expand/hide elements, move blocks of elements, check off to-do list items, etc.). Org Mode was created by Carsten Dominik in 2003, originally to organize his own life and work, and since the first release numerous other users and developers have contributed to this free software package. Emacs has included Org Mode as a major mode by default since 2006. Bastien Guerry is the maintainer since 2010, in cooperation with an active development community. Since its success in Emacs, some other systems now provide functions to work with org files. Almost orthogonally, Org Mode has functionalities aimed at executing code in various external languages; these functionalities form org-babel.

System The Org Mode home page explains that "at its core, Org Mode is a simple outliner for note-taking and list management". The Org system author Carsten Dominik explains that "Org Mode does outlining, note-taking, hyperlinks, spreadsheets, TODO lists, project planning, GTD, HTML and LaTeX authoring, all with plain text files in Emacs." The Org system is based on plain text files with a simple markup, which makes the files very portable. The Linux Information Project explains that "Plain text is supported by nearly every application program on every operating system". The system includes a lightweight markup language for plain text files (similar in function to Markdown, reStructuredText, Textile, etc., with a different implementation), allowing lines or sections of plain text to be hierarchically divided, tagged, linked, and so on.

Functionality This section gives some sample uses for the hierarchical display and editing of plain text.

To-do lists often have subtasks, and so lend themselves to a hierarchical system. Org Mode facilitates this by allowing items to be subdivided into simple steps (nested to-dos and/or checklists), and given tags and properties such as priorities and deadlines. An agenda for the items to be done this week or day can then be automatically generated from date tags. Plain text outlines.

Org files as interconnected pages of a personal wiki, using the markup for links. Tracking bugs in a project, by storing .org files in a distributed revision control system such as Git. Extensive linking features, within the same file, to other files, to web pages, to emails, and also allows defining custom links. An org-mode document can also be exported to various formats (including HTML, LaTeX, OpenDocument or plain text), these formats being used to render the structural outline in an appropriate fashion (including cross-references if needed). It can also use formatting markup (including LaTeX for mathematics), with facilities similar to those present in Markdown or LaTeX, thus offering an alternative to these tools.

Org-babel

Org Mode offers the ability to insert source code in the document being edited, which is automatically exported and/or executed when exporting the document; the result(s) produced by this code can be automatically fetched back in the resulting output. This source code can be structured as reusable snippets, inserted in the source document at the place needed for logical exposition thus allowing this exposition to be independent of the structure needed by the compiler/interpreter. Together with the markup facilities of org-mode, these two functionalities allow for

Literate programming, by decoupling the exposition of the functions of a program from its code structure, and Reproducible research, by the creation of a consistent document consolidating exposition, original data, analyses, discussion and conclusion, in a way that can be reproduced by any reader using the same software tools. As of June 2021, org-babel directly supports more than 70 programming languages or programmable facilities, more than 20 other tools being usable via contributed packages or drivers.

Integration Org Mode has some features to export to other formats, and other systems have some features to handle org-mode formats. Further, a full-featured text editor may have functions to handle wikis, personal contacts, email, calendars, and so on; because org-mode is simply plain text, these features could be integrated into org-mode documents as well. From org-mode, add-on packages export to other markup format such as MediaWiki (org-export-generic, org-export), to flashcard learning systems implementing SuperMemo's algorithms (org-drill, org-learn). Outside of org-mode editors, org markup is supported by the GitLab, GitHub and Gitea code repositories, the JIRA issue tracker, Pandoc and others.

Export examples Org supports exporting to a variety of formats. Below you may find examples of Org fragments exported to a number of formats. Other formats are supported by dedicated packages.

See also Lightweight markup language Comparison of notetaking software Comparison of document markup languages List of personal information managers Outliner

References

Further reading

Books Dominik, Carsten (2010). The Org Mode 7 Reference Manual: Organize your life with GNU Emacs. With contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, and Thomas Dye. UK: Network Theory. p. 282. ISBN 978-1-906966-08-9. Archived from the original on 2012-11-02. Retrieved 2012-11-23.

Journal articles Schulte, Eric; Davison, Dan; Dye, Thomas; Dominik, Carsten (Jan 2012). "A Multi-Language Computing Environment for Literate Programming and Reproducible Research". Journal of Statistical Software. 46 (3). American Statistical Association: 1–24. doi:10.18637/jss.v046.i03. ISSN 1548-7660. Schulte, E.; Davison, D. (May–June 2011). "Active Documents with Org-Mode". Computing in Science & Engineering. 13 (3). American Institute of Physics, and IEEE Computer Society: 66–73. Bibcode:2011CSE....13c..66S. doi:10.1109/MCSE.2011.41. ISSN 1521-9615. S2CID 38470377.

External links Official website

Illustrations

Org-mode illustration
Org-mode: Org file showing simple planning for a short trip
Org file showing simple planning for a short trip
Org-mode: Some of the basic features of Org-babel
Some of the basic features of Org-babel

Worked examples

Example 1 — a first encounter with Org-mode

Start with the simplest possible case. Write down what Org-mode claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Org-mode before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Org-mode ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Org-mode

In research
Org-mode appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Org-mode in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Org-mode is common in secondary-school and first-year university syllabi. It links to neighbouring topics Distributed bug tracking systems, Emacs modes, Free note-taking software, so understanding it makes those chapters shorter.
In everyday life
Look for Org-mode outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Org-mode” →

How to study Org-mode in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Org-mode means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Org-mode out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Org-mode in simple terms?

Org Mode (also: org-mode; ) is a mode for document editing, formatting, and organizing within the free software text editor GNU Emacs and its derivatives, designed for notes, planning, and authoring. The name is used to encompass plain text files ("org files") that include simple marks to indicate…

Why does Org-mode matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Org-mode?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Org-mode.

Tags

  • Distributed bug tracking systems
  • Emacs modes
  • Free note-taking software
  • Free personal information managers
  • Free spreadsheet software
  • Free task management software
  • Lightweight markup languages
  • Outliners

Keep exploring