2

Is there a way to stop Yasnippet from autoloading? I installed it from melpa (v.20141102.1554), and have no reference to it in my init files. However, keeps up autoloading whenever I run emacs. I only wish it to initialize on my express command.

I also tried this use-package command with no avail:

(use-package yasnippet
  :defer t
  :commands (yas-load-directory)
  :config
  (progn
    (yas-load-directory "/home/nivaca/emacs_x/snippets/")
    (setq yas-indent-line nil)
  )
)

UPDATE

Fixed it with this code:

(use-package yasnippet
  :if (not noninteractive)
  :diminish yas-minor-mode
  :commands (yas-global-mode yas-minor-mode)
  :config
  (progn
    (setq yas-indent-line nil)
    (setq yas-snippet-dirs
      '("~/Dropbox/emacs_x/snippets"
        ))
  )
)

However, I am not sure what's going on...

  • If you run "emacs -Q" and then evaluate "(package-initialize)" do you see Yasnippet loading? – stsquad Nov 12 '14 at 14:51
  • 1
    Please give more details about what you mean by "autoloading". It is sometimes used to mean "arrange for the thing to be loaded transparently later on demand" (that would be perfectly normal and if it is not harmless, then it's probably a bug in the package), or to mean "do the actual load" (this would not be normal, indeed). – Stefan Nov 12 '14 at 15:24
  • @Stefan I mean the latter. – NVaughan Nov 12 '14 at 19:59

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.