[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[T. V. Raman] read-only modes should be using buffer-disable-undo?

From: Dave Love
Subject: [T. V. Raman] read-only modes should be using buffer-disable-undo?
Date: Wed, 05 Jan 2005 00:10:13 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.2 (gnu/linux)

raman sent this to an rms-free list (as far as I know).  He has a good
point -- I'm surprised man doesn't already do that.  Maybe that's why
it's always seemed so slow.

I'm not convinced about this prompting about undo anyway.  I think it
should at least offer more information, like a hint that you probably
do want to discard it.  The question may be too obscure otherwise.

--- Begin Message --- Subject: read-only modes should be using buffer-disable-undo? Date: Sun, 2 Jan 2005 08:56:03 -0800 (PST)
I run 21.3.50 from CVS, and recent updates to simple.el 
produce a yes/no dialog when the undo  information to save becomes
large; this pointed out an interesting place where Emacs  libs could
be optimizing but apparently aren't -- namely, cases like man-mode.

as an exercise, try M-x man gcc
and notice that GC gets triggered at least twice with yes/no dialogs
for throwing away the undo information; but all this could be avoided
if Man-mode first executed buffer-disable-undo on the buffer where the
man page is being formatted.

You could probably do something similar during the execution of a
shell command in shell-mode/comint-mode and friends; this would win in
the case of long running shell commands that produce lots of output a
small chunk at  time.

Best Regards,

Email:  address@hidden
WWW:    http://emacspeak.sf.net/raman/
AIM:    TVRaman
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
IRC:    irc://irc.gnu.org/emacspeak

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]