unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* warning about undo info being discarded when in *Backtrace*
@ 2007-10-09 18:46 Drew Adams
  2007-10-09 19:02 ` Davis Herring
  2007-10-10 13:01 ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2007-10-09 18:46 UTC (permalink / raw)
  To: Emacs-Devel

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

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

end of thread, other threads:[~2007-10-10 15:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 18:46 warning about undo info being discarded when in *Backtrace* Drew Adams
2007-10-09 19:02 ` Davis Herring
2007-10-09 19:45   ` Drew Adams
2007-10-10 13:01 ` Richard Stallman
2007-10-10 14:14   ` Drew Adams
2007-10-10 14:18     ` David Kastrup
2007-10-10 15:34       ` Drew Adams

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