reddit / emacs

Org Line Truncation Behaviour

dwdwdan · 2022-04-19 19:45
I'm trying to get rid of line truncation across my emacs config in favour of `visual-line-mode`, but I'm quite confused as to the `org-startup-truncated` variable. I have ``` (setq-default truncate-lines t) (setq truncate-lines t) ``` earlier in my config, which disables truncate lines globally. If `org-startup-truncated` is set to `t` (as it is by default), I can see that emacs truncates lines in org mode If it is set to `nil`, I also seem to get the same result. Reading the docs for `org-startup-truncated`, I expected this to make org mode respect the default. Does anyone know what might be causing this? I also noticed that the message shown after I run `M-x toggle-truncate-lines` seems to be backwards (i.e. it says that truncation has been enabled when it stops wrapping) Edit: I apparently had a hook that was enabling `visual-line-mode` in org mode, which was toggling truncate lines. I'm slightly confused why `truncate-lines` is connected to `visual-line-mode`, so if someone could explain that would be great (though my issue itself is solved)
Illiamen · 2022-04-20 00:24
"Truncate lines" means to let lines continue off-screen and to truncate their display. It is the opposite of line wrapping. `visual-line-mode` wraps lines and allows one to navigate through the wrapped portion as if it were actually on its own line, instead of navigation commands only working on the logical lines. Because they are opposed, enabling one disables the other. See these parts of the manual for definitions: - https://www.gnu.org/software/emacs/manual/html_node/emacs/Continuation-Lines.html - https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html - https://www.gnu.org/software/emacs/manual/html_node/emacs/Visual-Line-Mode.html