[Top][All Lists]

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

RE: Intrusive spaces

From: Jay Bingham
Subject: RE: Intrusive spaces
Date: Wed, 7 Jun 2006 17:34:02 GMT

On Wednesday, June 07, 2006 11:20 AM B. T. Raven Wrote:

> I ran M-| bc on this region:
> define fact(n) {
>    if (n <= 1) return (n);
>       return (n * fact(n-1));
> }
> fact(666)
> The resulting very big number fills about 24 lines each terminated with
> C-j. I then ran the following function
> (defun unfill-paragraph () ;; bound to C-x M-q
>   "Do the opposite of fill-paragraph; stuff all lines in the current
> paragraph into a single long line."
>   (interactive)
>   (let ((fill-column 90002000))
>     (fill-paragraph nil)))
> on those 24 lines. Instead of joining them seamlessly, it puts in a
> space where the C-j had been. I haven't noticed this happening with
> ordinary text before. This happens with 21.3 on dos shell msw98.


I just ran a quick fill paragraph test using text rather than numbers and what 
I see is that doing fill-paragraph with a large fill-column setting does in 
fact put spaces where the ^js were.  (I am running Emacs 21.3 on XP).  In fact 
this is what I would expect fill-paragraph to do because usually paragraphs are 
an series of words separated by spaces and line feeds rather than a string of 
numbers separated by line feeds.  For example if I had following two lines:

You should have a go
at it. 

I would expect then to be filled as:
You should have a go at it.

not as:
You should have a goat it.

Granted there may be times when even with text is would be preferable to not 
have a space replace the line feed, such as:

He went that-a-

should be filled as:
He went that-a-way.

not as:
He went that-a- way.

but they are rare and fill-paragraph is not that smart.


Call Anyone, Anytime, Anywhere in the World - FREE!
Free Internet calling from NetZero Voice
Visit today!

reply via email to

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