bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Better debugging of .emacs, please


From: Jari Aalto+mail.emacs
Subject: Re: Better debugging of .emacs, please
Date: Thu, 31 Jan 2002 23:45:16 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i386-*-nt5.0.2195) (i386-*-nt5.0.2195)

* | Summary:  In emacs 20.7 I was allowed to put a \275 in a string in
| emacs, e.g.,
| 
|   (global-set-key "\C-\275" 'apropos)
| 
| In version 21.1, I am not allowed to do this.  I have found another way
| of doing this (global-set-key [(control 275)] 'apropos), so it is no
| longer a problem.  I expect you have changed this behaviour on purpose.
| My bug report is the fact that I could not get any help from using the
| --debug-init option.  All I got was the stack trace:
| 
| Debugger entered--Lisp error: (error "Invalid modifier in string")
|   eval-buffer(#<buffer  *load*> nil "~/.emacs" nil t)
|   load-with-code-conversion("c:/to/.emacs" "~/.emacs" t t)
|   load("~/.emacs" t t)
|   #[nil & some more garbage that I cannot paste into outlook]
|   command-line()
|   normal-top-level()
| 
| which gave me only little help in finding the bug.  I would like to
| suggest that it tell me where in .emacs the offending modifier was, or
| that it print out the offending modifier.  I found the offender through
| binary searching through the .emacs file.

While not related to the bug report directly (Emacs should give better
diagnostics), have a look at package tinylisp.el which can put
you to the point where error happens.

the feature is activated with:


    M-x load-library tinylisp
    C-x C-f ~/.emacs          <loading file will turn on tinylisp-mode>

Now run:

    M-x tinylisp-error-find-1

Or if that didn't help there is another implementation:

    M-x tinylisp-error-find-2
    
There are both bound to faster mode keys:

    $ !  tinylisp-error-find-1
    $ #  tinylisp-error-find-2       


Jari


http://tiny-tools.sourceforge.net/
tinylisp.el -- Emacs lisp programming help grab-bag

Created      : 1997-02
Last modified: 2002-01-28
Maintainer   : Jari Aalto <jari.aalto@poboxes.com>
Version      : 1.62

...

        o   FINDS LISP CODE ERROR POINT.

    Find lisp code error position
  
        The most useful functions in this package are the two error
        finding functions which try their best to put you on a line that
        generates the lisp error. You can use this feature to e.g. check
        your ~/.emacs startup files and find the spot where
        `eval-current-buffer' fails.
  
        The best function, `tinylisp-error-find-1', was programmed by Mikael
        Djurfeldt <mdj@sanscalc.nada.kth.se> and is included here with his
        permission. Thanks Mikael, the funstion has saved from me a lot
        of debugging!
  
...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]