From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo 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:31 +0100 Message-ID: References: <83li9qir3i.fsf@gnu.org> <83ehfhj2m6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1363286098 29863 80.91.229.3 (14 Mar 2013 18:34:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Mar 2013 18:34:58 +0000 (UTC) Cc: 13949@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 14 19:35: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 1UGCzq-0005hR-TG for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 19:35:23 +0100 Original-Received: from localhost ([::1]:45754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCzU-0006le-DD for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Mar 2013 14:35:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCzQ-0006io-IS for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:34:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGCzK-0002ZU-Ao for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:34:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGCzK-0002ZQ-7P for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:34:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UGD0U-0002Ua-9V for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2013 14:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2013 18:36: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.13632861549559 (code B ref 13949); Thu, 14 Mar 2013 18:36:02 +0000 Original-Received: (at 13949) by debbugs.gnu.org; 14 Mar 2013 18:35:54 +0000 Original-Received: from localhost ([127.0.0.1]:54564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGD0L-0002U7-Bl for submit@debbugs.gnu.org; Thu, 14 Mar 2013 14:35:54 -0400 Original-Received: from mail-lb0-f180.google.com ([209.85.217.180]:64763) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UGD0J-0002Ts-2m for 13949@debbugs.gnu.org; Thu, 14 Mar 2013 14:35:51 -0400 Original-Received: by mail-lb0-f180.google.com with SMTP id q12so2094753lbc.25 for <13949@debbugs.gnu.org>; Thu, 14 Mar 2013 11:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=6loYWYTBj9Gpw0OtxD4ge3hhf3xbI5av8txWJ9V+0tQ=; b=sBE0TaPzpou1s84iWdeKrvBJBwp4czBqm35Nk7muwZHxGBYZZDwBZRs5YwqiFmQ4Ns B48bme2rf+IrB4LGX7vFNPLluSEpSmBfjetAYYAjMKJV9J9UFVhMugWM/2ytSNy5bkfR 6i0ETK99J9j0qYy0B98iLuzcjKMEvM2Uw32SyJvJlQ3Hx70C3PmkuRxm+cSUXFfiyEnN Q4fYKngWkiwsVHn7uQHJC366BOjHoHnacXSPaj0YyJ3mD91Z2NZxgfShVuhZ8TxW7pkr aMvqb8t7MeNv64FfeeQw3bJ87J3D3PHBJIVb4sjDIbAIO9uEzmDKTLyhvMHoH3O+e0b7 iA+Q== X-Received: by 10.152.145.134 with SMTP id su6mr3144443lab.35.1363286071827; Thu, 14 Mar 2013 11:34:31 -0700 (PDT) Original-Received: by 10.114.29.137 with HTTP; Thu, 14 Mar 2013 11:34:31 -0700 (PDT) In-Reply-To: <83ehfhj2m6.fsf@gnu.org> 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:72496 Archived-At: >> In general, I think that a command should flag the buffer as modified >> only when the buffer contents at the end of the command were different >> from the contents at the beginning of that same command. > > Then your wish is much broader than the original bug report says. > E.g., you'd like the following to leave the buffer marked as > unmodified, right? > > emacs -Q > M-< > C-d > ; > > Or how about this: > > emacs -Q > M-x overwrite-mode RET > M-< > ; These two examples are recipes for modifying the buffer with several different commands whose global effect is void. In principle, one could expect that the buffer be flagged as modified only when the current text is different from the text in the file. That makes sense, and I thought about that, but I agree with you that that behavior, while desirable, would imply a big impact in performance and memory consumption, which is not justified at all for such a small feature. The expected behavior I described above is not exactly this, though, because I put it in a command-by-command basis, but anyway, I think that even then the price to pay would be too high in many cases (one single command may modify a large portion of text, even the whole buffer). > 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. Yes I understood that. I think that a nicer algorithm would be not to modify the buffer unless the resulting text is going to be different to the current one. But if that would entail too much work, I suggest to spend your valuable energy in more important things :) -- Dani Moncayo