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 #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#13949: 24.3.50; `fill-paragraph' should not always put the
	buffer as modified
Date: Thu, 14 Mar 2013 11:27:25 +0100
Am 14.03.2013 08:57, schrieb Dani Moncayo:
>>> This seems a bug, since step #4 didn't make any change in the buffer
>>> contents (the paragraph was already filled).
>>
>> Step #4 does change the buffer, because M-q doesn't know whether the
>> paragraph is already filled, so it fills it anew each time.
>>
>> Emacs always behaved like that.
>
> Ah, Ok.
>
> 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.
>
> In general, I think that a command should flag the buffer as modified
> only when the buffer contents at the end of the command were different
> from the contents at the beginning of that  same command.
>
> But, I don't know complex is that to implement, and perhaps that
> complexity outweighs the benefits.

Hi,

don't think it's complex.
AFAIU the changed-flag presently is set by some commands assumed to change
 the buffer without regard to the result - as shown.

Should not be that complicated to copy the buffers contents into a temporary buffer in this case
and check both buffers afterwards if being equal.

IMHO it's worth to do that change wrt fill-commands.

Best,

Andreas





>
> I'll let you (maintainers) to judge this.  Feel free to close this bug
> if the change isn't worth the trouble.
>
> Thanks.
>





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.