Meuporg: Emacs Integration

This file is part of the documentation of meuporg.

Table of Contents

1 Emacs minor-mode

If you are wise enough to have made the decision to use emacs, then your decision is even wiser now! If you did add the meuporg.el to your loaded files then emacs will automatically turn on the meuporg minor-mode (which is signaled by "!M!" in the mode-line) when a file is in a directory with a file in one of its parents. This mode provides elisp functions used to interact with meuporg and items, shortcuts to easily access these and fontifying of standard items.

2 Elisp Functions

2.1 Keyboard Shortcuts

The default prefix for all meuporg-mode commands is "C-!".

ShortcutDescriptionelisp function
C-! uSave, and Update the main file (even when called from another file).meuporg/update
C-! oOpen the main File.meuporg/open-main
C-! nGo to the Next item in the file.meuporg/go-to-next-item
C-! pGo to the Previous item.meuporg/go-to-previous-item
C-! lHighligths the items in the current-file and Lists them in another window (see Item List)meuporg/show-items
C-! i tInsert a "TODO" item.meuporg/insert-todo
C-! i cInsert a "CONTINUE" item.meuporg/insert-continue
C-! i iInsert a "IMPROVE" item.meuporg/insert-improve
C-! i kInsert a "CHECK" item.meuporg/insert-check
C-! i fInsert a "FIXME" item.meuporg/insert-fixme
C-! i rInsert a "FIXREF" item.meuporg/insert-fixref
C-! i s 1Insert a "SECTION" item.meuporg/insert-section
C-! i s 2Insert a "SUBSECTION" item.meuporg/insert-subsection
C-! i s 3Insert a "SUBSUBSECTION" item.meuporg/insert-subsubsection

2.2 Item List

The function meuporg/show-items creates a new buffer containing all the items in the current file. These are listed in the order in which they appear, each on one line and a color code displays known items in some colour. It also uses specific items called structural items to make sense of the file.

2.2.1 Structural items

As a good programmer, you give your code a structure. I personnaly go further and give a tree like structure using a system inspired by LaTeX section, subsections, etc. For instance, the file of meuporg contains the code used to select only the items corresponding to a given criteria. It it structured like this:

SECTION  Boolean management
  SUBSECTION  Attribute class
  SUBSECTION  Not class
  SUBSECTION  AlwaysTrue class
  SUBSECTION  AlwaysFalse class
  SUBSECTION  And class
  SUBSECTION  Or class
  SUBSECTION  Criteria class
SECTION  A poor man's database for the items
  SUBSECTION  Sorting methods
  SUBSECTION  Obtaining items from the db

Note that meuporg is very clever and uses LaTeX's "\section{}" as structural items. Thus, using meuporg/show-items in a TeX file will display something like this.

A structural item is just a regular item, except that it must have one of these names.


2.2.2 Use of the item list

The list of items uses its own shortcuts: when the cursor is on it, you can use any of these keys.

qKills the buffer containing the item list and closes its window
RETOpens the file containing the item at the line of the item under the cursor and kills the item list
<right>Opens the file containing the item at the line of the item under the cursor and leaves the cursor in the item list
pMoves cursor to the previous SECTION
nMoves cursor to the next SECTION

3 Syntax highlighting

As soon as a word is enclosed between exclamation marks, its font is changed.

Date: 2013-05-14

Author: Léo Perrin <>

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0