[Top][All Lists]

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

Re: fill-paragraph ill designed

From: Andreas Röhler
Subject: Re: fill-paragraph ill designed
Date: Fri, 28 Aug 2015 08:41:39 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Am 28.08.2015 um 08:30 schrieb Tassilo Horn:
Stefan Monnier <address@hidden> writes:

and call `fill-paragraph-function' on them.
Can't see that. May you point me at?
fill-region doesn't (and more importantly can't) delegate to
fill-paragraph-function since fill-paragraph-function doesn't take
begin/end arguments.
Are you saying that there would be a problem if the region starts in the
middle of a paragraph and/or ends in the middle of another paragraph?

I didn't test but I think that case could be solved by narrowing to the
region before doing the filling.  But of course, then the first and last
line would probably be filled beyond fill-column if the region
starts/ends in the middle of a line.  So the region could be extended or
shrunken to complete lines before narrowing with the negative effect
that two partial lines are either not filled or filled too much.

So yes, it seems to be not possible to get it completely right.  But
IMHO that solution is still better than simply ignoring
`fill-paragraph-function' and filling in a way which may break the
syntax of the text.


IMHO fill-region stuff doesn't belong into at all.

Paragraph and region are independent notions - both with its own ideas of beginning and end.
Let's keep them separated.



reply via email to

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