2005-11-25

Handy Emacs Hint

Let's say you've got a document that you want to wrap at a shorter length than usual: for example, if you have the regular line length of 80 (or whatever yours is set to be), but you want to cut it down to 72 or even 64 characters.

Here is how it's done:

Type "M-x set-variable". Of course, this is conventional Emacs notation. You don't actually type 'M', '-', 'x', but instead press the meta key (usually the 'Alt' key (but not always!)) and 'x' simultaneously.

The variable you set is fill-column, so you type "fill-column". This will prompt you to "set line-length to ____", so you can enter "72" or "64" or whatever positive integer you choose.

This can be very handy at times and save you from having to do the old-fashioned hack of typing "1234567890" and then copying and pasting it.

No comments: