From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier 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 09:38:08 -0400 Message-ID: References: <83li9qir3i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363268340 32295 80.91.229.3 (14 Mar 2013 13:39:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 13:39:00 +0000 (UTC) Cc: 13949@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 14 14:39:23 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 1UG8NO-0003KJ-DR for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 14:39:22 +0100 Original-Received: from localhost ([::1]:34147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG8N1-0007eA-U9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 09:38:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG8Mu-0007dt-Ck for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 09:38:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG8Mt-0004ce-4Z for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 09:38:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG8Mt-0004ca-2D for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 09:38:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UG8O2-00013j-1A for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 09:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2013 13:40: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.13632683684023 (code B ref 13949); Thu, 14 Mar 2013 13:40:01 +0000 Original-Received: (at 13949) by debbugs.gnu.org; 14 Mar 2013 13:39:28 +0000 Original-Received: from localhost ([127.0.0.1]:53238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UG8NS-00012p-V8 for submit@debbugs.gnu.org; Thu, 14 Mar 2013 09:39:27 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:38619) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UG8NR-00012c-Lt for 13949@debbugs.gnu.org; Thu, 14 Mar 2013 09:39:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KL9/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av8EABK/CFHO+KL9/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="4897437" Original-Received: from 206-248-162-253.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 14 Mar 2013 09:38:07 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 51E0E67A4D; Thu, 14 Mar 2013 09:38:08 -0400 (EDT) In-Reply-To: (Dani Moncayo's message of "Thu, 14 Mar 2013 08:57:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:72467 Archived-At: > 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. - 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. The second option has the advantage that it truly doesn't modify the buffer (hence, less font-lock work, less redisplay work, and also text-properties, overlays and markers aren't affected, contrary to the current behavior), but it requires more coding effort. Stefan