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


View this message in rfc822 format

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: 13949 <at> debbugs.gnu.org
Subject: bug#13949: 24.3.50; `fill-paragraph' should not always put the buffer as modified
Date: Thu, 14 Mar 2013 19:34:40 +0100
Am 14.03.2013 18:53, schrieb Eli Zaretskii:
>> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  13949 <at> debbugs.gnu.org
>> Date: Thu, 14 Mar 2013 09:38:08 -0400
>>
>>> Well, since the `fill-paragraph' command at step #4 leaved the buffer
>>> with the same contents, flagging the buffer as modified was
>>> unnecessary in this case.
>>
>> 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.
>
>> - 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.  This would require to compute sha1
> before and after every command that might change the buffer.
>
>
>
>

If fill-paragraph is at stake only, store paragraph in a string at beginning and
compare the result should be enough to reset the modify flag if justified.

Andreas




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

Previous Next


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