From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83y49a4hga.fsf@gnu.org> References: <56F12360.5030301@ro.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1458663453 17219 80.91.229.3 (22 Mar 2016 16:17:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 16:17:33 +0000 (UTC) Cc: 13949@debbugs.gnu.org To: Jaakov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 22 17:17:22 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aiOzg-0002Bo-DI for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 17:17:20 +0100 Original-Received: from localhost ([::1]:38244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiOzf-0002VX-K3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2016 12:17:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiOzS-0002IO-Nx for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiOzO-000803-5n for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiOzO-0007zy-2U for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aiOzN-0000IR-VH for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2016 12:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Mar 2016 16:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13949 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13949-submit@debbugs.gnu.org id=B13949.1458663365899 (code B ref 13949); Tue, 22 Mar 2016 16:17:01 +0000 Original-Received: (at 13949) by debbugs.gnu.org; 22 Mar 2016 16:16:05 +0000 Original-Received: from localhost ([127.0.0.1]:60201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiOyT-0000EQ-9T for submit@debbugs.gnu.org; Tue, 22 Mar 2016 12:16:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aiOyR-0000Cd-Gm for 13949@debbugs.gnu.org; Tue, 22 Mar 2016 12:16:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiOyG-0007jF-Gg for 13949@debbugs.gnu.org; Tue, 22 Mar 2016 12:15:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiOyG-0007jA-Cf; Tue, 22 Mar 2016 12:15:52 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4099 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aiOyF-0000CW-Pz; Tue, 22 Mar 2016 12:15:52 -0400 In-reply-to: <56F12360.5030301@ro.ru> (message from Jaakov on Tue, 22 Mar 2016 11:50:08 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115333 Archived-At: > From: Jaakov > 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.