emacs-devel
[Top][All Lists]
Advanced

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

Re: Error report on startup


From: Juanma Barranquero
Subject: Re: Error report on startup
Date: Thu, 1 Mar 2007 15:30:51 +0100

On 3/1/07, Herbert Euler <address@hidden> wrote:

Error report on startup could be confusing.  Consider the following in
~/.emacs:

    (with-current-buffer (find-file-noselect "some-file.el")
      (read (current-buffer)))

If ``some-file'' does not contain valid Lisp expression, the user will
see an error saying ``End of file during parsing:
/home/somebody/.emacs''.  However, the ~/.emacs file is valid; what is
not valid is the file some-file.el.

I don't see anything confusing. You're manually loading some-file.el
and reading its content in the context of loading .emacs, so certainly
it is ~/.emacs which is not valid (or, which is doing something
invalid). That the error comes from processing an elisp module is
irrelevant. It's not different to loading a non-lispy data file in
.emacs and then doing some kind of processing with it that causes an
error.

If instead you used `load' or `require' to load some-file.el you'd get:

 An error has occurred while loading `c:/home/.emacs':

 End of file during parsing: c:/emacs/site-lisp/some-file.el

 To ensure normal operation, you should investigate and remove the
 cause of the error in your initialization file.  Start Emacs with
 the `--debug-init' option to view a complete error backtrace.

            Juanma




reply via email to

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