emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Recent changes: A cleaner outline view
@ 2006-03-13 11:02 Carsten Dominik
  2006-03-23 21:13 ` Philip Rooke
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2006-03-13 11:02 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Recent changes: A cleaner outline view
@ 2006-03-14  6:43 Thomas Baumann
  2006-03-14  8:44 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Baumann @ 2006-03-14  6:43 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten,

I sometimes do like the cleaner view with the leading stars removed. In
other cases, eg. with many tables, notes and links, things look better
the way they are. Of course smart indentation could be an option to have
everything nicely aligned, but wait, there are only 80 characters on my
terminal window, therefore space is limited...

Anyway, my org-file is for working and not for presentation. Therefore
anything which increases the functionality (org-mouse is an excellent
example) should be available in the org-mode buffer, whereas layout
issues (indenting 1/2/3 spaces and so on) could perfectly be integrated
into the export filters. To be honest, I had no clue of the use of
org-convert-to-odd-levels when I first saw it appear in the code. Now
this is clearer now.

BTW, on text mode terminals the "hidden" leading stars show up in a
smart blue color here :-)

Have a nice day and thanks

Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-24  7:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-13 11:02 Recent changes: A cleaner outline view Carsten Dominik
2006-03-23 21:13 ` 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

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).