Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep indentation with Emacs + org-mode + visual-line-mode?

Tags:

emacs

org-mode

Emacs + org-mode + visual-line-mode + window resizing produce this kind of view :

 * My list   * Some thing this is longer back to line which is really anoying   * Other thing which is truncated     * Sub items with blah to line 

I would rather prefer this :

 * My list   * Some thing this is longer     back to line which is      really anoying   * Other thing which is     truncated     * Sub items with blah       to line 

Any clue about how to configure emacs or org-mode to achieve that would be really really appreciated :)

(emacs23.1 on ubuntu karmic)

like image 911
Laurent B Avatar asked Nov 20 '09 17:11

Laurent B


People also ask

How do you indent in Org mode?

To display the buffer in the indented view, activate Org Indent minor mode, using M-x org-indent-mode . Text lines that are not headlines are prefixed with virtual spaces to vertically align with the headline text148. To make more horizontal space, the headlines are shifted by two characters.

How do I enter Org Mode in Emacs?

Emacs does not actually understand you are editing an Org document, yet. To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document. Those are minuses, not underscores.

Does Org mode come with Emacs?

Emacs has included Org Mode as a major mode by default since 2006. Bastien Guerry is the current maintainer, in cooperation with an active development community. Since its success in Emacs, some other systems now provide functions to work with org files.


1 Answers

Activate org-indent-mode. One way is to add a hook

(add-hook 'org-mode-hook           (lambda ()             (org-indent-mode t))           t) 

but the easier way is to customize org-startup-indented to be non-nil.

Note that even when org-indent-mode is non-nil, headlines still don't enjoy auto-fill treatment. It's only the body of an entry that will be both filled and indented left-justified against its parent heading's left column.

like image 50
seh Avatar answered Oct 11 '22 18:10

seh