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
0
votes
0answers
23 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 ...
1
vote
2answers
70 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) ...
3
votes
1answer
191 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
36 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)) :...
1
vote
1answer
386 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 ...
1
vote
1answer
66 views

How can I load Dired+ only if I actually use Dired?

I'm loading dired+ from a file ( as it has been removed from Melpa ), but it won't load when I try to make it conditional of opening a dired buffer. ;; ---- Dired + -------- ;; Loads Dired+ (use-...
1
vote
1answer
1k views

use-package and package-initialize problem with emacs27

I'm having quite a bit of trouble getting use-package to automatically install packages in emacs27 I deleted a package using package-delete and restarted emacs. On emacs26, use-package would ...
1
vote
1answer
83 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
92 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 ...
0
votes
1answer
217 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 ...
1
vote
1answer
106 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 "...
1
vote
0answers
56 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)))) ;; ....
0
votes
3answers
70 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
28 views

use-package keybind only works with eval-buffer

The following init.el keybind doesn't work after starting emacs, only when I eval-buffer init.el (otherwise C-c C-d just goes to its default bind in python-mode): (use-package python-mode :ensure ...
0
votes
1answer
46 views

Why does setting use-package-always-ensure cause Emacs to contact package repositories at startup?

I have the following in my init.el: (setq use-package-always-ensure t) because I want packages referenced by use-package to be downloaded automatically if I don't have them. When I enable this ...
0
votes
1answer
46 views

Add autoloading use-package keywords to a fork of general.el

I have forked general.el to add a few autoloaded keywords of my own, by using the :general keyword use-package functions as a template. However, this bit of code, originally used for :general, is not ...
0
votes
2answers
64 views

use-package session example please

I want to setup session with use-package but I don't know elisp except copying from working code. Here is what I've copied: ;;;_* session (use-package session :if (not noninteractive) :load-path &...
0
votes
0answers
53 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)) (...
1
vote
0answers
40 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 ...
0
votes
1answer
42 views

use-package hook in to multiple modes

How can I tell this config to also activate git-auto-commit-mode mode for the js-mode in addition to fundamental-mode (use-package git-auto-commit-mode :hook (fundamental-mode . git-auto-commit-...
0
votes
3answers
1k 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
1answer
80 views

What is the difference/purpose between "require" and "package-install"?

I am trying to understand the subtle nuances of Emacs' packaging system(s). I do not find that anyone has really clarified or explained the difference between two, what I assume to be, key components ...
2
votes
1answer
42 views

How to override the :hook section of a use-package declaration

I am attempting to change the :hook section of a use-package declaration that I cannot directly modify. In my case, I want to remove hooks that are getting set, not just add more hooks. Is there a way ...
1
vote
2answers
229 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 '("...
2
votes
1answer
2k views

Error (use-package): Failed to install magit: Package `magit-' is unavailable

I am starting to build up a .emacs file to be used as a development environment within Docker containers. I get this error when starting emacs-nox in a Docker container. Error (use-package): Failed to ...
0
votes
0answers
13 views

I would like to couple two autoloaded functions, while using use-package

I would like to couple elm-format-on-save-mode and elm-preview-main, so that when I save a file it gets formatted and compiled, and the generated html get's previewed. (use-package elm-mode :config ...
0
votes
0answers
43 views

Failed to verify signature gnu-elpa-keyring-update

CentOS 7, Emacs 25.1 http://elpa.gnu.org/packages/gnu-elpa-keyring-update.html M-x package-install RET gnu-elpa-keyring-update RET But I get error: Failed to verify signature gnu-elpa-keyring-update-...
1
vote
0answers
207 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 ...
4
votes
1answer
593 views

How do I solve `Lisp error: (void-function -compose)` when using lsp-dart?

When I load a Dart file with GNU Emacs 27.1-1 for OS X I get the following little error novel. Debugger entered--Lisp error: (void-function -compose) (-compose #'lsp--client-path->uri-fn #'lsp--...
1
vote
1answer
18 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
42 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
32 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 (...
6
votes
2answers
637 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?
0
votes
0answers
61 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
57 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
0answers
81 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
39 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
1answer
55 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-...
6
votes
3answers
1k 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 ...
0
votes
0answers
57 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
39 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
46 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
35 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
1answer
61 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
48 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
182 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 ...
2
votes
2answers
194 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 ...
2
votes
1answer
796 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") ...
0
votes
0answers
18 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 ...
4
votes
3answers
2k 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-...