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

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

RE: load-file doremi-frm.el issue?


From: Drew Adams
Subject: RE: load-file doremi-frm.el issue?
Date: Tue, 6 Sep 2005 07:23:25 -0700

    > I hope someone would tell me why M-x load-file RET doremi
    > is not loading the doremi-frm.el file even though the file is
    located in a directory

(From your post below, I think you have that backwards: doremi-frm.el should
load doremi.el, but it does not - right?)

    > listed in load-path's value in C-h v load-path is
    > "/usr/share/emacs/21.4/site-lisp"

So, doremi.el is in site-lisp? It must be in some directory that is in your
load-path.

    > I don't think it has something to do with me being logged in as a user
    > other than root because when I run emacs as root and M-x load-file
    > full/path/to/doremi-frm.el still gives Cannot open load file: doremi

Loading doremi-frm.el (with the complete path) does not tell Emacs to find
doremi.el in the same directory - they are two different libraries.
doremi.el must be in a directory that is in your load-path. Unless you
provide the directory completely (as you did for doremi-frm.el), each
library you load must be in a directory in your load-path.

    > which is the same message I get if I have (require 'doremi-frm) in my
    > .emacs and do M-x load-file .emacs or restart emacs.

Again, the error message is about doremi.el, not about doremi-frm.el. You
need to let Emacs know where to find doremi.el (which is required by
doremi-frm.el).

    > >  LocalWords:  doremi frm RET eval sexp
    Debugger entered--Lisp error: (file-error "Cannot open load
    file" "doremi")
      require(doremi)
      eval-buffer(#<buffer  *load*> nil "doremi-frm" nil t)

    load-with-code-conversion("/usr/share/emacs/21.4/site-lisp/dorem
    i-frm.el" "doremi-frm" nil t)
      require(doremi-frm)
      eval((require (quote doremi-frm)))
      eval-last-sexp-1(nil)
      eval-last-sexp(nil)
      call-interactively(eval-last-sexp)

It doesn't sound like it, but it could be that Emacs is correctly trying to
load library doremi.el, and is encountering an error in that file. Try this
before doing anything else, as a sanity check:

1. Rename doremi.el to SAVE-doremi.el.
2. Create a dummy library named doremi.el, in the same directory.
3. Put (provide 'doremi) in the dummy library.
4. Try to load the dummy library, doremi.el (forget about doremi-frm.el, for
now).

If the dummy doremi.el is loaded correctly, then you will see 1) no error
during loading and 2) `C-h v features' will show that `doremi' is loaded.

If that is the case, then the problem is in the original file,
SAVE-doremi.el. In that case, open the file in Emacs, and start evaluating
its expressions, starting at the top. You can select any number of
expressions and then do `M-x eval-region'. It's quickest to do this as a
binary search: Try the whole file, then half, then a quarter etc. to narrow
down the part of the file that is producing the error.

If that is not the case, then Emacs is not finding the file doremi.el to
load it, as you suspected. I get the impression that you might not have
doremi.el in a directory that is in your load-path (as defined in your
.emacs *before* it tries to load doremi-frm.el).

You can contact me off line if you like, to pursue this further. You can
always follow up by posting any lessons learned to the mailing list.

HTH.





reply via email to

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