From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified Date: Sun, 27 Mar 2016 17:46:53 +0200 Message-ID: References: <56F12360.5030301@ro.ru> <83y49a4hga.fsf@gnu.org> <56F1837D.4060300@ro.ru> <83io0e4b5r.fsf@gnu.org> <56F19203.5040501@ro.ru> <87a8lkd2bc.fsf@wanadoo.es> <83lh54ynol.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459093644 5289 80.91.229.3 (27 Mar 2016 15:47:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Mar 2016 15:47:24 +0000 (UTC) Cc: =?UTF-8?Q?=C3=93scar?= Fuentes , jwiegley@gmail.com, j_k_v@ro.ru, 13949@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 27 17:47:11 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 1akCuE-0006Xk-Jt for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Mar 2016 17:47:10 +0200 Original-Received: from localhost ([::1]:36400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akCuD-0002nE-Ed for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Mar 2016 11:47:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akCu9-0002mq-MT for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2016 11:47:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akCu6-0003qr-EM for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2016 11:47:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akCu6-0003qn-Ao for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2016 11:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1akCu6-0004Qz-6Y for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2016 11:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Magne Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Mar 2016 15:47: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.145909362017030 (code B ref 13949); Sun, 27 Mar 2016 15:47:02 +0000 Original-Received: (at 13949) by debbugs.gnu.org; 27 Mar 2016 15:47:00 +0000 Original-Received: from localhost ([127.0.0.1]:40251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akCu3-0004Qb-Nn for submit@debbugs.gnu.org; Sun, 27 Mar 2016 11:46:59 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:60986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1akCu2-0004QU-UJ for 13949@debbugs.gnu.org; Sun, 27 Mar 2016 11:46:59 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1akCtx-0002qt-PV; Sun, 27 Mar 2016 17:46:57 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEX9/fjg4NG7xqmitKQ3 Aww0FyCKmJgxBw+DT0VoMDHP1spUAA/////+//7v7diZblILeSygAAABlUlEQVQ4jd3Sv0vDQBQH 8KggDmnpLdIpduwiHYogQXSJdFcuFgeXwtG6xzN/QdNVVKgBaRFEMusgWWJHaTt0EIegnZzSFroY F+v9ahsVce8bQu59eLkL95Waf5Q0K+BJpOI+X3nr0DgPODRGtFY5rGFSR3IEhmzkCbM6iAAbab1z MP0I0JFnLKoWATLilUX/GHQjMPSXSM+A5HEBgDyFUapM+xDumQ4AiQmEVoX3IdwnoPgCQsvKYcz6 UKUgcyD9Uyxg16EQCAjDM4ihnrfyJdWpK0qXQiqZ6Wx1SnPm5aKOUMEB/VhcCiQv85keDTLLxStz 51ovFtQ6ULr9fiA1B2SDiq1hfig9q9I9AIEXctKqq+U4oCm0klbVdW81CmQPCnXy6+QGXyu267qa hg3SR9ksOy692gYZYGIghMSnehTaHFxtewKKzMJwI+RuAjGeEi9tT6BAoTeOT/uDyb2A3jRXD0wE JKKBe6RH5lD7nsR5IhRQzf8R0YWqTWHT/5XdQfXkDR2O+wLYcmXDA/Sl9U/aZx2+ACk4Di7693OD AAAAAElFTkSuQmCC In-Reply-To: <83lh54ynol.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 Mar 2016 17:56:26 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:115573 Archived-At: Eli Zaretskii writes: >> + (when (and (not (string= h "")) >> + (string= h (secure-hash 'md5 (current-buffer)))) >> + (set-buffer-modified-p nil))) > > Thanks, but I'm not sure computing the hash is enough: the functions > involved in refilling can change text properties, so the test should > also account for that. True. Do we have an efficient way to get the text properties, too? (I mean, without doing a `buffer-substring'...) Hm... looking at `secure-hash', it seems incredibly inefficient. (Unless I'm misreading the code.) All the coding system conversion stuff is completely irrelevant for this usage... What we basically need is a fast hashing function for the buffer, including text properties. So it would basically do: 1) move the gap out of the way 2) call the hashing function on the buffer contents c) call the hashing function on the text properties 4) hash them together This should be really fast, I think? If the text properties are available in a fashion where we can do some hashing on them without copying them around a lot. And I know nothing about how text properties are represented. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no