Linewrap in Org-mode of Emacs?

39,838

Solution 1

The default mode for org-mode is truncate-lines mode.

You can customize this behaviour with org-startup-truncated. Type F1-v org-startup-truncated for a description, and then click on the customize link to change it.

Solution 2

You can also toggle it on-the-fly with the command toggle-truncate-lines, between the normal Emacs view and the normal org view. For example, use this:

(define-key org-mode-map "\M-q" 'toggle-truncate-lines)

M-q is bound to fill-paragraph by default, but probably you don't want to use it within org-mode.

Solution 3

Org mode does not wrap lines on purpose, to not make tables appear very ugly. The function org-fill-paragraph controls the insertions of line breaks for one paragraph for you. So you might want to use that instead of line wrapping.

Solution 4

Try adding (global-visual-line-mode t) to your init file.

See http://www.emacswiki.org/emacs/VisualLineMode

Share:
39,838

Related videos on Youtube

kalaracey
Author by

kalaracey

I like Macs, EFI, boot stuff, partitioning, and I have an off/on relationship with Linux.

Updated on September 18, 2022

Comments

  • kalaracey
    kalaracey over 1 year

    Does Org-mode of Emacs support linewrapping?

    I know in the "regular" mode of Emacs there will just be a little sideways-u-turn on the right and on the left on the line after, and there's no scrolling necessary.

    However, there are only arrows pointing left and right. Any ideas?

  • kalaracey
    kalaracey almost 13 years
    thanks - I just set it to "nil" by going <CTL>-h v: org-startup truncated.
  • vitaly
    vitaly almost 10 years
    for one-off, evaluating the following expression did the trick for me: (setq truncate-lines 'nil)
  • tjb
    tjb over 7 years
    In general, in any emacs mode, the function toggle-truncate-lines, will toggle back and forth (for a temporary solution)
  • Heisenberg
    Heisenberg over 6 years
    Do you know the reason why truncate-lines is the default? Given that org mode is for taking notes instead of programming, long lines must be the norm
  • superdesk
    superdesk about 6 years
    @Heisenberg I think the reason for the default is that org-mode tables look really bad when word-wrapped.
  • VF1
    VF1 over 4 years
    @superdesk this is maybe worth another question, but isn't it possible to truncate-lines only for those lines containing org-mode tables?