[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with undo and text properties.
From: |
Alan Mackenzie |
Subject: |
Re: Problem with undo and text properties. |
Date: |
Mon, 13 Apr 2015 19:10:40 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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).