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
1 answer
33 views

Splitting use-package declarations in literate config

Trying to clean up my configuration and make it more readable, but also reduce load time from current time of about 13 seconds down to < 10. Suppose I have a large use-package macro for a package ...
nonreligious's user avatar
0 votes
0 answers
208 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,762
0 votes
0 answers
9 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
  • 489
0 votes
1 answer
33 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
  • 489
0 votes
0 answers
27 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
  • 489
0 votes
1 answer
23 views

How to proper install and configure js2-mode via use-package declaration?

I am trying to install this package called js2-mode. This is part of my effort to follow this tutorial. Package documentation and tutorial are using classic installation via package-install as follows:...
Pedro Delfino's user avatar
0 votes
0 answers
13 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
0 votes
1 answer
39 views

use-package with builtin mode, such as display-time-mode

I'm trying to use the use-package method of organizing my Preferences.el file in Aquamacs. When I try to use use-package display-time-mode, I get the following error message. Debugger entered--Lisp ...
Henry DeYoung's user avatar
0 votes
1 answer
22 views

Aquamacs hangs when refreshing package contents

I'm trying to use use-package in my Preferences.el file under Aquamacs 3.6. Every time I try to run Aquamacs with the following Preferences.el, Aquamacs hangs, usually indefinitely. (require 'package)...
Henry DeYoung's user avatar
1 vote
1 answer
31 views

Override counsel-yank-pop binding with use-package

I would like to use the classic emacs yank-pop instead of counsel mode's counsel-yank-pop which is linked to M-y. I've tried unbinding and rebinding it, but it does not seem to work. I setup counsel ...
oneself's user avatar
  • 289
0 votes
1 answer
156 views

Why is getenv not working to read an environment variable in my macOS machine?

I am using macOS and vanilla Emacs. In my .zshrc file I have the following: export OPENAI_API_KEY=my-key The setting of the environment variable works as expected on the terminal (iTerm2): ➜ echo $...
Pedro Delfino's user avatar
0 votes
1 answer
40 views

What is the difference between using "(use-package" and "(use-package!" with the exclamation mark by the end?

I have seen a new cool Emacs package called gptel. One of the ways to install it is using the use-package approach: (use-package! gptel :config (setq! gptel-api-key "your key")) However, ...
Pedro Delfino's user avatar
0 votes
1 answer
47 views

Using :init in use-package produces an error-like message

My .emacs file contains (use-package mds :commands mds mds-version :init (mds)) That produces, in Messages, (Shell command failed with code 1 and no output). If :init is replaced with :config that ...
JoeRiel's user avatar
  • 31
0 votes
0 answers
29 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
26 views

How to properly use :default-directory in Flycheck checker definition?

I'm trying to use a somewhat new property that has been introduced to Flycheck checker definition syntax recently, and I don't think I'm doing it properly. I believe the :default-directory property ...
Igor Zinov'yev's user avatar
0 votes
0 answers
61 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
0 answers
48 views

How to use authinfo gpg when configuring a package with use-package

