Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
41 votes
Accepted

How to update packages installed with use-package

I just do this manually: run list-packages hit Uto mark available upgrades, then review to decide if there are any I don't want to pick up. Then x to upgrade. I do this pretty regularly, and often ...
glucas's user avatar
  • 20.6k
19 votes

How to update packages installed with use-package

You can use auto-package-update to automatically update packages. Copied from my other post (https://emacs.stackexchange.com/a/31903/9972) (use-package auto-package-update :ensure t :config ...
casch-at's user avatar
  • 431
18 votes
Accepted

use-package - :init or :config

Is there any rule by which the user can determine whether the package configuration requires :init or :config? There is no general rule which applies to all settings and packages; you just need to ...
Basil's user avatar
  • 12.4k
17 votes
Accepted

When to specify a package name in use-package's :ensure tag?

But for some packages that doesn't work. Such as auctex. The reason (use-package tex :ensure t) doesn't work for auctex is because auctex names a GNU ELPA package (see (emacs) Packages), whereas tex ...
Basil's user avatar
  • 12.4k
16 votes
Accepted

How to bind key in use-package

Thank you for telling me about the different types of maps. The issue is as @NickD pointed out in their answer and the example use-package code puts all the bindings into the global map. ie org-mode ...
dmin's user avatar
  • 373
15 votes

How to associate more than one file extension with a given mode in `use-package`

The following should work: (use-package js2-mode :mode (("\\.js\\'" . js2-mode) ("\\.jsx\\'" . js2-mode)) ... :ensure t)
scatotonic's user avatar
15 votes

How to avail of `:hook` using use-package?

As others said I think https://github.com/jwiegley/use-package#hooks is pretty clear. :hook replaces add-hook and creates autoloads for you. Your example with :hook would be: (use-package web-mode :...
dakra's user avatar
  • 406
15 votes

Getting started `use-package` question

Do I need (package-initialize) before these lines? If your version of Emacs (M-xemacs-versionRET) is older than 27, and you are using the built-in package manager, then you indeed need to call (...
Basil's user avatar
  • 12.4k
14 votes

Does use-package keep packages automatically updated?

I use auto-package-update to automatically update packages. (use-package auto-package-update :ensure t :config (setq auto-package-update-delete-old-versions t auto-package-update-...
casch-at's user avatar
  • 431
14 votes
Accepted

error: Package `use-package-' is unavailable

This particular error happens if Emacs failed looking up the latest version of a package, like if there's no package-archives file containing that information. Before installing packages, make sure ...
wasamasa's user avatar
  • 22.2k
11 votes
Accepted

Why doesn't (use-package dired) work for me?

Debugger entered--Lisp error: (error "Package ‘dired-’ is unavailable") You get this error when package.el tries to install a non-existent package. use-package will attempt to install the given ...
npostavs's user avatar
  • 9,203
11 votes
Accepted

Activate global minor modes from use-package

I don't know why company-mode is getting diminished, but I think I know what's going on with whitespace-mode. Your block (use-package whitespace :ensure t ;; I also tried without this line :...
Aaron Harris's user avatar
  • 2,684
11 votes
Accepted

Is it possible to load Dired+ automatically with use-package?

dired+ has left MELPA repository, and now you have to download it manually from EmacsWiki. You can still use use-package with a downloaded package, like this: (use-package dired+ :load-path "~/....
Jesse's user avatar
  • 1,994
10 votes
Accepted

How to associate more than one file extension with a given mode in `use-package`

Use :mode "\\.jsx?\\'" Remember: all those backslashes are there because it's a regexp, so you really want to take advantage of it when you can, otherwise you're just suffering through those ...
Stefan's user avatar
  • 26.5k
10 votes
Accepted

use-package won't load

You may need a more complete "bootstrap" of use-pacakge. This is what I've picked up from somewhere else on SE. ;;{{{ Set up package and use-package (require 'package) (add-to-list 'package-archives ...
nega's user avatar
  • 3,276
9 votes

Interaction between package, use-package, and quelpa

While quelpa and use-package have no direct relation with each other, there now is a package, quelpa-use-package, which adds a quelpa handler to use-package. This allows one to use use-package with a ...
ack's user avatar
  • 191
9 votes

error: Package `use-package-' is unavailable

I am adding this answer as suggested by @Drew. I appreciate the answer from @wasamasa which allowed me to get this working in my .emacs file. Here is how I modified my .emacs file. (package-...
learningemacs's user avatar
8 votes
Accepted

Emacs setup for LaTeX after (use-package) verse

The essential part is to load latex instead of tex, see the first line. (also I did some small cleanups) (use-package latex :mode ("\\.tex\\'" . latex-mode) :bind (:map LaTeX-mode-map ...
jue's user avatar
  • 4,576
8 votes
Accepted

Why does use-package considers "emacs" as a package?

It is not packages that use-package loads but features (which are things you can require and test for with featurep). From this point of view, use-package is essentially a fancy wrapper for require. ...
Fran Burstall's user avatar
7 votes
Accepted

Install ESS with use-package

I was missing ':ensure t . Now the ess package gets automatically installed at first use. For more information on how to load packages from ELPA with package.el and use-package see: https://github....
user14419's user avatar
  • 195
7 votes
Accepted

Does use-package keep packages automatically updated?

The :ensure option in use-package does not automatically keep packages up to date. It ensures that the package is installed. This might be useful if you pull your Emacs config on to a new machine (or ...
glucas's user avatar
  • 20.6k
7 votes
Accepted

use-package: load all defined packages

Take a look at the customization options available for use-package. I think you can set use-package-always-demand based on how Emacs was started to get the behavior you want. For example at the ...
glucas's user avatar
  • 20.6k
7 votes
Accepted

How to install smart-mode-line powerline theme with use-package

have you tried that for example: (use-package smart-mode-line-powerline-theme :ensure t :after powerline :after smart-mode-line :config (sml/setup) (sml/apply-theme 'powerline) )
slemaguer's user avatar
  • 369
7 votes
Accepted

use-package ensure not working: package downloaded but gives warning and skips config

The symbol you must give use-package is not the name of the package, but the name of a feature provided by the package. org-plus-contrib provides the org feature. You should use (use-package org :...
Omar's user avatar
  • 4,832
6 votes

How can I defer loading elpy using use-package?

The author of elpy suggests doing this via an advice, because elpy-enable modifies the python-mode-hook variable, so calling it inside the mode-hook is too late. simple approach: (package-initialize) (...
T Nierath's user avatar
  • 161
6 votes

Package `exec-path-from-shell` isn't setting PATH variables from `.zshenv` on MacOS

You should remove :defer f, because you don't want exec-path-from-shell to be defer loaded and you are going to use function from it when Emacs starts. Try something like the following (use-package ...
xuchunyang's user avatar
  • 14.6k
6 votes

How to update packages installed with use-package

There is a highly recommended package called paradox that extends package management commands. Read more from https://github.com/Malabarba/paradox (use-package paradox :init (setq paradox-github-...
Heikki's user avatar
  • 3,076
6 votes
Accepted

Symbol's function definition is void: use-package

The emacs-darcula-theme README suggests installing via use-package, but this requires installing the use-package first. Since you've already installed the darcula-theme package, you can just do a ...
npostavs's user avatar
  • 9,203
6 votes
Accepted

Rewrite a package config using use-package

it doesn't seem to work The first issue I see is that you replaced the string "persp-mode-autoloads" with the symbol 'persp-mode-autoloads in the first argument to with-eval-after-load. These exhibit ...
Basil's user avatar
  • 12.4k
6 votes

How to properly define hydras inside use-package?

The package use-package-hydra, which is also available on MELPA, should solve this problem. I combined your code blocks into a single (use-package) expression (see keywords :after, :bind and :hydra). ...
Stefanus's user avatar
  • 161

Only top scored, non community-wiki answers of a minimum length are eligible