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: Re: Problem with undo and text properties. Date: Mon, 13 Apr 2015 19:10:40 +0000 Message-ID: <20150413191040.GA6324@acm.fritz.box> References: <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 1428952271 31872 80.91.229.3 (13 Apr 2015 19:11:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Apr 2015 19:11:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 13 21:11:01 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 1Yhjl5-00010D-J3 for ged-emacs-devel@m.gmane.org; Mon, 13 Apr 2015 21:10:59 +0200 Original-Received: from localhost ([::1]:53128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhjl4-0003j7-Rs for ged-emacs-devel@m.gmane.org; Mon, 13 Apr 2015 15:10:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhjks-0003j0-Vp for emacs-devel@gnu.org; Mon, 13 Apr 2015 15:10:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yhjkq-0004Pa-5V for emacs-devel@gnu.org; Mon, 13 Apr 2015 15:10:46 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:56839 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhjkp-0004PO-Rs for emacs-devel@gnu.org; Mon, 13 Apr 2015 15:10:44 -0400 Original-Received: (qmail 11693 invoked by uid 3782); 13 Apr 2015 19:10:41 -0000 Original-Received: from acm.muc.de (p548A4102.dip0.t-ipconnect.de [84.138.65.2]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 13 Apr 2015 21:10:40 +0200 Original-Received: (qmail 6716 invoked by uid 1000); 13 Apr 2015 19:10:40 -0000 Content-Disposition: inline In-Reply-To: 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:185380 Archived-At: Hello, Stefan. Sorry for the delay in responding. My network connection went down on Thursday afternoon, and I had to wait until this morning to get it back. You've got to love Deutsche Telekom. :-( [Context: load medium sized file.h. C-x h, M-w, M->, C-y, C-x u. The C-x u goes slowly.] On Thu, Apr 09, 2015 at 09:17:04AM -0400, Stefan Monnier wrote: > > 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) > The problem is that those entries shouldn't be there in the first place. > Whoever puts them there needs a with-silent-modification. 1. M-w puts the string-version-of-the-entire-file (including text properties) into the kill ring. 2. C-y first appends that string to the buffer, ... 3. ... then separately removes the yank-excluded-properties from the buffer, creating (nil fontified nil 92222. 92237) in buffer-undo-list in so doing. The part of C-y that does 3 is remove-yank-excluded-properties. I think you're suggesting we put a with-silent-modification around the critical bits in remove-yank-excluded-properties. Maybe I'll try that. > Stefan -- Alan Mackenzie (Nuremberg, Germany).