How do you use line-wrap (autoscrolling?) in emacs? So that the portion that doesn't fit on the screen isn't shown as opposed to shown on the next line?
+6
A:
What you describe sounds more like linewrap than scrolling. If that's what you're actually interested in, it's controlled with buffer-local variable truncate-lines
. You can use customization to set it globally, or use hooks. For example, I used to prevent linewrap in dired with this:
(add-hook 'dired-mode-hook (lambda () (setq truncate-lines t)))
JB
2009-06-04 12:57:35
tx man, for the term : M-xtoggle-truncate-lines did the trick. Although for me (emacs newbie) there's only a fine line between scrolling and truncating, since scrolling seems to imply truncation.
Peter
2009-06-04 13:22:18
+3
A:
You can also change this from the menu.
Options->Line Wrapping in this Buffer->Truncate Long Lines
Or if you want this globally you can use the function
global-visual-line-mode
mamboking
2009-06-04 13:22:48
I don't have that `global-visual-line-mode` function. I'm on GNU 22.3.1, is it newer that that?
JB
2009-06-04 14:48:51
+2
A:
toggle-truncate-lines allows you to turn it on-off (as Peter noted in a comment on this post)
I have it mapped to a function-key:
(define-key global-map [f5] 'toggle-truncate-lines)
It won't work in vertically-split (partial-width) windows unless truncate-partial-width-windows is set to nil (from my .emacs):
(setq-default truncate-lines t)
(setq truncate-partial-width-windows nil) ;; for vertically-split windows
Michael Paulukonis
2009-06-09 20:04:21