emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-orgmode] Recent changes: A cleaner outline view


From: Carsten Dominik
Subject: [Emacs-orgmode] Recent changes: A cleaner outline view
Date: Mon, 13 Mar 2006 12:02:35 +0100

Here is another one of those emails about recent changes in Org-mode.

One of the main complaints about Org-mode I have heard or seen on the web is that the Emacs outlines are difficult to read. Some people find all the initial stars in each headline very noisy and asked for an outline view similar to what other outliners provide: An indented hierarchy. So instead of

* Top level headline
** Second level
*** 3rd level
 some text
*** 3rd level
more text
* Another top level headline

this would perhaps look like this:

* Top level headline
  * Second level
    * 3rd level
      some text
    * 3rd level
      more text
* Another top level headline

The fact that a headline starts with a number of stars is very deeply carved into the code, so that cannot be easily changed. However, one can use font-lock to make the first N-1 stars invisible. If one then makes sure that text under each headline is indented, the outline starts to look more quiet and clean.

Indented text under each headline is supported by org.el in that promoting or demoting an entry does also shift the indentation of the text, provided that all lines below that headline are indented.

If you just hide the leading stars, then in fact you get the following

* Top level headline
 * Second level
  * 3rd level
    some text
  * 3rd level
    more text
* Another top level headline

i.e. the visible star of the second-level headline is not under the "T" of "Top", but below the whitespace between "*" and "Top". If this indentation is not enough, the easiest way is to never use outline levels 2,4,6, but only to use the odd levels 1,3,5 etc. I have put in a command to convert a file to only using odd levels, so that you can try this out if you want. The command is `M-x org-convert-to-odd-levels'. To make the exporter and the font-locking work correctly, you should put

#+STARTUP: hidestars odd

into the buffer and press C-c C-c with the cursor still in that line.

I would be very interested to know if this fixes the "noisy view" problem for someone who has it.

If you decide to experiment with this for a while, but then decide to go back, the command M-x org-convert-to-oddeven-levels converts the file back to the original indentation. However, only if there is no headline with an even level. You should then remove the "odd" from the STARTUP line to make sure font-locking and the exporter continue to work well.

As always, if you want star hiding and/or odd levels as default, there are user options to set it: `org-odd-levels-only' and `org-hide-leading-stars'.

- Carsten


--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477





reply via email to

[Prev in Thread] Current Thread [Next in Thread]