unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem with undo and text properties.
@ 2015-04-09 11:10 Alan Mackenzie
  2015-04-09 11:19 ` João Távora
  2015-04-09 13:17 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2015-04-09 11:10 UTC (permalink / raw)
  To: emacs-devel

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).



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-13 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09 11:10 Problem with undo and text properties Alan Mackenzie
2015-04-09 11:19 ` João Távora
2015-04-09 13:17 ` Stefan Monnier
2015-04-13 19:10   ` Alan Mackenzie
2015-04-13 21:23     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).