home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / emacs / help / 5470 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  1.5 KB

  1. Path: sparky!uunet!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!mailgzrz.tu-berlin.de!nickel
  2. From: nickel@cs.tu-berlin.de (Juergen Nickelsen)
  3. Newsgroups: gnu.emacs.help
  4. Subject: Re: debugging .emacs
  5. Date: 22 Jan 1993 19:16:29 GMT
  6. Organization: STONE Project, Technical University of Berlin, Germany
  7. Lines: 34
  8. Message-ID: <NICKEL.93Jan22201627@tempest.cs.tu-berlin.de>
  9. References: <PSHANNON.93Jan20220406@iapetus.cv.nrao.edu>
  10. Reply-To: nickel@cs.tu-berlin.de
  11. NNTP-Posting-Host: tempest.cs.tu-berlin.de
  12. In-reply-to: pshannon@iapetus.cv.nrao.edu's message of Thu, 21 Jan 1993 03:04:06 GMT
  13.  
  14. In article <PSHANNON.93Jan20220406@iapetus.cv.nrao.edu>
  15. pshannon@iapetus.cv.nrao.edu (Paul Shannon) writes:
  16.  
  17. > I just made a change to my .emacs file.  When I restart, I learn
  18. > that there's an  
  19. >      "Error in init file"
  20. > Is there some way I can trace the execution of my .emacs so I can
  21. > find out what I did wrong?   Will this allow me to trace into files
  22. > loaded from .emacs?
  23.  
  24. Unfortunately debugging .emacs is not very intuitive. Here is what I
  25. do: 
  26.  
  27. The code in my .emacs is embedded in a let contruct which sets
  28. debug-on-error to t:
  29.  
  30.   (let ((debug-on-error t))
  31.  
  32.     ;; startup code
  33.  
  34.     )
  35.  
  36. This way Emacs doesn't behave different on error in the .emacs when
  37. starting up (i.e. only the non-descriptive message "Error in init
  38. file" appears), but I can start Emacs with the -q switch ("Do not load
  39. your Emacs init file `~/.emacs'"), then do a (load-file ".emacs").
  40.  
  41. When an error occurs, the usual debugger window appears.
  42.  
  43.  
  44. --
  45. Juergen Nickelsen
  46.