Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to turn off Emacs's auto line wrapping for the current session? I normally need the automatic wrapping, but when editing a email draft, i don't need that. is there a way to turn it off for a while?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

Depending on which flavor of automatic line wrapping you're using, it'll be one of

M-x longlines-mode

if your lines wrap hard at a given column, or

M-x toggle-truncate-lines

if your lines wrap hard at the right-hand edge of the window, or

M-x visual-line-mode

if your lines "soft wrap" at the whitespace nearest the right-hand edge of the window.

If you've issued the wrong command for your configuration, then the message in the minibuffer will say "...enabled" instead of "...disabled"; in that case, just issue the same command again to re-disable the bogus mode, and try the others until you've found the one which disables the mode you're actually using.

These are buffer-local modes, so issuing the command will affect only the buffer you're in when you do so; in all other buffers, you'll still have the benefit of line wrapping unless you similarly turn off the mode there as well.

Should you wish later to turn line-wrapping back on, just reissue the command you used to disable it.

share|improve this answer
2  
For another culprit implicated in visual line wrapping, try M-x toggle-truncate-lines –  Barry Kelly Oct 22 '13 at 16:18
    
@BarryKelly Good point! I'd forgotten about that one -- I've just edited the answer to include it. –  Aaron Miller Oct 22 '13 at 16:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.