Reputation: 11130
I'm getting an error on emacs startup that is causing it to not load the filenames I give it on the command line. I don't see anything in my ~.emacs or ~/.emacs.d/init.el that says anything about 'debian-startup'. What is this message? How do I make it go away? If it goes away will I be able to open a file directly from the commandline like [ emacs project.clj ]? I don't know if it matters, but its GNU Emacs 24.3.50.1 running on an Ubuntu Saucy Server VM.
Upvotes: 1
Views: 1101
Reputation: 1070
Last entry in this thread was 1.5yrs ago, but the problem still exists. I think I have found its source. Today I installed Ubuntu 15 and added Emacs to it. Starting Emacs produced the error about the function debian-startup
not being defined. I didn't find much about this on the web, though I don't understand why not -- surely many, many people use Emacs on Ubuntu. And maybe the problem isn't even restricted to Ubuntu, but occurs in any Debian Linux.
The problem turned out to be that debian-startup.el
is found in (for Emacs.24.5, e.g.) /usr/share/emacs/24.5/site-lisp
, one of the early entries in load-path
. There, it is a link to /usr/share/emacs/site-lisp/debian-startup.el
. That file exists and defines the function debian-startup
. However, an empty file /usr/share/emacs/24.5/site-lisp/debian-startup.elc
was installed at the same time as the link. This file should not exist -- it is rarely appropriate to byte-compile any kind of init file. In this case, the empty compiled file is being loaded in place of the real Lisp file, so of course debian-startup
is not defined. Deleting the .elc
file solves the problem. (Note that this would have to be done separately for each version of Emacs in use.)
(It seems very strange that this problem could still be in the Emacs installation packages after all this time? Maybe I am missing something.)
Upvotes: 8
Reputation: 30698
Put this on your command line that starts Emacs: --debug-init
. Then, when the error is raised you will be put into the debugger, where you can see a backtrace showing what tried to invoke the undefined function, etc.
(It sounds like there might be something is in the Debian site init file that is causing the problem. You might also want to ask the Debian people directly. ;-))
Upvotes: 1