[gnu.emacs] Better error handling for .emacs

jkh@pcsbst.UUCP (jkh) (05/12/89)

I saw something about this a couple of months back, but I'm afraid that
I didn't save the pertinent information.

Question: Is there some way to get more information than "Error in init file"
when emacs doesn't like your .emacs file?

					Jordan

-- 
--------
				Jordan Hubbard
				PCS Computer Systeme GmbH
				West Germany
	UUCP:			{uunet,decwrl}!pyramid!pcsbst!jkh
	ARPA:			jkh@violet.berkeley.edu

Hey! Leave that alone!

lfk@mbio.med.upenn.edu (Lee Kolakowski) (05/14/89)

In article <822@pcsbst.UUCP> jkh@pcsbst.UUCP (jkh) writes:
> Question: Is there some way to get more information than "Error in init file"
> when emacs doesn't like your .emacs file?

What I do is while still in emacs 
	"M-x set-variable"
	"debug-on-error"
	"1"

Then 	"M-x load-file"
	"~/.emacs"

Then the debugging window will have a trace of the errors including
what is wrong.


--

Frank Kolakowski 

=====================================================================
|lfk@mbio.med.upenn.edu                 ||      Lee F. Kolakowski   |
|kolakowski@mscf.med.upenn.             ||	Univ. of Penna.     |
|c/o jes@eniac.seas.upenn.edu		||	Dept of Chemistry   |
|kolakowski@c.chem.upenn.edu		||	231 South 34th St.  |
|bcooperman.kolakowski@bionet-20.arpa	||	Phila, PA 19104     |
|AT&T:	1-215-898-2927			||--------------------------|
|#include <litigate.h>			||      One-Liner Here!     |
=====================================================================

steiner@topaz.rutgers.edu (Dave Steiner) (05/18/89)

Here's what I'm using at Rutgers:

*** startup.el.ORIG	Wed May 25 23:57:00 1988
--- startup.el	Tue May 17 18:28:53 1988
***************
*** 119,125
  			 ;; Don't you dare turn this off for anyone
  			 ;; except yourself.
  			 (load "default" t t)))))
!       (error (message "Error in init file")))
      (if (get-buffer "*scratch*")
  	(save-excursion
  	  (set-buffer "*scratch*")

--- 119,130 -----
  			 ;; Don't you dare turn this off for anyone
  			 ;; except yourself.
  			 (load "default" t t)))))
!       (error (if (> (length error) 1)
! 		 (message "Error in init file [%s: %s]"
! 			  (get (car error) 'error-message)
! 			  (mapconcat 'prin1-to-string (cdr error) ", "))
! 	       (message "Error in init file [%s]"
! 			(get (car error) 'error-message)))))
      (if (get-buffer "*scratch*")
  	(save-excursion
  	  (set-buffer "*scratch*")
-- 

arpa: Steiner@TOPAZ.RUTGERS.EDU
uucp: ...{ames, cbosgd, harvard, moss}!rutgers!topaz.rutgers.edu!steiner