Skip to main content

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.

60 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
959 views

error autoloading failed to define function when loading custom file

I recently decided rewrite my emacs configuration. I want to load my custom org configuration only in the case when I am opening a *.org file. Considering a minimalistic configuration of init.el (use-...
MagoNick's user avatar
5 votes
0 answers
406 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 ...
Jorge Israel Peña's user avatar
2 votes
0 answers
19 views

How to switch between distributed and local development versions of a package?

I use the stable version of a package (0.7.0 of gptel) which is distributed on melpa-stable. I installed it via package.el and I configure it via a use-package. I want to be able to switch easily ...
algal's user avatar
  • 345
2 votes
0 answers
1k views

No such file or directory: dash

Since few days I am getting this error but I don't remember changing anything in my configuration. I have dash installed on my system. I was thinking then it needs dash Emacs package, but after ...
siery's user avatar
  • 241
2 votes
0 answers
115 views

Package autoloading and use-package

I'm a beginner on emacs and I don't understand packages autoloading and use-package. I see a lot of configs online which use 'use-package' and recommends installing packages with package manager (...
Rom's user avatar
  • 21
2 votes
0 answers
148 views

use-package & quelpa: resolve dependencies with elpa?

When modifying some packages I'm using (use-package :load-path "my-forked-project") but to make my config work in any machine I want get that package from say my github repo. I'm now trying ...
actondev's user avatar
2 votes
0 answers
587 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))...
user3014097's user avatar
2 votes
0 answers
246 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 ...
zwb's user avatar
  • 123
2 votes
0 answers
650 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-...
RafaelGP's user avatar
  • 301
2 votes
0 answers
1k 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 ...
NVaughan's user avatar
  • 1,481
1 vote
0 answers
61 views

How to stop emacs from contacting melpa?

