I'm a new user to emacs. How do I configure emacs so that line wrapping does not break in the middle of a word?
Can you specify what kind of wrapping are you talking about ?
M-x toggle-truncate-lines disable allow you to disable visually line breaking.
M-x auto-fill-mode + M-q allow you to wordwrap for real a pre-existing paragraph.
Add this to your init file:
(setq-default word-wrap t)
Alternatively, press C-h vword-wrap
in Emacs and follow the "customize" link near the end.
If you want to emulate the behavior of an editor like Notepad, you might want to turn on visual line mode. While setting word-wrap will cause line wrapping at word boundaries, any action you take on a line (e.g., moving up/down or killing) will still respect the newline character. Visual line mode will treat each display line as though it had a newline at the end.
(visual-line-mode t)
id got to it first. You can read more about similar features at
http://www.emacswiki.org/emacs/LineWrap
As a new user you might benefit from reading the page as there are some subtleties and history to deal with about word-wrap and long lines.
I discovered longlines-mode only recently (I think I was spelunking through the emacs Info docs). It wraps as you would expect in other UI editors' word-wrap feature. It's especially useful when I'm reading or writing free text with no newlines (a la Word) without the ugly mid-word wrapping that happens when you use M-x toggle-word-wrap
.
http://www.gnu.org/software/emacs/manual/html_node/emacs/Longlines.html
my config:
(setq longlines-wrap-follows-window-size t)
(global-set-key [(control meta l)] 'longlines-mode)