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
27 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
0answers
36 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)) (...
0
votes
2answers
38 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 &...
1
vote
0answers
35 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
23 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
1answer
68 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
40 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 ...
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
28 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-...
0
votes
0answers
139 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 ...
2
votes
1answer
420 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
17 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
41 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
31 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
50 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
46 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
56 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
57 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
38 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
49 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
46 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
38 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
44 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
28 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-...
2
votes
0answers
120 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
58 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
38 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
162 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
629 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
65 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
164 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
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 ...
1
vote
2answers
177 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
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-...
1
vote
1answer
103 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
59 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
202 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
53 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
152 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
196 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
860 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
48 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
76 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
147 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
98 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
165 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
140 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
79 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 ...
3
votes
1answer
226 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 ...
3
votes
1answer
210 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-...