I have the following in my config: (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (add-to-list 'package-archives '("gnu" ...
David's user avatar
  • 309
1 vote
1 answer
49 views

Strange issue with dired-subtree

This is my simple config: (use-package dired-subtree :ensure t :bind (:map dired-mode-map ("<tab>" . dired-subtree-toggle))) The first time the ...
user129393192's user avatar
1 vote
0 answers
182 views

How to change this slime configuration on the init file from the classic imperative installation to a declarative approach via use-package?

When I first installed Slime, I used to install things via the classic M-x and package-install. Then, I inserted the following configuration: (slime-setup '(slime-fancy slime-asdf slime-indentation ...
Pedro Delfino's user avatar
1 vote
0 answers
360 views

How to change this Paredit configuration on the init file from the classic imperative installation to a declarative approach via use-package?

When I first installed Paredit, I used to install things via the classic M-x and package-install. Then, I inserted the following configuration: (autoload 'enable-paredit-mode "paredit" "...
Pedro Delfino's user avatar
1 vote
2 answers
389 views

Bind function key when in python-mode

I want to bind f5 to launch pdb, but the minibuffer always says <f5> is undefined. (use-package python-mode :bind (:map python-mode-map ("<[f5]>" . realgud:pdb)) :...
Brady Dean's user avatar
1 vote
0 answers
89 views

`org-ellipsis` respected by `emacsclient` but not by `emacs`

In my emacs.d/init.el I have: (use-package org ;; ... :custom (org-ellipsis " ▼") :custom-face (org-ellipsis ((t (:foreground "#665" :underline nil)))) ;; ....
Chen Levy's user avatar
  • 385
1 vote
0 answers
129 views

why doesn't use-package :defines stop this "variable is void" error?

Error (use-package): w3m/:config: Symbol’s value as variable is void: w3m-filter-configuration I have a use-package statement that was producing an error because apparently emacs-w3m doesn't configure ...
Webdev Tory's user avatar
1 vote
0 answers
60 views

How to specify that a package uses my key bindings

For example, I use M-s as isearch-forward: (global-set-key (kbd "M-s") 'isearch-forward) When I try to install isearch+ with use-package: (use-package isearch+ :straight t) I get the ...
Pfedj's user avatar
  • 338
1 vote
0 answers
53 views

Cannot call use-package on Emacs master

I can't use use-package with Emacs master. How can I find out why this is? For me, all calls (via eval-last-sexp) to use-package fail as Error (use-package): Cannot load X Disable showing Disable ...
Nordlöw's user avatar
  • 517
1 vote
2 answers
146 views

how to extract options I saved with customize and insert it inside use-package lines?

Suppose I did some customization through M-x customize-mode or something similar '(org-agenda-custom-commands '(("n" "Agenda and all TODOs" ((agenda "" nil) ...
eugene's user avatar
  • 499
1 vote
0 answers
106 views

Manually installed pdf-tools breaks package handling because it is not recognized as a dependency

The situation is: I install pdf-tools manually and load it with the following snippet: (use-package pdf-tools :pin manual :load-path "my/load/path/to/the/git/repo/lisp" :config .......
Public Image Ltd.'s user avatar
1 vote
1 answer
144 views

Unable to install Eclim for Eclipse in emacs

$ sudo apt install eclipse eclipse-jdt Then, tried to install eclim using use-package in Emacs: (use-package eclim :ensure t :config (require 'eclim) (setq eclimd-autostart t) (defun ...
tom_kp's user avatar
  • 81
1 vote
0 answers
289 views

use-package do not bind in latex-mode-map

this is a part of my init file (use-package tex-site :ensure auctex :mode ("\\.tex\\'" . latex-mode) :bind (:map LaTeX-mode-map ("<f5> <f5>" . TeX-command-save-buffer-and-...
gigiair's user avatar
  • 2,251
1 vote
0 answers
2k views

Proper use of use-package

I am using the following init file to download and load packages from melpa-stable in fresh Emacs installations: (require 'package) (add-to-list 'package-archives '("melpa-stable" . "https://stable....
antonio's user avatar
  • 1,822
1 vote
1 answer
107 views

Cannot run cquery

I have been using rtags as my primary C++ mode, but I found that it's performance is not satisfying for large code bases e.g. Linux kernel. It takes more than 5 seconds to find definitions. This it ...
Seonghyun Park's user avatar
1 vote
0 answers
46 views

binding a minor mode's function to already defined key in global-map

(use-package anaconda-mode :defer t :config (progn (unbind-key "M-." anaconda-mode-map) (unbind-key "C-_" global-map)) :bind ((:map anaconda-mode-map ("C-_" . anaconda-...
eugene's user avatar
  • 499
1 vote
0 answers
2k views

Spacemacs error when loading `.spacemacs` which uses package `flycheck`

I added the following at the end of my ~/.spacemacs file: (use-package flycheck :defer t :init (global-flycheck-mode)) When I do this, I get Spacemacs encountered an error while loading your '/...
bbarker's user avatar
  • 111
1 vote
0 answers
676 views

How to use use-package's :bind to bind key-chords

(use-package whatever :bind (("C-a b" . aabb))) can be used to replace (global-set-key (kbd "C-a b" 'aabb)) Can use-package's :bind be used to replace (key-chord-define-global "ab" 'aabb) ?
jacg's user avatar
  • 345
1 vote
0 answers
1k views

How to debug "company backend" initialization problems?

I am getting error messages initializing some company backend packages, but messages only appear in the *Messages* buffer, like: Company backend 'company-web' could not be initialized: Symbol's ...
marcanuy's user avatar
  • 818
1 vote
0 answers
76 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 ...
Phill Oldham's user avatar
0 votes
0 answers
20 views

On startup `run-hooks: Cannot open load file: No such file or directory, emacs` for `emacs` package itself

Due to an misformed Makefile I deleted my ~/.config dir which contained all my Emacs setting under .config/emacs following XDG-sheme. Luckily I had a backup of all my dotfiles so no big problem -- I ...
lukeflo's user avatar
  • 195
0 votes
0 answers
30 views

Problem with undo-tree-visualizer keybindings

What I want I use general, use-package and evil. I want to use evil keybindings in undo-tree-visualizer-mode to jump between nodes and branches using "j", "k", "h", "...
c3f0's user avatar
  • 1
0 votes
0 answers
217 views

Set default face (font) with use-package ':custom-face'

What do I need to tell 'use-package' so that it will set the default font for all frames on Emacs startup? With 'use-package' now installed as part of Emacs, I want to specify faces with its :custom-...
bignose's user avatar
  • 639
0 votes
0 answers
52 views

Emacs 29 - Error (use-package): rg/:catch: install not supported in nil

Here my init.el (use-package rg :ensure t :ensure-system-package rg) In Emacs 27 it's work just fine. But I removed Emacs 27.1 and installed Emacs 29.1 And now when start Emacs 29.1 I get error: ⛔...
a_subscriber's user avatar
  • 4,174
0 votes
0 answers
39 views

Delight install issues

I want use delight in my init.el but I encounter a problem. Emacs can't install it. The init.el file contain this line : (use-package delight). But I get this issue : Error (use-package): Failed to ...
hgdly's user avatar
  • 1
0 votes
1 answer
32 views

How can I get the old GNEVE to work?

I wanted to try GNEVE, the video editor for Emacs, but its code is from 2008;) (use-package gneve :ensure t) Debugger entered--Lisp error: (error "Loading file /home/b0ef/.emacs.d/straight/build/...
Jason Hunter's user avatar
0 votes
0 answers
1k views

Using (use-package ...) with Emacs 29+

I am using Emacs 29.1, which ships with use-package, and I want to install and load the MELPA bm package through the init file. I am using the following test-init.el init file: (defun my-packages () ...
antonio's user avatar
  • 1,822
0 votes
0 answers
45 views

spacemacs|use-package-add-hook for :hook and :bind?

spacemacs provides spacemacs|use-package-add-hook for extending :init and :config but not :hook or other keywords. Are there way to preserve the use-package syntax when writing spacemacs layers that ...
eugene's user avatar
  • 499
0 votes
0 answers
153 views

use-package, way to execute :custom or :config block?

:custom block is not executable format such as (org-babel-confirm-evaluate nil). whereas (setq org-babel-confirm-evalulate nil) can be excuted via C-x C-e. Is there a way to execute a :custom block ...
eugene's user avatar
  • 499
0 votes
0 answers
54 views

shift+arrow for org-mode

https://orgmode.org/manual/Conflicts.html#index-windmove_002eel says ;; Make windmove work in Org mode: (add-hook 'org-shiftup-final-hook 'windmove-up) (add-hook 'org-shiftleft-final-hook 'windmove-...
eugene's user avatar
  • 499
0 votes
0 answers
56 views

Profiling org-capture and improving its performance

My org-capture takes about 6 seconds to open up on a reasonably powerful machine, and it becomes over a minute on a cheap laptop. I decided to profile the function and here's what it gave: 2423 ...
Namudon'tdie's user avatar
0 votes
0 answers
88 views

chatgpt-shell, could not find package

I'm trying to install chatgpt-shell, so I eval: (use-package chatgpt-shell :ensure t :custom ((chatgpt-shell-openai-key (lambda () (auth-source-pass-get 'secret "openai-key"))...
Jason Hunter's user avatar
0 votes
1 answer
394 views

How can I disable a package or a group of packages without the require statement?

My entire Emacs configuration is in one file named "init.el". The folding and unfolding is achieved with the outshine package. I would like to share my config with some of my colleagues and ...
Zoli's user avatar
  • 441
0 votes
1 answer
107 views

How do I unbind the SPC key from a pdf-viewer window and use evil leader key instead?

How can I unbind the SPC keybinding from a pdf-view-mode window and use the evil leader key instead? This is what I have currently: (use-package pdf-tools :ensure t :config (pdf-tools-...
HitoriJanai's user avatar
0 votes
0 answers
78 views

lsp-pyright defer init until a .py file is open

Hey guys i'm improving my startup, Emacs version 28.2. I did a benchmark on init and I noticed that the thing that takes most of the time is lsp-pyright. That initializes lsp-mode. But I don't ...
Nico Stirnemann's user avatar
0 votes
0 answers
67 views

org-roam ignores fill-prefix when set via use-package

Because of this answer I set fill-prefix to "". When I do this explicitly via M-: it works as expected. I need a solution for use-package here. When I try to make this setting specific to ...
buhtz's user avatar
  • 729
0 votes
0 answers
64 views

Hooks with use-package and `ado-mode` not working

I'm trying to apply hooks to ado-mode a mode for working with the propietary software for statirstical analysis stata. However, the following doesn't work. Does anybody know why? (use-package ado-...
Daniel's user avatar
  • 99
0 votes
0 answers
23 views

usepackage doesn't load variables

I use doom emacs. Can you tell me why sometimes not all variables/functions are loaded? I use (usepackage! org-roam-bibtex), but org-xxx variables cannot be found with describe-variable. I need to ...
A-nak Wannapaschaiyong's user avatar
0 votes
0 answers
149 views

use-package: How to skip installing/updating packages which are installed by system package manager?

I use use-package with straight.el on NixOS. Some packages are installed by Nix, such as evil and org-mode. I see that use-package still clones their repositories and tries to build them. How to avoid ...
andreoss's user avatar
0 votes
0 answers
371 views

require 'use-package: cannot load file on second time as per flycheck

For my require 'use-package, I'm getting cannot load file error but I really don't understand why. In my ~/.emacs.d/init.el file, at the very top, I have (eval-when-compile (require 'use-package)) (...
xpt's user avatar
  • 477