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
1 vote
1 answer
29 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 ...
user avatar
  • 185
1 vote
1 answer
34 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 ...
user avatar
  • 263
0 votes
2 answers
47 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 ...
user avatar
  • 509
0 votes
1 answer
35 views

Why I can't 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 ...
user avatar
2 votes
1 answer
35 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-...
user avatar
0 votes
0 answers
16 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 ...
user avatar
  • 509
0 votes
0 answers
30 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-...
user avatar
  • 59
0 votes
1 answer
34 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 ...
user avatar
  • 509
0 votes
1 answer
20 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 ...
user avatar
  • 509
0 votes
0 answers
18 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 ...
user avatar
0 votes
1 answer
47 views

Errors with use-package after upgrading package

I load modus-themes (among other packages) in my Emacs configuration using: (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") ("melpa" . &...
user avatar
0 votes
1 answer
46 views

`use-package` :defer prevents :mode from actually inserting something in auto-mode-alist

In my init.el, I have something like (use-package racket-mode :mode "\\.rkt\\'") However, when I open a .rkt file, racket-mode does not start. Running (alist-get "\\.rkt\\'" ...
user avatar
0 votes
1 answer
66 views

Where to put custom-set-faces in the init.el in org-roam context?

I found a code snippet that can be used to have different colors for links and org-roam links on SystemCrafters (aka David Wilson). (custom-set-faces '((org-roam-link org-roam-link-current) :...
user avatar
  • 509
1 vote
1 answer
38 views

Process of packages loading

It seems I totally do not understand the mechanism of package loading in Emacs. I have in my init.el something like this: (use-package elpy :ensure t :init (elpy-enable) :config (defalias '...
user avatar
2 votes
1 answer
53 views

How to convert init file with Elisp sexps for installing packages to use `use-package`?

When I read various guides on how to start using use-package, they only seem to describe how to start from scratch. My init file is full of Elisp snippets I have pasted there, from the installation ...
user avatar
1 vote
1 answer
76 views

Use `use-package-always-ensure` inside a function

The following init file does not work if flycheck is not installed: (defun install-my-packs () (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) ;;...
user avatar
  • 1,618
0 votes
0 answers
32 views

How to bind term-interrupt-subjob in term-raw-map with use-package?

I am trying to bind term-interrupt-subjob in term-raw-map like this, (use-package term :bind (:map term-raw-map ("C-c". term-interrupt-subjob) ("C-'". kill-buffer))) ...
user avatar
  • 755
0 votes
1 answer
24 views

Separate November 29 org-9.5.1 directory under elpa directory

I just noticed that I have under my ~/.emacs.d/elpa directory a ~/.emacs.d/elpa/org-9.5.1/ directory wherein all the entries have the date 29 Nov. So when I look for ob-haskell.el it's not in ~/.emacs....
user avatar
  • 2,717
0 votes
1 answer
48 views

How to enable fuzzy matching in Ivy's prompt-buffer via use-package?

I used to use Helm and I really liked it. After watching System Crafter's YouTube series called "Emacs from Scratch", I decided to use the configuration showcased. The YouTuber prefers Ivy ...
user avatar
0 votes
0 answers
30 views

How to disable highlight-indentation-mode in elpy/Python

I use elpy with Python files. The indention is shown with vertical bars. I do not want them and know that I can disable them with highlight-indentation-mode. Doing this explicite with M-x in the ...
user avatar
  • 509
0 votes
1 answer
90 views

init-open-recentf with use-package

I want to use use-package for nearly everything in my init.el. I have set up recentf. And to make the recent-file buffer pop up when Emacs starts I also included the init-open-recentf package. But I ...
user avatar
  • 509
0 votes
0 answers
29 views

recursive require of slime error when trying to require symex

I'm getting the following error when doing (require 'symex) or (use-package symex). Error (use-package): symex/:catch: Recursive ‘require’ for feature ‘slime’ This is emacs 27.1 on Ubuntu 21.10 and ...
user avatar
1 vote
1 answer
34 views

How can I use some package after other some other packages loaded?

I am trying to start dap-mode in my golang project. I already have lsp-mode config set. for example: (use-package lsp-mode :hook ((go-mode . lsp-deferred) (rust-mode . lsp-deferred) ) ) What ...
user avatar
  • 123
1 vote
1 answer
54 views

Why I can't boot Emacs succesfully with this EXWM configuration in my init file?

I have been using Emacs for the last 5 months. However, tiling window managers is totally a new topic for me. This includes EXWM. Since I am already somewhat familiar with Emacs, I have been trying ...
user avatar
0 votes
0 answers
60 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 ...
user avatar
  • 139
1 vote
1 answer
123 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-...
user avatar
  • 558
1 vote
1 answer
97 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)) :...
user avatar
1 vote
0 answers
71 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)))) ;; ....
user avatar
  • 375
0 votes
1 answer
210 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 ...
user avatar
0 votes
1 answer
53 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 ...
user avatar
0 votes
0 answers
130 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)) (...
user avatar
  • 387
0 votes
2 answers
119 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 &...
user avatar
  • 387
1 vote
0 answers
52 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 ...
user avatar
0 votes
1 answer
114 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-...
user avatar
0 votes
1 answer
251 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 ...
user avatar
  • 105
2 votes
1 answer
125 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 ...
user avatar
  • 342
2 votes
0 answers
521 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 ...
user avatar
  • 231
4 votes
1 answer
914 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--...
user avatar
  • 143
1 vote
1 answer
34 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) (...
user avatar
1 vote
0 answers
35 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 (...
user avatar
  • 11
0 votes
0 answers
86 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 ...
user avatar
  • 273
0 votes
0 answers
99 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 ...
user avatar
  • 2,717
0 votes
3 answers
107 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-...
user avatar
1 vote
0 answers
44 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 ...
user avatar
  • 308
0 votes
1 answer
95 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-...
user avatar
  • 375
0 votes
1 answer
44 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 ...
user avatar
1 vote
0 answers
47 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 ...
user avatar
  • 415
0 votes
1 answer
71 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-...
user avatar
  • 755
3 votes
1 answer
438 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 '(&...
user avatar
  • 1,618
1 vote
1 answer
73 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 () (...
user avatar
  • 755

1
2 3 4 5