Subject: Re: bug#4228: 23.1; --script and stack-trace-on-error

From: Dan Nicolaescu <[email-masked]>
Date: Fri, 21 Aug 2009 16:05:11 -0700 (PDT)

Tom Tromey <[email-masked]> writes:

  > I have a script that I run using emacs --script.  When writing the
  > script, I get errors on occasion.  It would be very useful if
  > stack-trace-on-error worked in this situation.  Currently it does not.

As a workaround you might be able to use `debug-on-error':

emacs --batch --eval '(setq debug-on-error t)' --eval '(this-function-does-not exist)'
Debugger entered--Lisp error: (void-function this-function-does-not)
  (this-function-does-not exist)
  eval((this-function-does-not exist))
  command-line-1(("--eval" "(setq debug-on-error t)" "--eval"
  "(this-function-does-not exist)"))
  command-line()
  normal-top-level()

[No idea why stack-trace-on-error does not work]