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

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

Re: remove extra whitespace on a line


From: Perry Smith
Subject: Re: remove extra whitespace on a line
Date: Sat, 2 Dec 2006 07:50:50 -0600

On Dec 2, 2006, at 1:02 AM, Eric Hanchrow wrote:


    Suppose     I    have   a   line  like   this.
    How can I remove the extra spaces from the line?  So that I end up with
    this:

    Suppose I have a line like this.

    Exactly like fill-paragraph, but I do not want to "fill" the paragraph,
    only the current line.  Is there an Emacs function to do this?

Not that I know of, but it'd be very easy to create one with a macro,
or Emacs Lisp.

Just narrow to the line, then fill paragraph.

There is a fill-region-as-paragraph command.  check it out.  The key sequence
would be to go to the beginning of the line, mark, go to the end of the line, then
fill-region-as-paragraph.

Also, its quicker for you to type ^h a fill (apropos fill) and scan the results.

Perry Smith ( address@hidden )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



reply via email to

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