Get Organized with Emacs Org-mode

 in
Use Emacs to create a flexible plain-text organizer and personal productivity system.

It is said that Emacs, that versatile toolbox for working with text, is more than merely a text editor—it's a lifestyle. That's not just hyperbole. In this article, I show you how to turn Emacs into a flexible personal organizer and productivity system.

I started using Emacs for programming but soon discovered that it worked well for nonprogramming writing tasks too. I began experimenting with several modes that extend Emacs for writing notes and planning projects. Though each one was useful in its own way, none of these features or modes fit my style of working. Then I discovered Org-mode.

Org-mode is a new Emacs mode developed by Carsten Dominik. It is designed for taking notes, outlining, writing, project planning, maintaining to-do lists, time management and even publishing to Web sites—all this using only Emacs and plain text.

Plain text? Why would anyone want to use plain text for doing all of the above? Plain text offers several advantages. You are not locked in to a file format or an operating system. You can edit plain-text files using any available text editor. It is easy to copy and paste plain text from and into e-mail messages. You can track changes in your document using a version control system, such as CVS or Subversion. When I am writing, I find that plain text offers one more advantage—it enables me to think better and focus on my ideas, without the distractions of a word processor.

Getting Started with Org-mode

For this article, I assume that you have Emacs installed and have some familiarity with using it. If you are not already an Emacs user, maybe Org-mode will give you a good reason to start using it. (See Resources for information on getting started with Emacs.)

Org-mode is included in GNU Emacs 22. You also can install Org-mode to work with GNU Emacs 21 and XEmacs. I used GNU Emacs 22 and Org-mode 4.42 to write this article. If you already have Emacs on your system, check whether Org-mode is available by typing the following command:

M-x org-mode

The above notation means press the meta key (Esc or Alt, depending on your setup) followed by x, followed by org-mode, and then press the Return (or Enter) key.

If Emacs displays “No Match”, it means you do not have Org-mode installed. You will need to install org-mode manually or install GNU Emacs 22. You can find precompiled binaries of GNU Emacs 22 for your Linux distribution and even for other operating systems. On Ubuntu 7.04 (Feisty Fawn), you can install GNU Emacs 22 (with Org-mode 4.56d) by running the following command:

sudo apt-get install emacs-snapshot

If you need to install Org-mode for GNU Emacs 21 or XEmacs, download the latest version from orgmode.org, and look for the manual that provides detailed installation instructions. (The Org-mode documentation includes an excellent manual with more than 100 pages and a handy reference card.) Once you have org-mode installed, run the M-x org-mode command again. If Org-mode is installed correctly, Emacs will display “(Org)” in its mode line area, and Org-mode will be active. If you are running Emacs in a graphical environment, you also should see the Org pull-down menu (Figure 1).

Figure 1. Graphical User Interface Menu for Org-mode

Although Org-mode provides a graphical menu, in this article I refer to Org-mode keyboard commands only. Once you get familiar with Org-mode keystrokes, you will find them to be more efficient than the graphical menu.

Add the following lines to your ~/.emacs file and restart Emacs:

;; Org-mode settings
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-font-lock-mode 1)

Now, if you save your org files with the .org extension, they will open up using Org-mode in Emacs. I recommend creating a directory to keep all your Org files. I use ~/notes. Although you can invoke org-mode for any text file, it's convenient to have them in one directory.

Outlining and Writing

Outlining is an effective technique for organizing thoughts, taking notes or writing articles. Emacs has a built-in outline-mode that stores text as entries. Each entry has a headline and a body. Entries can be nested to create a tree of hierarchical information. Emacs uses asterisks (stars) to denote the hierarchy of an outline tree. Lines that do not begin with a star are considered to be the body of the headline above it. In the following example, ** Apples is a headline. Apples are red is the body for the Apples headline.

* Fruit 
** Apples 
Apples are red 
** Oranges 
Oranges are orange 
*Vegetables

Branches of a tree can be folded and hidden from view to make it easier to navigate the tree and work on specific parts of the tree. When a headline is folded, its body and subtree (all branches) are hidden from view, and the headline is displayed ending with ellipses (three dots).

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I have been nurturing an

sasima's picture

I have been nurturing an ambition to be a freelance writer for quite few years and also looking for suitable software for the purpose, but haven't gotten any. It seems to me that my searching stopped with Emacs that versatile toolbox for working with text. Though I haven't tried yet, but I hope it would meet my requirement.Solid Wood Computer Desks

Hi, org-mode is included with

Anonymous's picture

Hi,

org-mode is included with emacs 22.1.1 for windows, but has to be activated. You'll find the org-mode manual including installation howto following these steps: emacs -> help -> more manuals -> all other manuals -> (Org Mode) node of the info tree.

Tks a lot

Anonymous's picture

I started learning Emacs just to use org-mode and your tutorial is the first I read, thanks a lot, I'm sure I'll use org mode, goodbye strange and uncompatible software, hello pure text. Tks a lot.
João Brito

Good info

Anonymous's picture

Hello! bkgfbea interesting bkgfbea site!

timestamp insertion

llahwehttam's picture

Timestamp insertion is done with "C-c .", not just "C-c".

Is this possible in windows

Mridul's picture

I downloaded GNU Emacs 22.1.1 binary for windows but i could not see "Org-mode" included . So it there any method I can install Org-mode in windows

Hi Mridul, just close Emacs,

Anonymous's picture

Hi Mridul,

just close Emacs, download the zipped archive from http://orgmode.org/index1.html, extract it and open the new folder. Then copy the files contained in its subfolder "lisp" into the "lisp" subfolder of your Emacs installation.

Follow the instructions at http://orgmode.org/manual/Activation.html - and start Emacs. Good luck, it worked for me... ;)

Martin

Create new org file

Anonymous's picture

Create new org file ('test.org' for example) and open it. You will be in org mode automatically...

Hi, org-mode is included with

Anonymous's picture

Hi,

org-mode is included with emacs 22.1.1 for windows, but has to be activated. You'll find the org-mode manual including installation howto following these steps: emacs -> help -> more manuals -> all other manuals -> (Org Mode) node of the info tree.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix