From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= 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:34:40 +0100 Message-ID: <51421840.1070208@easy-emacs.de> References: <83li9qir3i.fsf@gnu.org> <83boalj2ai.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363286094 29824 80.91.229.3 (14 Mar 2013 18:34:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 18:34:54 +0000 (UTC) To: 13949@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 14 19:35:19 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 1UGCzm-0005YK-2X for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 19:35:18 +0100 Original-Received: from localhost ([::1]:45601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCzP-0006gF-GA for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 14:34:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCzL-0006fz-4B for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:34:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGCzJ-0002ZM-Uq for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:34:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCzJ-0002ZI-R6 for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:34:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UGD0T-0002UV-Tk for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2013 18:36: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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13632861179506 (code B ref -1); Thu, 14 Mar 2013 18:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Mar 2013 18:35:17 +0000 Original-Received: from localhost ([127.0.0.1]:54561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGCzk-0002TG-DC for submit@debbugs.gnu.org; Thu, 14 Mar 2013 14:35:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54078) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGCzg-0002T0-MC for submit@debbugs.gnu.org; Thu, 14 Mar 2013 14:35:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGCyP-00028W-PB for submit@debbugs.gnu.org; Thu, 14 Mar 2013 14:33:54 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:55118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCyP-00028R-MF for submit@debbugs.gnu.org; Thu, 14 Mar 2013 14:33:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCyO-0006aa-9h for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:33:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGCyL-00026Y-Ed for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:33:52 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.10]:49579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCyL-000269-59 for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:33:49 -0400 Original-Received: from [192.168.178.21] (brln-4d0c1994.pool.mediaWays.net [77.12.25.148]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0Me0wT-1U6dHD45ID-00PdtR; Thu, 14 Mar 2013 19:33:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: <83boalj2ai.fsf@gnu.org> X-Provags-ID: V02:K0:LUh3c8ualQp81XMnhOjxfYLOvjB0n/uZDcPkIw0jt9a S+eyrJgoQYGWuI6gQUQegkVl0GCqmkLxvbV3xlUNjhB+J2VIKf C9k/GdwWmCkMjUn9hz4WWP8aLHik3aPhicPSIsLIF9+dACX9wj cGNplKvLuAToMJTDg7gfAeYbKq7iN2C/Q9XUdPcykFsUp4ws4u jkBeqWt0+rGj3k/kuA97qwJyCpiN/Kc4vBGfkFWAzhqNDvXVJu F6jyd+TFu3yq9LbRIfISi0s4EqOhiZzDi/mKvmXN8Tm78sIYrY GF+QG5Ki7H/2GFhUZ1OwIz/jFcbY0NPKyjyWarKvZvKJdUHgz+ COEAqUhxtl2m6LHH3PWqqdV208O5QNFl4d7j5PK/Y X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:72495 Archived-At: Am 14.03.2013 18:53, schrieb Eli Zaretskii: >> 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. > > > > If fill-paragraph is at stake only, store paragraph in a string at beginning and compare the result should be enough to reset the modify flag if justified. Andreas