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.3.50; `fill-paragraph' should not always put the buffer as modified Date: Thu, 14 Mar 2013 19:53:41 +0200 Message-ID: <83boalj2ai.fsf@gnu.org> References: <83li9qir3i.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1363283697 5083 80.91.229.3 (14 Mar 2013 17:54:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 17:54:57 +0000 (UTC) Cc: 13949@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 14 18:55:20 2013 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 1UGCN4-0001P8-3h for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 18:55:18 +0100 Original-Received: from localhost ([::1]:53377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCMh-0007fB-I3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 13:54:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCMe-0007dp-QH for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 13:54:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGCMc-00040H-Uo for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 13:54:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCMc-0003zV-S7 for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 13:54:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UGCNm-0001XY-Es for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 13:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2013 17:56:02 +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.13632837035853 (code B ref 13949); Thu, 14 Mar 2013 17:56:02 +0000 Original-Received: (at 13949) by debbugs.gnu.org; 14 Mar 2013 17:55:03 +0000 Original-Received: from localhost ([127.0.0.1]:54501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGCMo-0001WL-Li for submit@debbugs.gnu.org; Thu, 14 Mar 2013 13:55:03 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:42842) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGCMl-0001Vo-UH for 13949@debbugs.gnu.org; Thu, 14 Mar 2013 13:55:01 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MJN00G00W8I2J00@a-mtaout22.012.net.il> for 13949@debbugs.gnu.org; Thu, 14 Mar 2013 19:53:41 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJN00GEAWDF2Z00@a-mtaout22.012.net.il>; Thu, 14 Mar 2013 19:53:39 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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:72491 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , 13949@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.