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