Questions tagged [use-package]

is a macro package to isolate Emacs configuration lines in the init file. By isolating related lines, the configuration performs better and is easier to maintain.

Filter by
Sorted by
Tagged with
1
vote
0answers
55 views

Do Any Hooks for (Specific) Package Installation Exist?

I have a StumpWM configuration that loads a file contained in the SLIME package installed through Emacs (swank-loader.lisp). However, problems arise when my SLIME package is updated, because the ...
4
votes
1answer
281 views

Ensuring a minimum version with use-package

In my .emacs, I would like to ensure that the s package, version 1.10.0 or newer, is installed. If I use (use-package s :ensure t) it will not upgrade the installation on systems with older versions ...
1
vote
1answer
209 views

use-package and js2-mode: setting fill-column

I'm using use-package and I want my fill-column to be set to 100 for files edited with js2-mode. I tried to do so in the :config part, like: (use-package js2-mode :config (setq fill-column 100)) ...
6
votes
2answers
421 views

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

When using use-package, is there a way to associate more than one file extension with a particular mode in one place instead of multiple locations? Case in point is that I would like to associate ...
5
votes
1answer
875 views

Conflict between emmet-mode and yasnippet, same trigger key

I want to have both emmet-mode and yasnippet trigger with the same key C-return: in a html-mode buffer, C-return should first try yas-expand and then emmet-expand-line if no suitable snippet was found....
6
votes
1answer
491 views

How do I set use-package-always-pin?

Emacs noob here, I want to use melpa-stable whenever possible for my packages. use-package has an option for this, use-package-always-pin. By default package.el prefers melpa over melpa-stable due ...
0
votes
1answer
591 views

problem with web-mode: Symbol's value as variable is void: <html>

