Path: utzoo!attcan!uunet!yale!Ram-Ashwin From: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Newsgroups: comp.emacs Subject: Re: Better error handling for .emacs Message-ID: <61162@yale-celray.yale.UUCP> Date: 19 May 89 18:27:35 GMT References: <8458@chinet.chi.il.us> <6930010@hpdtl.HP.COM> <40186@bbn.COM> Sender: root@yale.UUCP Reply-To: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Lines: 25 In-reply-to: jr@bbn.com (John Robinson) In article <40186@bbn.COM>, jr@bbn.com (John Robinson) writes: > In article <6930010@hpdtl.HP.COM>, conway@hpdtl (Daniel F. Conway) writes: > > Unfortunately, setting debug on like this does not seem to take > >effect until after the init file is read, at least not under version 18.52, so > >I still get the bogus error message if my init file is bad. I have found that > >when this occurs, I can do a load-file in the scratch buffer with the init > >file and find where the error is. > > If emacs had the right function, you could leave the debug-on-error > out of .emacs and issue: > > emacs -q -f set-debug-on-error -l ~/.emacs > > or maybe there should be a run-time switch to have this effect. It would be nice if you could always ask for a backtrace after an error occurred. The purpose of "debug-on-error" would then be to have this happen automatically if desired. Most Lisp systems (and even some shells) provide a "backtrace" command that can be invoked after an error has occurred, without having to "anticipate" the error (i.e., without having to turn on any flags in advance). This would take care of Daniel's problem, and would be very useful in other situations too. -- Ashwin.