Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto disable the emacs site-start files permanently?

Tags:

emacs

init

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!

like image 334
elemakil Avatar asked Oct 16 '25 17:10

elemakil


2 Answers

When this was originally asked, the answers were correct that the only way to disable site-start files was to start emacs with --no-site-file or to make a custom build of emacs.

However emacs 27 (relased in 2020) introduced the early init file, which allows customizing emacs before the usual initialization.

Now you can disable site files by adding the following to your ~/.emacs.d/early-init.el:

(setq site-run-file nil)
like image 165
Razzi Abuissa Avatar answered Oct 18 '25 08:10

Razzi Abuissa


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.

like image 22
tripleee Avatar answered Oct 18 '25 10:10

tripleee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!