Reputation: 5157
EDITED 2: This question is answered, not yet completed, but the solution presented by @vpit3833 work the way I need it. So, call emacs this way emacs -nw --no-site-file
. This suppress the error message, and the .emacs
still called. However, I still can not found the reason of the error anyway. Any suggestion? But not a bounty this time.
EDITED 1: I set a bounty to this question for anyone who can solved this problem. Because it's quite annoying when I startup Emacs, and I must load-file .emacs manually.
I use Emacs Native Windows application. It runs well. But now it will not read my .emacs, and always show error message:
if: Wrong number of arguments: #[(type level message &rest args) "ÄÅÆ ##" [type message args level display-warning apply format] 6 ("c:/Development/Tools/emacs-23.2/lisp/emacs-lisp/warnings.elc" . 8481)], 2
Everything seems runs ok. But after I install Emacs W32, and Ergo Emacs, and uninstall both of them, now the Emacs Native Windows Applications display that error.
What's been wrong?
Upvotes: 3
Views: 1538
Reputation: 62
I just installed the 64-bit Emacs for Windows (http://semantic.supelec.fr/popineau/programming-emacs.html#sec-2) and encountered this same error. Turns out that site-lisp/site-start.el had this incorrect elisp:
(lwarn "Can't find %s" lisp-dir)
Looking at the warning.el code, this doesn't match the function parameters. I changed the line to this:
(lwarn '(emacsw32) :warning "Can't find %s" lisp-dir)
and the load error went away.
Upvotes: 1
Reputation: 51
I have the same problem. What happened to me is I kept the "site-lisp" folder from EmacsW32 to keep my configurations. And the EmacsW32 "site-start.el" here looks like:
; ****** Added by emacsw32-setup-base at Mon Nov 01 16:16:09 2010
;; Add EmacsW32/lisp to load-path if found.
It works after I delete this specific part.
Hope it help.
Upvotes: 3
Reputation: 11
I had the identical problem. Thanks vpit3833 for helping me, at least with my problem. EmacsW32 created a directory called C:\site_lisp. It apparently doesn't remove that directory during an Uninstall. I actually have multiple version of Emacs for Windows. When I tried all of them, they all had the same problem described above. I used the suggestion of doing "emacs --no-site-file". That seemed to work and indicated that there's a site file somewhere on my computer. I searched for it, discovered the site_lisp directory. Removing that directory, which wasn't there before, helped get my Emacs back in order again.
Upvotes: 1
Reputation: 21162
Try to set the HOME environment variable explicitly to point to your .emacs file.
I launch my Emacs from a batch on Windows or a shell script on Unix. Windows batch look like this
set drive=D:
set home=u:\Oleg
set emacs_home=%drive%\Soft\Emacs
set cygwin_home=C:/cygwin
set utils=%drive%\utils
set path=%utils%;%cygwin_home%\bin;%utils%\7-Zip;%utils%\gnu-win32;%utils%\putty;%path%
set temp=d:/temp/
%emacs_home%\emacs-23.2\bin\runemacs.exe --debug-init
This way I can easily modify HOME, PATH and other environment variables depending on computer I'm working on.
Upvotes: 2
Reputation: 10032
Sounds like either an error in your .emacs, or something got installed to a system config file by Emacs W32 or Ergo Emacs that is now being picked up by your native Emacs app. From the message itself, the problem is probably with a badly-formatted (if ...) statement.
You can check if the problem is with your .emacs by running Emacs with the -q option, which I guess in Windows you do from the "Run Program" option of the start menu?
emacs -q
If that works properly, the problem is in your .emacs. If you still get the problem, try
emacs -Q
which will ignore all config files on your system. If emacs -Q solves the problem, then the issue is with the system-wide config, but I'm not sure where that is in Windows.
Upvotes: 3