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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jaakov <j_k_v <at> ro.ru>
Cc: 13949 <at> debbugs.gnu.org
Subject: Re: bug#13949: 24.4.1;
 `fill-paragraph' should not always put the buffer as modified
Date: Tue, 22 Mar 2016 18:15:33 +0200
> From: Jaakov <j_k_v <at> ro.ru>
> Date: Tue, 22 Mar 2016 11:50:08 +0100
> 
> > fill-paragraph first removes all the newlines from the paragraph, and
> > then inserts only as many as needed to get a filled paragraph.  So the
> > buffer gets changed at least twice in the process.
> 
> This is _how_ it is done, not _what_ is done. Then "what" is described in the documentation
> 
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Modification.html :
> 
> "Emacs keeps a flag called the modified flag for each buffer, to record whether you have changed the text of the buffer. This flag is set to t whenever you alter the contents of the buffer, and cleared to nil when you save it."
> 
> The description of fill-paragraph at
> 
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Fill-Commands.html
> 
> mentions no exception to the above and "Emacs always behaved like that" is just saying that the issue is old.
> 
> Since fill-paragraph does not heed the above piece of "modified"-flag--documentation, it represents a non-compliance with the (informal) specification, i.e., a typical bug.
> 
> Therefore, I changed the severity from wishlist to normal.

I disagree.  I think Dani is right: the buffer text is changed (at
least twice), which turns on the modified flag.  This situation is
equivalent to inserting a character and then deleting it: the buffer
stays modified, although its text is identical to the original one.

Therefore, this is still a wishlist request for a new feature, not a
bug.  Patches to implement such a feature are welcome.

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.