bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as


From: Eli Zaretskii
Subject: 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@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.





reply via email to

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