unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* stack-trace-on-error vs. debug-on-error.
@ 2005-03-04  9:40 Lute Kamstra
  2005-03-04 10:04 ` Lute Kamstra
  0 siblings, 1 reply; 6+ messages in thread
From: Lute Kamstra @ 2005-03-04  9:40 UTC (permalink / raw)


Does anyone know the difference between stack-trace-on-error and
debug-on-error?

,----[ C-h v stack-trace-on-error RET ]
| stack-trace-on-error's value is nil
| 
| *Non-nil means errors display a backtrace buffer.
| More precisely, this happens for any error that is handled
| by the editor command loop.
| If the value is a list, an error only means to display a backtrace
| if one of its condition symbols appears in the list.
| 
| You can customize this variable.
| 
| Defined in `C source code'.
`----

,----[ C-h v debug-on-error RET ]
| debug-on-error's value is nil
| 
| *Non-nil means enter debugger if an error is signaled.
| Does not apply to errors handled by `condition-case' or those
| matched by `debug-ignored-errors'.
| If the value is a list, an error only means to enter the debugger
| if one of its condition symbols appears in the list.
| When you evaluate an expression interactively, this variable
| is temporarily non-nil if `eval-expression-debug-on-error' is non-nil.
| See also variable `debug-on-quit'.
| 
| You can customize this variable.
| 
| Defined in `C source code'.
`----

On first inspection they seem to do exactly the same.
stack-trace-on-error is not documented in Emacs manual or the Lisp
manual.  Would it be safe to make it an alias of debug-on-error and
mark it as obsolete?

Lute.

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

* Re: stack-trace-on-error vs. debug-on-error.
  2005-03-04  9:40 stack-trace-on-error vs. debug-on-error Lute Kamstra
@ 2005-03-04 10:04 ` Lute Kamstra
  2005-03-04 11:09   ` Lute Kamstra
  2005-03-05 16:59   ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Lute Kamstra @ 2005-03-04 10:04 UTC (permalink / raw)


Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> writes:

> Does anyone know the difference between stack-trace-on-error and
> debug-on-error?

[...]

> On first inspection they seem to do exactly the same.

Silly me: I was testing it in a *scratch* buffer with
eval-expression-debug-on-error on, so errors always took me to the
debugger.  I now see the difference: stack-trace-on-error just prints
a backtrace, while debug-on-error enters the debugger.

> stack-trace-on-error is not documented in Emacs manual or the Lisp
> manual.

I'll document it in the Lisp manual.

Lute.

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

* Re: stack-trace-on-error vs. debug-on-error.
  2005-03-04 10:04 ` Lute Kamstra
@ 2005-03-04 11:09   ` Lute Kamstra
  2005-03-05 16:59   ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Lute Kamstra @ 2005-03-04 11:09 UTC (permalink / raw)


Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> writes:

> I'll document it in the Lisp manual.

Here it is:

*** lispref/debugging.texi      3 Mar 2005 16:28:32 -0000       1.27
--- lispref/debugging.texi      4 Mar 2005 11:02:19 -0000
***************
*** 166,171 ****
--- 166,185 ----
            (lambda () (setq debug-on-error t)))
  @end example
  
+ When the debugger is entered, it shows a backtrace (@pxref{Using
+ Debugger}).  If you like to see the backtrace when an error happens,
+ but you do not want to enter the debugger, you can set the variable
+ @code{stack-trace-on-error} to non-@code{nil}.
+ 
+ @defopt stack-trace-on-error
+ This variable determines whether a backtrace buffer is shown when an
+ error is signalled and not handled.  If @code{stack-trace-on-error} is
+ @code{t}, all kinds of errors display a backtrace; if it is
+ @code{nil}, none do.  If the value is a list, an error only means to
+ display a backtrace if one of its condition symbols appears in the
+ list.
+ @end defopt
+ 
  @node Infinite Loops
  @subsection Debugging Infinite Loops
  @cindex infinite loops

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

* Re: stack-trace-on-error vs. debug-on-error.
@ 2005-03-04 13:47 drkm
  0 siblings, 0 replies; 6+ messages in thread
From: drkm @ 2005-03-04 13:47 UTC (permalink / raw)


> Lute Kamstra wrote:

> drkm <darkman_spam@yahoo.fr> writes:

> >     M-: (setq debug-on-error       nil
> >               stack-trace-on-error t)
> >     C-f
> >     ;; Open a new window and show the stack trace

> >     M-: (setq debug-on-error       t
> >               stack-trace-on-error nil)
> >     C-f
> >     ;; Print "End of buffer" in the echo area

> Yes, and when you do

>     M-: (setq debug-on-error       t
>               debug-ignored-errors nil)
>               stack-trace-on-error nil)
>     C-f

> you enter the debugger.

  Maybe displaying the stack trace would care about
debug-ignored-errors, too?

--drkm



	

	
		
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

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

* Re: stack-trace-on-error vs. debug-on-error.
  2005-03-04 10:04 ` Lute Kamstra
  2005-03-04 11:09   ` Lute Kamstra
@ 2005-03-05 16:59   ` Richard Stallman
  2005-03-07  1:42     ` Chris Smith
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2005-03-05 16:59 UTC (permalink / raw)
  Cc: emacs-devel

    > stack-trace-on-error is not documented in Emacs manual or the Lisp
    > manual.

    I'll document it in the Lisp manual.

Please don't.  It is not worth taking up space in the manual.
Perhaps it should be marked as obsolete, and perhaps it should
be deleted, but I am not sure.

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

* Re: stack-trace-on-error vs. debug-on-error.
  2005-03-05 16:59   ` Richard Stallman
@ 2005-03-07  1:42     ` Chris Smith
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Smith @ 2005-03-07  1:42 UTC (permalink / raw)


         I'll document it in the Lisp manual.

     Please don't.  It is not worth taking up space in the manual.
     Perhaps it should be marked as obsolete, and perhaps it should
     be deleted, but I am not sure.

That could be an interesting addition to http://www.emacswiki.org
Why not post it there?
Best,
Chris

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

end of thread, other threads:[~2005-03-07  1:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-04  9:40 stack-trace-on-error vs. debug-on-error Lute Kamstra
2005-03-04 10:04 ` Lute Kamstra
2005-03-04 11:09   ` Lute Kamstra
2005-03-05 16:59   ` Richard Stallman
2005-03-07  1:42     ` Chris Smith
  -- strict thread matches above, loose matches on Subject: below --
2005-03-04 13:47 drkm

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