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.
177
questions
0
votes
0answers
7 views
How do I regenerate `~/.emacs.d/index.sqlite`?
Is it correct that the following little error novel indicates I am missing ~/.emacs.d/index.sqlite?
How do I regenerate ~/.emacs.d/index.sqlite?
Debugger entered--Lisp error: (void-function -compose)
(...
1
vote
1answer
14 views
When emacsclient open with eval using use-package it opens waiting M-x
I am trying to create a bash alias to open emacs with a calendar from terminal. To do so I am using calfw with use-package like so:
(use-package calfw
:ensure ;TODO:
:config
(require 'calfw)
(...
0
votes
0answers
32 views
Configure ryo-modal to execute function from evil-ex-commands alist
I would like some help in configuring ryo-modal, via use-package, to run a command from the evil-ex-commands alist, using ("ll" (cdr (assoc "wq" evil-ex-commands))); however, I'm ...
1
vote
0answers
25 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 (...
0
votes
0answers
40 views
How to unbind the key for a specific map?
I use org, smartparens and use-package altogether. Sometimes I need to delete a heading and its subheadings. Without smartparens package I use the C-k key and it allows me to delete the heading itself ...
0
votes
0answers
36 views
Getting uninstall packages offer after package updates
Each time I call up list-package and update, I get this message after the updates
Operation finished. Packages that are no longer needed: 43. Type ‘M-x package-autoremove’ to remove them
Below is ...
0
votes
3answers
47 views
Why isnt `(require 'use-package)` triggered when I open Emacs?
So, here is my init.el:
(add-to-list 'load-path "~/.emacs.d/site-lisp/use-package")
(require 'use-package)
(with-eval-after-load 'info
(info-initialize)
(add-to-list 'Info-directory-...
0
votes
0answers
22 views
Autoloading of evil fails: failed to define function evil
I get the error:
run-hooks: Autoloading file /home/xxxx/.emacs.d/elpa/evil-collection-20210203.811/modes/unimpaired/evil-collection-unimpaired.elc failed to define function evil at startup.
Here is ...
1
vote
0answers
32 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 ...
0
votes
0answers
38 views
Post installation hooks with use-package
I like to use use-package to automatically install and manage packages. On a fresh emacs install, this works perfectly fine except when a package needs me to manually run something. One example is the ...
0
votes
1answer
32 views
How to do local keymap with use-package
I want to bind the verb package's keymap within org-mode. Currently, I am using the with-eval-after-load function in the :init option.
(use-package org-plus-contrib
:ensure t
:init
(require 'org-...
0
votes
1answer
34 views
Idiomatic way to store and access custom LaTeX code
I have some latex classes or bunch of packages I use and that I'd like to move out of my init.el because it keeps on growing and I want them to be standalone.
How can I make them accessible from my ...
1
vote
0answers
40 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 ...
0
votes
1answer
18 views
Auctex hook causes an error when set with use-package :hook versus add-hook?
According to the use-package documentation these two are the same:
(use-package ace-jump-mode
:hook (prog-mode . ace-jump-mode))
(use-package ace-jump-mode
:commands ace-jump-mode
:init
(add-...
1
vote
0answers
66 views
Installing quelpa-use-package from use-package
Currently I have the following init file to install and use use-package:
;; Package.el
(require 'package)
(package-initialize)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '(&...
1
vote
1answer
56 views
Why do these two different use-package declarations (for the same package) have different effects?
What I want to accomplish is to add a keybinding C-<backspace> to the eshell-mod-map that calls func. That can be done like this,
(use-package eshell
:init
(defun add-func-keybinding ()
(...
1
vote
0answers
29 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 ...
2
votes
1answer
139 views
Why does use-package considers “emacs” as a package?
In the use-package documentation https://github.com/jwiegley/use-package#diminishing-and-delighting-minor-modes there is an example that considers emacs as a package(i.e (use-package emacs))
Usually ...
1
vote
1answer
411 views
Remap lsp-mode prefix with use-package
How do I remap the lsp-mode prefix key to "s-k" using the use-package package?
I tried the following
(use-package lsp-mode
:ensure t
:init
(setq lsp-keymap-prefix (kbd "s-k")
...
1
vote
2answers
57 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)
...
1
vote
2answers
123 views
Is there a better way of writing this with use-package?
I feel like there is a better way of writing this with use-package but I just can't get the usual way to work.
(use-package eshell
:hook
(eshell-mode
. (lambda ()
(define-key
...
0
votes
0answers
17 views
Error when activating org-mode unless speedbar loaded first
Whenever I open an org file before the speedbar package is loaded, org-mode produces the following error:
Symbol’s function definition is void: speedbar-add-supported-extension
The error above is ...
0
votes
1answer
107 views
Byte compilation error with use-package
The beginning of my ~/.emacs.d/init.el file looks like this:
;; MELPA
(require 'package)
(setq package-enable-at-startup nil)
(setq package-check-signature nil)
(add-to-list 'package-archives '("...
4
votes
3answers
938 views
How to bind key in use-package
I added a section binding to my config, but one key doesn't work.
:bind (("C-c a" . org-agenda)
("<f6>" . org-capture)
("<M-S-return>" . org-...
1
vote
1answer
67 views
use-package and dependencies
Given a major mode package foo and foo-x that extends foo, with feature x is there a recommended way to configure them with use-package (assuming :defer t and :ensure t for all?
nested use-package
(...
0
votes
1answer
47 views
Dired ranger not working loading it with use-package
I added the package dired-ranger using use-package, but when I open a folder with dired C-x d , I see the regular single panel instead of the two or three panels from dired-ranger.
I'm loading the ...
1
vote
1answer
136 views
Adding a lambda function as hook in use-package
I'm trying to adapt this answer to use-package elegantly. It requires that I hook a lambda function to python-mode. I came up with this solution — which works:
(use-package python
:hook
(python-...
1
vote
0answers
45 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
.......
2
votes
1answer
119 views
converting c-mode hooks to use-package fails in non-obvious ways
Emacs version 26.3 on a mac
I have this (simplified) c(c)-mode config:
(add-hook 'c-mode-common-hook
'(lambda ()
(c-set-style "bsd")))
which works when I visit a c file.
When I ...
0
votes
0answers
122 views
use-package and straight.el: can't load a package that exists locally?
I'm using the awesome use-package and the awesome straight.el to manage packages.
I'd like to use xahk-mode. I've checked in the 'repos' directory of straight and I can see a folder named xahk-mode ...
10
votes
1answer
685 views
Getting started `use-package` question
I was reading the use-package documentation, which says, "Here is the simplest use-package declaration:"
;; This is only needed once, near the top of the file
(eval-when-compile
;; Following line ...
1
vote
1answer
46 views
Does `use-package` reduce startup time? If so, how?
My understanding of Emacs's package management is that Emacs automatically loads all installed packages.
use-package itself is a package, which only becomes usable after (package-initialize), at ...
1
vote
1answer
68 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 ...
1
vote
1answer
114 views
Problem with use-package and matlab-mode - cannot load
I am trying to use the matlab-mode package with use-package.
in my init.el:
(use-package matlab-mode
:ensure t
:config
(add-to-list
'auto-mode-alist
'("\\.m\\'" . matlab-mode))
(setq ...
0
votes
1answer
80 views
use-package: autoload function outside the main package file
I am trying to install simplenote2 to read my org files on my phone.
The official setup method is:
(require 'simplenote2)
(setq simplenote2-email "email@example.com")
(setq simplenote2-password "...
5
votes
1answer
140 views
change use-package indentation
I'd like to change use-package's indentation style to look more distinguishable, (more or less) similar like the following indentation style:
(use-package foo
:commands (gah)
:init (setq f 1)
...
0
votes
0answers
119 views
use-package deferred loading for extensions not in :mode
When moving to use-package, I'd to replace
(require 'markdown-mode)
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
with
(use-package markdown-mode
:mode "\\.md\\'"
:config ...
)
...
1
vote
1answer
72 views
fetching elisp library from url
I am using use-package in my .emacs and it is great. However
occasionally I want to use a 3-rd party code which is not in [M]ELPA.
Of course, I can download it but then I will need to maintain a copy ...
2
votes
1answer
201 views
`use-package` and `define-key`
I'm using multiple-cursors, setting it up with use-package. By default, when multiple-cursors mode is enabled, <return> is bound to multiple-cursors-mode. I'm trying to override that adding this ...
2
votes
1answer
163 views
Why do I get free variable warnings with use-package?
I have, for instance, this in my .emacs:
(use-package company
:bind (("M-RET" . company-complete))
:demand ; load it now (better for eglot)
:config
(global-...
0
votes
1answer
154 views
Avoid installing package to “.emacs.d/elpa/” directory
I install yasnippet from the repository using the package manager and I add the corresponding directory to the load path before (use-package yasnippet):
;; Add all subdirs in site-lisp to the ...
0
votes
1answer
132 views
Is there a clean way to splice some args to an existing Lisp macro?
I have the following non-working elisp code:
(use-package eglot
;; For debug/testing, load local copy of eglot if it exists
,@(if (file-directory-p (concat user-emacs-directory "/...
1
vote
1answer
136 views
configure packages without`provide` with `use-package`
How to configure packages, which have no (provide <PACKAGENAME>) call in their source code?
Immediate problem: configure isearch with use-package.
(Editing isearch.el is not an option because ...
0
votes
1answer
311 views
Integrating org-download with org-journal; images do not download
I have org-journal entries which I'd like to link to images that are also stored alongside them in the filesystem. Ideally this would happen automatically when an image is dragged-and-dropped on the ...
1
vote
0answers
278 views
use-package org-mode :hook is being ignored
I'm currently running this version of Emacs:
GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.7) of 2019-04-11, modified by Debian
I'm attempting to use use-package to configure the ...
0
votes
3answers
806 views
use-package can't load package at startup
When I start Emacs I get the error message
Error (use-package): Cannot load counsel
But when I open init.el in a buffer and run eval-buffer everything works fine. What I'm doing wrong?
My Emacs ...
0
votes
0answers
645 views
org-mode function definition is void
I install org-mode using use-package via the orgmode.org elpa archive.
In the past month I've received Symbol’s function definition is void messages such as:
org-capture-select-template: Symbol’s ...
1
vote
3answers
223 views
.emacs complains about undefined functions/variables event after byte-compile
I use use-package and pulled in the treemacs package with the default settings. Then I byte-compiled my .emacsfile. But I still get a warning saying:
the following functions might not be defined at ...
1
vote
0answers
127 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-...
3
votes
1answer
2k views
use-package won't load
I use the same configuration of emacs on multiple machines, and I want to use use-package to keep the packages the same on all machines. I have an init file in each machine's home directory that ...