help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using autofill./


From: Giorgos Keramidas
Subject: Re: Using autofill./
Date: 04 Oct 2005 20:32:51 +0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Shashank Khanvilkar <shashank@mia.ece.uic.edu> writes:
> However suppose I have a paragraph like the below:
> Background
> ----------
> * This is a test message. This is a test message. This is a test
> message.This  is a test message. This is a test message. This is a test
> message. This is a test message. This is a test message.
> * This is a second test message.  This is a second test message.
> This is a second test message.  This is a second test message.
> This is a second test message.
>
> How do i ask emacs to apply the new line width.
> I tried using <Meta-q> but it makes the above lines as:
>
> Background ---------- * This is a test message. This is a test
> message. This is a test message.  This is a test message. This
> is a test message. This is a test message. This is a test
> message. This is a test message.  * This is a second test
> message.  This is a second test message.  This is a second
> test message.  This is a second test message.  This is a
> second test message.

You can set a "fill prefix" of a couple of spaces.  The M-q command
respects the value of fill-prefix.  To set the value of fill-prefix
use the ``C-x .'' command.

With a fill prefix of 2 spaces and the following original text:

    * This is a test message. This is a test message. This
      is a test message.This is a test message. This is a test
      message. This is a test message. This is a test
      message. This is a test message.

you can set the fill-column to its new value (i.e. 40) and
refill the paragraph by hitting M-q just once:

    * This is a test message. This is a test
      message. This is a test message.This is a
      test message. This is a test message. This
      is a test message. This is a test
      message. This is a test message.

I usually reformat list items by setting the fill-prefix to the
indentation of the second line (the first one has the bullet).

Note that M-q is *not* the same as auto-fill-mode, but auto-fill-mode
also respects the current fill-prefix.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]