From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Problem with undo and text properties. Date: Thu, 9 Apr 2015 11:10:40 +0000 Message-ID: <20150409111040.GA3337@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1428577879 18384 80.91.229.3 (9 Apr 2015 11:11:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Apr 2015 11:11:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 09 13:11:09 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YgAMW-00065H-7e for ged-emacs-devel@m.gmane.org; Thu, 09 Apr 2015 13:11:08 +0200 Original-Received: from localhost ([::1]:60843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgAMU-0000We-WC for ged-emacs-devel@m.gmane.org; Thu, 09 Apr 2015 07:11:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgAMI-0000WS-59 for emacs-devel@gnu.org; Thu, 09 Apr 2015 07:10:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgAMC-0001GJ-Hw for emacs-devel@gnu.org; Thu, 09 Apr 2015 07:10:54 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:34174 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgAMC-0001F5-93 for emacs-devel@gnu.org; Thu, 09 Apr 2015 07:10:48 -0400 Original-Received: (qmail 55485 invoked by uid 3782); 9 Apr 2015 11:10:46 -0000 Original-Received: from acm.muc.de (p5B147AD2.dip0.t-ipconnect.de [91.20.122.210]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 09 Apr 2015 13:10:45 +0200 Original-Received: (qmail 3412 invoked by uid 1000); 9 Apr 2015 11:10:40 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185193 Archived-At: Hello, Emacs. I noticed the following problem whilst solving bug #20266. In that bug, in a ~1500 line file.h, mark the entire buffer and yank it to the end of itself, doubling its size, with C-x h, M-w, M->, C-y. This went slowly, and will soon go at a reasonable speed. However, if you then undo this with C-x u, it takes almost forever to complete. The reason is that in the undo list there are lots (~6500) of text property entries like (nil fontified nil 92222 . 92237) which get individually undone. Each such undoing is a buffer change, and so triggers \(before\|after\)-change-functions. This makes the operation SLOW. Perhaps it would be better to amend undo such that the removal (?and re-application?) of text properties doesn't trigger the change hooks. Or perhaps a means could be devised of informing the change hooks that such a change is what is being done. What do you think? -- Alan Mackenzie (Nuremberg, Germany).