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

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

Re: Looking for (fill-paragraph) Like Functions


From: Micha Feigin
Subject: Re: Looking for (fill-paragraph) Like Functions
Date: Wed, 29 Nov 2006 16:35:07 +0200

On Wed, 29 Nov 2006 10:48:23 GMT
Passer By <address@hidden> wrote:

> 
> 
> 
> My first learned function and loved function of emacs was the M-q but
> there are cases where M-q doesn't do exactly what i want and i would
> like to make an improved version or find one somewhere.
> 
> 
> Here is an example of what i would want my improved (fill-paragraph)
> to do.
> 
> 
> 1) this is a sentence
> 2) this is another sentence in a list 
> 3) this is a sentence is long i would like to hit M-q now but emacs will not
> just rap this line it will rap all the lines and that makes me mad 4) this is
> another line M-q here would be good if it would make all the lines nice up to
> 1)
> 

The problem is with how do you recognize the end of a paragraph? You can't use
the end of line symbol as that is the same symbol that is used to break a line
in the middle of the paragraph and there is no end of paragraph symbol for text
files (AFAIK, maybe unicode has something).

The solution is to use the latex syntax and break lines with enter and
paragraph with an empty line. I think that that will solve your problem. i.e:

This is paragraph one
second line of paragraph one

This is paragraph two.

> 
> I would like my M-q to work for any "bulleted" list like this
> 
> so the above when My M-q'ed any place in the list would go to 
> 
> 1) this is a sentence
> 2) this is another sentence in a list 
> 3) this is a sentence is long i would like to hit M-q now but emacs
>    will not just rap this line it will rap all the lines and that
>    makes me mad
> 4) this is another line M-q here would be good if it would make all
>    the lines nice up to 1)
> 
> instead of this 
> 
> 
> 1) this is a sentence 2) this is another sentence in a list 3) this is
> a sentence is long i would like to hit M-q now but emacs will not just
> rap this line it will rap all the lines and that makes me mad 4) this
> is another line M-q here would be good if it would make all the lines
> nice up to 1)
> 
> 
> Thanks!
> _______________________________________________
> help-gnu-emacs mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 




reply via email to

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