emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: emacs-orgmode@gnu.org
Subject: Recent changes: A cleaner outline view
Date: Mon, 13 Mar 2006 12:02:35 +0100	[thread overview]
Message-ID: <ecc106d910fe68049cb87bac49d8ff40@science.uva.nl> (raw)

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	other threads:[~2006-03-13 11:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13 11:02 Carsten Dominik [this message]
2006-03-23 21:13 ` Recent changes: A cleaner outline view Philip Rooke
2006-03-24  7:06   ` Carsten Dominik
  -- strict thread matches above, loose matches on Subject: below --
2006-03-14  6:43 Thomas Baumann
2006-03-14  8:44 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecc106d910fe68049cb87bac49d8ff40@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).