GNU bug report logs - #13949
24.3.50; `fill-paragraph' should not always put the buffer as modified

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Wed, 13 Mar 2013 22:11:01 UTC

Severity: wishlist

Tags: fixed

Merged with 21155

Found in versions 24.3.50, 24.4.1, 25.0.50

Fixed in version 26.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 13949 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 13949 <at> debbugs.gnu.org, dmoncayo <at> gmail.com
Subject: Re: bug#13949: 24.3.50;
	`fill-paragraph' should not always put the buffer as modified
Date: Fri, 15 Mar 2013 00:02:00 -0400
>> AFAIK there are two ways to go about it:
>> - compare the sha1 of the paragraph before and after filling and reset
>> buffer-modified-p if it shows the text hasn't changed.
> This has the disadvantage of scanning the entire buffer, which might
> increase paging and memory pressure in general.

I think you can compute the sha1 of only the paragraph, so that should
be cheap enough that it's not a big issue.

>> - change fill.el so that filling paragraph doesn't just "unfill whole
>> paragraph + fill whole paragraph" but instead goes line by line, and
>> only modifies the text where there's a need to.
> But it sounds like Dani wants this behavior not only for
> fill-paragraph, but for any command that can potentially modify the
> buffer, but actually doesn't.

While I think he'd be happy if we could do that, I didn't take his
request to be so extreme.  So even if we can't handle all cases, it
makes sense to try and improve this one case.



        Stefan




This bug report was last modified 8 years and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.