emacs-devel
[Top][All Lists]
Advanced

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

warning about undo info being discarded when in *Backtrace*


From: Drew Adams
Subject: warning about undo info being discarded when in *Backtrace*
Date: Tue, 9 Oct 2007 11:46:20 -0700

1. I'm in the debugger, and the result of a given debugger step is a large
value. It is first printed in buffer *Backtrace* and then later erased. A
*Warning* buffer pops up saying "Warning (undo): Buffer `*Backtrace*' undo
info was 47119441 bytes long. The undo info was discarded because it
exceeded `undo-outer-limit'." That variable's value is 3,000,000.

I can customize `warning-suppress-types' to add (undo discard-info), but I
wonder if users should ever get such a warning when in *Backtrace*. WDOT?
Should such a warning be contextual, dependent on the kind of buffer? I
would want to be informed of a large change in a text or code buffer, but
not in *Backtrace*.


2. This warning is simply appended to buffer *Warning* each time, with no
separation between the various warnings. Shouldn't there be a ^L page
separator or a separator line of `-' chars? And should such a long warning
just be appended literally each time? Perhaps after the first time a
shortened version of the warning could be printed instead?  For example:

----------8<-------------

 Warning (undo): Buffer `*Backtrace*' undo info was 47119441 bytes long.
 The undo info was discarded because it exceeded `undo-outer-limit'.

 This is normal if you executed a command that made a huge change
 to the buffer.  In that case, to prevent similar problems in the
 future, set `undo-outer-limit' to a value that is large enough to
 cover the maximum size of normal changes you expect a single
 command to make, but not so large that it might exceed the
 maximum memory allotted to Emacs.

 If you did not execute any such command, the situation is
 probably due to a bug and you should report it.

 You can disable the popping up of this buffer by adding the entry
 (undo discard-info) to the user option `warning-suppress-types'.

 -----------------------------------------------------

 Warning (undo): Buffer `*Backtrace*' undo info was 24314924 bytes long.
 The undo info was discarded because it exceeded `undo-outer-limit'.

 -----------------------------------------------------

 Warning (undo): Buffer `*Backtrace*' undo info was 24330109 bytes long.
 The undo info was discarded because it exceeded `undo-outer-limit'.

----------8<-------------


3. For this particular warning, does it make sense to repeat the warning
all? If undo was disabled in *Backtrace*, then it is still disabled, no? I
might be mistaken here, however: It's possible that each warning was issued
after the *Backtrace* was entered anew. The warning would presumably be
issued only when undo was enabled and it became disabled.


4. Isn't it inappropriate to include this sentence in the warning: "If you
did not execute any such command, the situation is probably due to a bug and
you should report it"? That sounds ridiculous, to me.

It's always the case that if Emacs seems to be doing something wrong then
you can file a bug. Why is this mentioned only here? It gives the impression
that we expect the code that produces the warning to be bugged. And that
takes away from the _warning_ aspect; it makes it sound like a Chicken
Little exclamation. It's as if we were saying "Emergency!!!!! Oh, but there
might be no emergency. If you think we're mistaken, send a bug report".






reply via email to

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