1

I use use-package in my init.el and use :ensure to make sure packages are installed. However after every package update via package.el, it tells me some packages are no longer needed and can be removed, even though those packages are actually needed. If I remove them via M-x package-autoremove, they get installed the next time I open Emacs. Does this have something to do with the order in which they are added in package.el?

For example, helm has been added to my init file like this:

;; helm-mode by default
(use-package helm
  :ensure t
  :diminish helm-mode
  :config
  (helm-mode 1)
  :bind (("M-x" . helm-M-x)
         ("C-x C-f" . helm-find-files)
         ("C-c f" . helm-recentf)
         ("C-x b" . helm-mini)
         ("C-x C-b" . helm-buffers-list)))

However it gets installed as a dependency. The same happens for company-mode, helm-ag etc.

  • 1
    If you can make a minimal example of a package with dependencies that Emacs thinks are not needed, this would be a great bug report to M-x report-emacs-bug. – zck Jul 18 '16 at 15:17
0

The problem was my package-selected-packages variable. Somehow due to the order of the packages, package.el was listing some packages as dependencies. Deleting the variable and restarting Emacs fixed the listing.

Your Answer

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

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