Skip to content

Emacs Org-mode

Org Mode - a system for note-taking and project planning

Section titled “Org Mode - a system for note-taking and project planning”

Source: Emacs Org-mode - a system for note-taking and project planning with speaker: Carsten Dominik, creator of org mode. Including notes from org mode is awesome - YouTube, Org-mode manual

  • Take notes
    • Outline documents
  • Tasks, planning
    • To do list manager
    • Day planner (org-agenda)
    • Getting Things Done (GTD)
      • to do states, tags, contexts and agendas
  • Time planning and accounting
  • Small database (properties, metadata)
  • Construct documents and websites
  • Making drafts
  • Swiss army knife
  • Everything is text based
  • Note based project planning
  • GTD starts with projects, then tasks instead of just starting with tasks
    • Task come from projects. Use same tool for notes and planning
  • Supports links, spreadsheets, export to different formats
  • Easily use and embed latex - good for university

Principles:

  • Simple core
  • Not impose complexity
  1. Why not Org mode?

    • You will likely continue to customize and change it to your own needs
    • Not for masses and was intended for Emacs users
  • Use outlines
  • Tab to cycle view
  • Promote and demote headings easily
  • Ordered and unordered lists
  • Inheritance: org documents can have tags/properties, can be inherited by children
    • Search tags with org-agenda with m “Match TAGS/PROP/TODO option, then type tag you want to search on
  • Accumulation: certain properties can be summed up (numbers, times, status flags)
  • Support for
    • One key per tags
    • Completion (tags)
    • Clocking and timesheet system
    • Templates: to do lists, journal entries, links to context
    • Links to websites, org documents in specific places and headings, citations, emails, attachments, etc.

Add your org files using org-agenda-files variable or configuration in your personal settings

;; Add my pcode org files so org agenda can find them
(custom-set-variables
'(org-directory "~/myorgfiles")
'(org-agenda-files (list org-directory)))
  • Remember
    • Quickly remember an item without disrupting your workflow with Remember: M-x remember
    • Recall notes with M-x remember-notes
  • Tasks can be collected in special list, use queries
  • Sparse tree - for single file, find stuff in outline structure
  • Agenda view - parse outline nodes into a flat list
  • Export to HTML, PDF, LaTeX, Markdown, ASCII, iCal
    • Example: LaTeX equations
  • Sets of documents can be linked to a publishing project
  • Date time
  • Columns: Activate Org mode Columnar view: C-c C-x C-c and quit use org-columns-quit
  1. Tables

    | Name | Phone | Room |
    |---------+--------------+-------------|
    | Peter | 463733 | 32 |
    | John | 323-323-4242 | Upstairs 62 |
    | Sabrina | Unknown | Flr 1 242 |
    | | | |
    • Press tab to start editing
    • Create header line with |---- then press tab
    1. Calculator

      • Interface with emacs calculator and tables to do math
      | Student | Maths | Physics | Mean |
      |----------+-------+---------+------|
      | Bertrand | 13 | 09 | 11 |
      | Henri | 15 | 14 | 14.5 |
      | Arnold | 17 | 13 | 15 |
      |----------+-------+---------+------|
      | Means | 15 | 12 | |
      #+TBLFM: $4=vmean($2..$3)::@5$2=vmean(@2$2..@4$2)::@5$3=vmean(@2$3..@4$3)
      • Mean is a column formula, access it using: C-c =
      • Mean row is a row and cell formula
    2. Radio Tables

      • Org mode manual entry: Radio Tables

      • Embed an org-mode table in any file (e.g. Markdown, C, Javascript)

      • The key to finding the target location is the magic words ‘BEGIN/END RECEIVE ORGTBL’. They have to appear as comments in the current mode. Example insert into a C file:

      // At the location of source, Org needs a special line to direct Orgtbl to translate and to find the target for inserting the translated table. For example:
      #+ORGTBL: SEND table_name translation_function arguments ...
      /* BEGIN RECEIVE ORGTBL table_name */
      /* END RECEIVE ORGTBL table_name */
  • Set timer org-timer-set-timer
  • Meta + cursor: Structure editing, table structure editing

  • Look and update: C-c C-c

  • Tab: Headline visibility, motion and table evaluation, LaTeX template expansion

  • All printing characters: automatic overwrite mode in tables

  • For radio tables, org table mode is a context sensitive minor mode

  • Write programs and output results to org file (weave) or save to file (tangle)
  • Can also work with compiled languages by combining tangle with shell command to compile and run source code file

In Linux shell

#+begin_src sh :results output
echo PID: "$$"
uname -a
,end_src