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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

orderless style dispatchers setting

I would like to use style dispatchers with orderless, but I don't see how to configure them. The modifiers described in the link does not seem to work by default, at least with my configuration (the ...
finotti's user avatar
  • 13
0 votes
0 answers
18 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
1 answer
21 views

How to keybind an org-capture template with use-package?

Suppose I bound org-capture with C-c c and a tmp template with t: (setq org-capture-templates `( ("t" "tmp" entry (file ,(concat captures-path "tmp.org"))...
crocefisso's user avatar
  • 1,363
1 vote
1 answer
18 views

How to bind a tag addition with a key?

I started using notmuch and I often use the trash tag to have emails sent to Maildir\mail-account-i\Trash through a script. When in search mode, I have to do +trash RET on a mail (or a set of mails) ...
crocefisso's user avatar
  • 1,363
0 votes
1 answer
116 views

Installing a package with `straight` fails with the error `"use-package: Unrecognized keyword: :straight"`

I have this (defvar bootstrap-version) (setq straight-repository-branch "develop") ; Need this for new org-contrib location (let ((bootstrap-file (expand-file-name "straight/...
Jason Hunter's user avatar
0 votes
2 answers
68 views

before-save-hook not working with use-package and custom mode

I wrote a little derived mode for the kage shader language, it's derived from go-mode (syntax is the same). I also like to use gofmt, but it's just not loading the hook. Here's the mode: (define-...
Tom's user avatar
  • 45
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
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
59 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
  • 299
1 vote
1 answer
199 views

What steps should I take to troubleshoot use-package not loading packages

I'm using emacs 29.1 on Windows. I have extracted the emacs folder to a corporate OneDrive. I have a home folder set up with emacs-29.1\share\emacs\site-lisp\site-start.el with (setenv "HOME"...
Marek's user avatar
  • 13
0 votes
0 answers
210 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
51 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
3 votes
3 answers
187 views

Binding a key in another package's yet undefined map in use-package?

I'm using use-package for my configuration in init.el. How can I bind a key to a map that has not yet been defined? As a specific example, I'm using the following configuration of (use-package latex-...
Henry DeYoung's user avatar
1 vote
1 answer
62 views

Use 'mapcar' to build a hooks list; "wrong-type-argument listp lambda"

How can I write a mapping (e.g. a mapcar expression) to build the list for a use-package :hook clause? I'm attempting to build the list in this :hook expression: (use-package eglot :hook ( (...
bignose's user avatar
  • 639
1 vote
1 answer
73 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
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
43 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
53 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
1 vote
1 answer
60 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
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
0 votes
1 answer
70 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
36 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
67 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
  • 341
0 votes
1 answer
2k 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
175 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
55 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
55 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
87 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
387 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
1 vote
1 answer
86 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,364
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
1 vote
1 answer
144 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
  • 666
0 votes
1 answer
104 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
70 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
20 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
1k 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
204 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
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
1 vote
1 answer
906 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
  • 341
1 vote
1 answer
168 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
  • 764
0 votes
1 answer
31 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
53 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
42 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
  • 217
0 votes
3 answers
67 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
5 votes
1 answer
225 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
181 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
59 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
2 3 4 5 6