0

I'm having trouble stopping Emacs from loading all packages in my default-directory. When I call c-h v load-packages I get a listing of all subdirectories inside my elpa directory, which I want to avoid.

I have the following in my startup files:

(setq package-enable-at-startup nil)

and I do not have the following:

(let ((default-directory user-emacs-directory))
  (normal-top-level-add-subdirs-to-load-path)
  ) 

(I have it commented, though).

In spite of that, I still get the following when I ask Emacs to show me the value of load-path:

 ("/Users/nivaca/Dropbox/emacs/elpa/adaptive-wrap-0.5/" "/Users/nivaca/Dropbox/emacs/elpa/async-20150818.1154/" "/Users/nivaca/Dropbox/emacs/elpa/auctex-11.88.8/" "/Users/nivaca/Dropbox/emacs/elpa/autopair-20140825.427/" "/Users/nivaca/Dropbox/emacs/elpa/color-theme-20080305.34/" "/Users/nivaca/Dropbox/emacs/elpa/dedicated-20090428.1231/" "/Users/nivaca/Dropbox/emacs/elpa/dired+-20150830.1456/" "/Users/nivaca/Dropbox/emacs/elpa/duplicate-thing-20120515.948/" "/Users/nivaca/Dropbox/emacs/elpa/expand-region-20150902.558/" "/Users/nivaca/Dropbox/emacs/elpa/flx-ido-20140821.2033/" "/Users/nivaca/Dropbox/emacs/elpa/flx-20140921.739/" "/Users/nivaca/Dropbox/emacs/elpa/flycheck-20150831.1343/" "/Users/nivaca/Dropbox/emacs/elpa/highlight-parentheses-20150421.2328/" "/Users/nivaca/Dropbox/emacs/elpa/hl-indent-20141227.1330/" "/Users/nivaca/Dropbox/emacs/elpa/hl-line+-20150104.2222/" "/Users/nivaca/Dropbox/emacs/elpa/hl-sentence-20140802.920/" "/Users/nivaca/Dropbox/emacs/elpa/ido-hacks-20150331.1209/" "/Users/nivaca/Dropbox/emacs/elpa/ido-ubiquitous-20150630.926/" "/Users/nivaca/Dropbox/emacs/elpa/ido-completing-read+-20150630.926/" "/Users/nivaca/Dropbox/emacs/elpa/indent-guide-20150713.2327/" "/Users/nivaca/Dropbox/emacs/elpa/leuven-theme-20150818.556/" "/Users/nivaca/Dropbox/emacs/elpa/lua-mode-20150804.2302/" "/Users/nivaca/Dropbox/emacs/elpa/markdown-mode+-20120829.510/" "/Users/nivaca/Dropbox/emacs/elpa/markdown-mode-20150904.656/" "/Users/nivaca/Dropbox/emacs/elpa/mc-extras-20150218.234/" "/Users/nivaca/Dropbox/emacs/elpa/move-text-20140307.1644/" "/Users/nivaca/Dropbox/emacs/elpa/multi-term-20150220.1320/" "/Users/nivaca/Dropbox/emacs/elpa/multiple-cursors-20150710.456/" "/Users/nivaca/Dropbox/emacs/elpa/neotree-20150904.609/" "/Users/nivaca/Dropbox/emacs/elpa/paradox-20150812.732/" "/Users/nivaca/Dropbox/emacs/elpa/let-alist-1.0.4/" "/Users/nivaca/Dropbox/emacs/elpa/pkg-info-20150517.443/" "/Users/nivaca/Dropbox/emacs/elpa/epl-20150517.433/" "/Users/nivaca/Dropbox/emacs/elpa/pretty-mode-20141207.1152/" "/Users/nivaca/Dropbox/emacs/elpa/rainbow-delimiters-20150320.17/" "/Users/nivaca/Dropbox/emacs/elpa/second-sel-20150105.46/" "/Users/nivaca/Dropbox/emacs/elpa/seq-20150709.1040/" "/Users/nivaca/Dropbox/emacs/elpa/smart-mode-line-20150803.338/" "/Users/nivaca/Dropbox/emacs/elpa/rich-minority-20150305.516/" "/Users/nivaca/Dropbox/emacs/elpa/smartparens-20150813.1451/" "/Users/nivaca/Dropbox/emacs/elpa/dash-20150829.433/" "/Users/nivaca/Dropbox/emacs/elpa/spinner-1.4/" "/Users/nivaca/Dropbox/emacs/elpa/tabbar-20141109.143/" "/Users/nivaca/Dropbox/emacs/elpa/undo-tree-20140509.522/" "/Users/nivaca/Dropbox/emacs/elpa/use-package-20150817.2257/" "/Users/nivaca/Dropbox/emacs/elpa/diminish-20091203.1012/" "/Users/nivaca/Dropbox/emacs/elpa/bind-key-20150321.213/" "/Users/nivaca/Dropbox/emacs/elpa/volatile-highlights-20141004.2240/" "/Users/nivaca/Dropbox/emacs/elpa/yasnippet-20150811.1222/")

Ultimately, the issue at hand is that I don't want Emacs to automatically load AuCTeX (I have eliminated all references to it from my startup files, but it still keeps loading itself).

Any ideas on how to stop this?


Update

Even with no startup file (I removed my .emacsd file) I get the same value for load-path. This happens even if I start with emacs -Q.

  • Because that's where package.el installs all my elpa packages. – NVaughan Sep 5 '15 at 2:56
  • (setq package-enable-at-startup nil) is sufficient (certainly in 24.5) if you're not otherwise causing the issue yourself. Do you have an out-dated byte-compiled version of your init file for which that would-be commented code is actually being evaluated? If not (or if package autoloads are actually being processed), then it sounds like something is calling package-initialize. – phils Sep 5 '15 at 7:00
  • 2
    @phils: "awkward [...to...] treat one package differently to all the others" - actually I think setting package-load-list allows this. – npostavs Sep 5 '15 at 13:37
  • npostavs: Right, it sounds like a value of '((auctex nil) all) would do the trick here. (And as such, I've deleted my incorrect comment.) – phils Sep 5 '15 at 15:49
  • @Phils, Well, I really don't know what's causing it. The value of package-load-list is nil at run time. – NVaughan Sep 5 '15 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.