When I open emacs, I get an initialization warning:

Warning (initialization): An error occurred while loading 

Invalid function: ([scp myusername 128.my.ip.addr nil nil] (locale 
LC_ALL=en_US.utf8) (uname Linux 4.4.0-93-generic) (test test) (remote-path 
(/bin /usr/bin /sbin /usr/sbin /usr/local/bin /usr/local/sbin)) 
(remote-shell /bin/sh) (~ /home/myusername) (ls /bin/ls --color=never) 
(ls-dired t) (stat \stat) (file-exists test -e) (id /usr/bin/id) 
(gid-integer 1002) (gid-string myusername) (perl-file-spec t) 
(perl-cwd-realpath t) (perl \perl) (readlink \readlink) (git \git))

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.

(My username and IP address are anonymized above.)

The offending function appears to be the first entry in my .emacs.d/tramp file. I tried deleting the tramp file. Upon immediately restarting emacs, there was no warning -- good. However, upon starting my next emacs session, I got the same warning, but pertaining to a different scp connection (the one that now happens to be the first entry in my tramp file).

I would like to figure out a couple things:

  1. Why is the function invalid?

  2. How can I prevent this warning message from appearing every time I open emacs?

1 Answer 1


The problem is very simple: You added ~/.emacs.d/ to your load-path.

Remove it from your load-path and things will go back to normal. This directory should not be in your load-path because it does not contain source code packages, but data files. And some of them can (and do) have names that match those of packages, so if you add it like you did, when Emacs wants to load tramp it will end up finding your ~/.emacs.d/tramp which is not Tramp's code and is not even code at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.