I am using Emacs 24.5.1 and I seem to have a problem loading the web-mode package using use-package. I managed to narrow it down to the following .emacs file: (require 'package) (setq package-enable-...
6
votes
1answer
384 views

use-package :requires explanation

I found that there's a :requires (source) section, but I'm not quite sure what it does and there doesn't seem to be any documentation on it. Can someone explain what it does?
5
votes
1answer
1k views

use-package: Can :after be used instead of with-eval-after-load?

If my :config section is entirely wrapped in with-eval-after-load, is that equivalent to simply specifying an :after directive? That is, can I replace this: (use-package company-tern :config (...
5
votes
0answers
85 views

use-package's :after directive

I saw that use-package has an :after section that can be used, which: Defer loading of a package until after any of the named features are loaded. The wording uses "any" instead of "all", so would ...
3
votes
1answer
60 views

are there conflicts between use-package and a package's autoloads?

Do I have to worry about a package's built-in autoloads somehow conflicting with those implicitly defined by use-package? For example if I do :commands some-cmd but the package already had an autoload ...
3
votes
1answer
1k views

use-package :defer t and add-hook

If I have something like: (use-package X :defer t (add-hook 'some-mode 'package-x-function)) Will that work as expected given that I set :defer t and the package doesn't have any "built-in" ...
3
votes
1answer
466 views

use-package :defer t and autoloads

My understanding is if that I use any of :commands, :bind, :bind*, :bind-keymap, :bind-keymap*, :mode, or :interpreter, then it will create a corresponding autoload and defer loading of the package ...
2
votes
0answers
524 views

init error: file missing - cl-generic after any time I edit settings.org file

I am using org mode to organize my various Emacs settings. Within my init.el file I just have (taking out initial comments): ;;; Code: (package-initialize) (eval-when-compile (require 'use-package))...
3
votes
2answers
2k views

Use-package for a mode

it's not clear for me how should I set use-package to load a package when a mode is activated. I have read different things about :mode, :init :config and I am now confused. Could someone explains it ...
1
vote
0answers
67 views

Packages only working “once” after install

I'm trying to get git-gutter-fringe+ working under emacs 24.5.5 on OS X, but I'm having some trouble. In general, it works fine upon install, but on subsequent restarts the package is not loaded. I'm ...
4
votes
1answer
689 views

Setting projectile-keymap-prefix with use-package

I use persp-mode and projectile both of which are installed using the use-package package and both want to prefix their keymaps with C-c p. The projectile readme says that you can define a custom ...
2
votes
0answers
160 views

How to autoload a custom group?

I put my custom js setting into zwb-js group in zwb-js.el, I want to use use-package to load it, it seems that zwb-js.el has been loaded, but the functions defined in zwb-js.el seems not be called ...
0
votes
1answer
1k views

How to load self package with use-package?

I use Prelude, and I want to use use-package for loading and configuring my personal config files. In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/...
9
votes
2answers
2k views

Unbinding key using use-package

I'm trying unbind org-cycle-agenda-files which is set by default to C-' and C-,. My weapon of choice to do so is use-package package. On github.com/use-package/bind-key.el page I have found ...
1
vote
2answers
246 views

package listed in `list-packages' but get `Error during download request: Not Found` [closed]

This is the value of my package-archives variable: C-h v package-archives package-archives's value is (("melpa" . "http://melpa.org/packages/") ("gnu" . "http://elpa.gnu.org/...
8
votes
2answers
4k views

`use-package` with :config to set variables

I'm trying to use use-package to set up my org-mode initialization. I have the following in my ~/.emacs file: (use-package org-mode :mode "\\.org$" :ensure org :config (progn (setq org-...
2
votes
0answers
614 views

Custom configuration layer for multi-term is ignored

I've created a new configuration layer (read more about it below) for multi-term but the settings specified there don't seem to apply. Here is the code in particular ;;; packages.el --- rgp-multi-...
6
votes
1answer
1k views

Use multiple `:mode` arguments with use-package

I'm trying out use-package - the docs say the argument to the :mode keyword "can be a cons cell, a list, or just a string." However, I'm not sure how to make a cons cell or list work. Here's an ...
15
votes
2answers
4k views

Using package.el to install and update but use-package for loading and configuring

After recently learning about use-package I decided to port my configuration to it but found myself reluctant to give up the convenience of using package.el to install packages and keep them updated. ...
7
votes
1answer
1k views

How to use use-package with built-in packages?

For the sake of tidiness, I'd like to group setq(s) under single, related banner. Let's say I want to set the value of compilation-scroll-output in "compilation" unit like this: (use-package ...
6
votes
2answers
844 views

What is the standard way to install an elisp package?

I'm interested in trying out the features of the htmlize.el package that I read about here. The article does not explain how I can import it into emacs. What is the best way to do this?
9
votes
4answers
2k views

How to bind your keys to keymaps that aren't loaded yet?

I use use-package to manage installed packages and bind-key to assign actions to custom keys that I like. I override most of the default Emacs keybinding (e.g. C-n becomes M-k, C-p becomes M-i), but ...
3
votes
1answer
101 views

Install packages automatically [duplicate]

I'm new to Emacs, and I'm storing my Emacs configuration in a GitHub repo. Whenever I move to a new computer, I want Emacs to install all packages I specify if they do not present on this computer. ...
14
votes
2answers
4k views

Difference between init and config in use-package

I have a configuration like this: (use-package html-mode :mode "\\.html\\'" :config (progn (add-hook 'html-mode-hook 'turn-off-auto-fill))) Now when I go and visit an HTML file, I observe ...
2
votes
2answers
267 views

Conditional ensure in use-package

Basically, I want to ensure that the elfeed package is available and load it with use-package, but only on one computer, so I wrote something like this: (unless (string= system-name "here-elfeed-...
9
votes
3answers
3k views

How can I defer loading elpy using use-package?

I've been updating all my use-package calls now that :idle is no longer a decent way to defer stuff. At the moment one of the biggest hits on my load time is elpy which loads a whole bunch of ...
3
votes
1answer
240 views

Use normal delete-region with backspace in markdown-mode

I would like to use the "normal" behaviour for <backspace> in markdown-mode. That is, instead of calling markdown-exdent-or-delete, I would like to call cua-delete-region. So I tried this ...
1
vote
1answer
529 views

Could not load package flyspell with use-package

I have configured flyspell mode with use-package like this: (use-package flyspell-mode :init (progn (flyspell-mode 1)) :config (progn (setq ispell-program-name "aspell") (setq ...
6
votes
2answers
2k views

Managing packages using use-package

I have read that using use-package, one can manage installation of the packages from the init.el file. Is there any specific command for that ? Background: I'm planning to port my existing init.el to ...
2
votes
2answers
962 views

Interaction between package, use-package, and quelpa

I am testing quelpa with my use-package configuration. My question is: Is quelpa meant to complement use-package, or rather to replace it? I have the following code in my init file: (require '...
8
votes
3answers
3k views

org-plus-contrib and org with `require` or `use-package`

How can I ensure I'm downloading and using org-plus-contrib from the org-mode repository using require or use-package? Package.el downloads the package, compiles everything and then says it can't load ...
7
votes
3answers
324 views

How do I edebug a function defined in a use-package block?

Here is a minimum working example to demonstrate the problem, you will need to have the use-package package installed: (use-package ido :config (progn (defun dummy/function () (...
2
votes
1answer
1k views

use-package syntax: how to set-face-attribute?

I'm trying to set helm using use-package. The set-face-atttribute doesn't work within use-package: (use-package helm-config :config (progn (helm-mode 1) ;; other config ......
2
votes
2answers
376 views

Is it possible to figure out which package/script takes most of the startup time?

I used to run Emacs on Linux using Emacsclient, it is really easy and great experience: emacs --daemon emacsclient When I work on a Windows machine, Emacs starts very slow. It seems there's no ...
6
votes
2answers
762 views

Bind f-key in use-package

How can I bind an f-key using jwiegley's use-package package? Any of these combinations produces an error: :bind ("f11" . multi-term) :bind (<f11> . multi-term) :bind ([f11] . multi-term) (...
2
votes
0answers
991 views

Stop Yasnippet from autoloading

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 ...
2
votes
1answer
2k views

void-function when loading ido-mode in Emacs24

I'm using Emacs 24.4.1 from Debian unstable and have added the lines from question "How do I switch buffers quickly?". However this results in an error message and I found no way to resolve it. I can ...