3

When solving this problem I figured out that I need to disable the site-wise init files in order to get my emacs + CEDET running (everything works nicely when starting emacs using emacs --no-site-file but is broken without the additional argument).

I'd like to disable the site-wise init files permanently but as I'm using several different approaches/methods when launching emacs (launcher/panel/terminal) I don't think aliasing it in my .zshrc won't work.

I require a method to permanently disable all site-start files. Is there any easy way to achieve this? Thanks!

Community
  • 1
  • 1
elemakil
  • 3,681
  • 28
  • 53
  • 1
    If I understand the problem correctly `gnus` is not autoloaded but loaded explicitly, which in turn loads `auth-source`, which loads `eieio.el` before I can load CEDET using my `.emacs.d/init.el`. Unfortunately CEDET requires eieio to be loaded _after_ itself. I traced the problem that I linked above back to this conflict. It seems to me that disabling the site-init files completely is the best/easiest solution, is it not? – elemakil Nov 05 '12 at 14:27

2 Answers2

1

To answer the specific question, it's not possible to disable the site-start file without building your own version of Emacs (or, as you mentioned, always running with --no-site-file).

If you take a look at the documentation for the variable site-run-file, you'll see:

the run-time load order is: 1. file described in this variable (site-run-file), if non-nil; 2. ~/.emacs'; 3.default.el'.

If running Emacs with -q is enough to solve the problem, you can achieve that in your .emacs by setting:

(setq inhibit-default-init t)

All that being said, it's pretty straight forward to build/install your own Emacs. You can pretty much cut/paste the commands listed on this page (they are ./configure; make; make install).

Trey Jackson
  • 73,529
  • 11
  • 197
  • 229
  • Would I need to apply any additional `./configure` options (except the prefix) when omitting the "standard" site-run-file? – elemakil Nov 05 '12 at 17:55
  • 1
    @elemakil No, by default there is no site-start file (at least none of my builds have any). – Trey Jackson Nov 05 '12 at 20:17
1

Creating a wrapper in /usr/local/bin/emacs should allow you to override the default emacs system-wide, provided you have write access and a sane PATH.

Having said that, advising eieio to load cedet migh be a more adequate workaround.

tripleee
  • 175,061
  • 34
  • 275
  • 318
  • How would I advise `eieio` to load cedet prior loading itself? – elemakil Nov 05 '12 at 17:48
  • Something like `(defadvice 'eieio (before activate compile) (require 'cedet))` ... Not at my computer so probably not entirely correct. – tripleee Nov 05 '12 at 18:36
  • I went with the wrapper method for now; it seems to be the easiest solution until I have the time to compile emacs myself. – elemakil Nov 05 '12 at 23:37
  • Rebuilding Emacs just to solve a load-path issue sounds like even more overkill than disabling the site init files. You should find the precise problem in the init files and address that instead. – tripleee Nov 06 '12 at 05:06