I want to use ejira in conjuntion with use-package as suggested in the readme: (use-package ejira :init (setq jiralib2-url "https://jira.mycorp.com" jiralib2-auth ...
anquegi's user avatar
  • 749
0 votes
1 answer
129 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
  • 391
1 vote
1 answer
27 views

How to skip confirmation with use-package :ensure?

I am trying to install Emacs vterm. Following its documentation, I added this to my init.el: (use-package vterm :ensure t) I have made sure that the dependencies are installed in my system (...
tinlyx's user avatar
  • 1,280
0 votes
1 answer
68 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
47 views

Defining capture templates with use-package

I'm using the preface keyword of use-package to define capture templates. Although this approach work I'm now sure if it's the recommended way of doing things. I would be grateful for any suggestion. (...
Zoli's user avatar
  • 391
1 vote
1 answer
74 views

In Dired, How to disable (or unmap) SPC from executing dired-next-line?

What I want: While in dired, want to disable/unbind <SPC> from dired-next-line Reason: I use j or <C-n> to dired-next-line in dired, I never use <SPC> as to go next line. I use &...
Garid's user avatar
  • 565
0 votes
1 answer
47 views

Error when using helm setup with use-package

My current helm configuration is (use-package helm :bind (("M-x" . helm-M-x) ("C-x b" . helm-mini) ("C-x C-f" . helm-find-files) ("C-x C-...
loewenheim_swolem's user avatar
0 votes
1 answer
56 views

Translate use-package syntax

I am not sure how to translate this use-package :commands syntax into a regular elisp init.el file. (use-package languagetool :commands (languagetool-check languagetool-clear-suggestions ...
mislyde_alfabetisk's user avatar
0 votes
1 answer
19 views

custom use-package keyword only initializing last form

My package deino is a fork of hydra, which allows me to create temporary keymaps; here it is being used along with my package prime: With following macro: (defmacro prime* (parent first-call key func &...
ShadowRylander's user avatar
1 vote
1 answer
550 views

Why can't I install package yaml-mode on my Emacs via use-package declaration?

I am trying to install a package called yaml-mode on my Emacs. Basically, a syntax highlighting for .yaml files. My current syntax highlighters do not have support for yaml files, apparently. Hence, I ...
Pedro Delfino's user avatar
0 votes
1 answer
131 views

Use-package :bind-keymap with car as a form

As you can see below, trying to make a cons using a backquote and a colon to evaluate a form causes an error. Surely this is a tiny mistake, but Lisp is not my cup of tea. Let's just jump to the code: ...
adentinger's user avatar
0 votes
0 answers
55 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
1 answer
465 views

Turn on minor mode rainbow-mode using use-package

I would like to turn on rainbow-mode in elisp and/or lisp modes when I am editing init.el using use-package. I've tried the following: (use-package rainbow-mode :demand t :hook ((text-mode . ...
oneself's user avatar
  • 289
1 vote
1 answer
80 views

:config of use-package is not working for multiple cursors

I have noticed a weird behaviour with use-package for multiple-cursors when trying to customize insertion of numbers. I am able to insert numbers on multiple cursors using C-c n using this code ;; ...
Ajned's user avatar
  • 672
0 votes
1 answer
23 views

How to fix the installation of package clj-refactor?

I am using Emacs on a macOS Monterey 12.5 (M1 hardware). This is my config file. I am trying to install a package called clj-refactor for Clojure development. Following the instructions on the ...
Pedro Delfino's user avatar
0 votes
1 answer
34 views

use fork in use-package

Because of this issue I need to change the location of the sources of the auctex-latexmk package to use a fork. Unfortunately I can't find any way to specify the address of a fork in use-package. Do ...
tobiasBora's user avatar
0 votes
1 answer
30 views

Symbol's value as variable is void: company-transformers

I am trying to prevent company-mode from autocompleting numbers. I added the following to my init file. (push (apply-partially #'cl-remove-if (lambda (c) (string-match-p "\\`[0-9]...
cdd's user avatar
  • 195
0 votes
3 answers
60 views

After package installation, why Emacs kept retrieving an error message on "Creating directory: Operation not supported" subsequent to normal behavior?

I was using this init file on a NixOS machine. It is important to note that parts of the file were written with use-package and other parts were a legacy from the classic imperative installation of ...
Pedro Delfino's user avatar
4 votes
1 answer
171 views

Is it possible to wrap a small package not listed on MELPA/ELPA via use-package? How to do it?

I like this Emacs package called Emacs Centered Point link. I must highlight that it is not listed on MELPA/ELPA. Until now, I have just appended the snippet to my init file with the following and it ...
Pedro Delfino's user avatar
1 vote
0 answers
103 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
0 votes
1 answer
54 views

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

When I first installed wrap-region, I used to install things via the classic M-x and package-install. Then, I inserted the following configuration: ;; Emacs minor mode to wrap region with tag or ...
Pedro Delfino's user avatar
1 vote
0 answers
186 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
131 views

(Un-)bind keys for org-agenda in use-package

I want to unbind some keys in the org agenda display with use-package. I did the following: (use-package org :ensure t :pin gnu :config (define-key org-agenda-mode-map (kbd "<C-S-right&...
Christian Herenz's user avatar
2 votes
2 answers
665 views

After updating my packages, two packages are not working anymore. How to solve this? Downgrading it? Bug reporting to maintainers? Fixing?

This is my config file. As you can see, on line 351, there is: ;; Update my Emacs' packages every week (use-package auto-package-update :custom (auto-package-update-interval 7) (auto-...
Pedro Delfino's user avatar
1 vote
1 answer
444 views

project.el: override project-find-regexp with use-package to show live results like project-find-file (preferably with consult)?

When switching projects, there's a few commands available off the bat that can be selected from the mini-buffer after selecting a project. [f] Find file [g] Find regexp [d] Find directory ... Both ...
ldeck's user avatar
  • 205
1 vote
1 answer
92 views

Recursive 'require' for feature 'auto-package-update'

I'm trying to use auto-package-update to do what it says on the tin. As per the instructions at use-package documentation I'm using... (use-package auto-package-update :ensure t :config (setq ...
slackline's user avatar
  • 303
0 votes
2 answers
189 views

Activate origami folding for python only with using use-package

I want to activate origami folding mode for python only. I do use use-package for loading and configuring my packages. This is what I tried so far (use-package origami) (use-package python :ensure ...
buhtz's user avatar
  • 689
0 votes
1 answer
378 views

Why can't I install projectile via use-package declaration?

I am watching a great YouTube series called Emacs From Scratch from System Crafters' YouTube channel. On episode #4, David Wilson talks about projectile. His screen shows: There is a pointer for the ...
Pedro Delfino's user avatar
2 votes
1 answer
94 views

How to insert a flyspell hook on Magit via `use-package` declaration?

I am rewriting my Emacs config file to fully use use-package and organize code. Currently, I have (use-package magit :custom (magit-display-buffer-function #'magit-display-buffer-same-window-...
Pedro Delfino's user avatar
0 votes
0 answers
60 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
  • 689
0 votes
0 answers
56 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
1 answer
55 views

Setup which-function-mode via use-package for python only

I was looking around in foreign but public init.el files and setup a which-function-mode that use the headline instead of the modeline for it's content. I couldn't find a use-package example for that ...
buhtz's user avatar
  • 689
0 votes
1 answer
49 views

Find unused packages installed from (m)elpa but also taking on-demand loaded packages into account

Because of playing around with some configurations I have a lot of unused but installed packages. Can I list them somehow to know which ones I can uninstall? The important point here is that not all ...
buhtz's user avatar
  • 689
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

1
2 3 4 5