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
7 views

Integrating org-download with org-journal; images do not download

I have org-journal entries which I'd like to link to images that are also stored alongside them in the filesystem. Ideally this would happen automatically when an image is dragged-and-dropped on the ...
0
votes
0answers
5 views

How to temporaraly turn on a minor eldoc mode

I am trying to use go-eldoc, but its performance is too poor to always have on. This is what I currently have: (use-package go-eldoc :defer 2 :hook (go-mode . go-eldoc-setup)) (use-package go-...
0
votes
0answers
21 views

Proper way to use use-package and hooks on Auctex package

I'm learning how to use use-package, and I've some troubles to make it work with the Auctex packages (all the other packages are fine). I made my own function configure-viewer that basically adds a ...
1
vote
0answers
20 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 ...
0
votes
3answers
45 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
0answers
19 views

Org mode needs to be reloaded before I can use my settings

I configured my org-mode through use-package :init and it works fine, except in one case. If I restart emacs and reopen a buffered .org file, my settings won't be applied until I do org-mode-restart, ...
0
votes
0answers
91 views

org-mode function definition is void

I install org-mode using use-package via the orgmode.org elpa archive. In the past month I've received Symbol’s function definition is void messages such as: org-capture-select-template: Symbol’s ...
1
vote
3answers
42 views

.emacs complains about undefined functions/variables event after byte-compile

I use use-package and pulled in the treemacs package with the default settings. Then I byte-compiled my .emacsfile. But I still get a warning saying: the following functions might not be defined at ...
0
votes
0answers
13 views

Why :bind-keymap from use-package doesn't work for origami-mode-map?

Following the use in projectile example, which works fine for me. Why the following variation doesn't? (use-package origami :bind-keymap ("C-c o" . origami-mode-map) :config (global-origami-...
0
votes
0answers
46 views

AUCTeX no longer using pdf-tools after using :bind and :map from use-package to define keybindings for PDFView mode

I'd like to define a Hydra for PDFView mode and bind a key for it in pdf-view-mode-map. However, it seems that if I try to bind any keys for pdf-view-mode-map using :bind and :map of use-package, ...
1
vote
0answers
41 views

use-package do not bind in latex-mode-map

this is a part of my init file (use-package tex-site :ensure auctex :mode ("\\.tex\\'" . latex-mode) :bind (:map LaTeX-mode-map ("<f5> <f5>" . TeX-command-save-buffer-and-...
1
vote
1answer
148 views

use-package won't load

I use the same configuration of emacs on multiple machines, and I want to use use-package to keep the packages the same on all machines. I have an init file in each machine's home directory that ...
0
votes
1answer
36 views

use-package arguments without use-package

The guide I'm following for lsp-emacs wants me to set these options: ;; Enable scala-mode and sbt-mode (use-package scala-mode :mode "\\.s\\(cala\\|bt\\)$") (use-package sbt-mode :commands sbt-...
0
votes
0answers
142 views

Proper use of use-package

I am using the following init file to download and load packages from melpa-stable in fresh Emacs installations: (require 'package) (add-to-list 'package-archives '("melpa-stable" . "https://stable....
1
vote
1answer
35 views

How to convert a package to a layer in spacemacs

I am new to the world of Emacs, and like most ex-vimmers, I am starting with Spacemacs. I have been trying to find time to do some leetcode and would like to use the package leetcode-emacs. I have ...
0
votes
2answers
102 views

Melpa packages aren't being added

I have this in my init.el (require 'package) (setq package-enable-at-startup nil) ;;; Remove SC if you are not using sunrise commander and org if you like outdated packages (setq package-archives '((...
1
vote
1answer
44 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 ...
1
vote
0answers
35 views

binding a minor mode's function to already defined key in global-map

(use-package anaconda-mode :defer t :config (progn (unbind-key "M-." anaconda-mode-map) (unbind-key "C-_" global-map)) :bind ((:map anaconda-mode-map ("C-_" . anaconda-...
0
votes
0answers
304 views

Spacemacs error when loading `.spacemacs` which uses package `flycheck`

I added the following at the end of my ~/.spacemacs file: (use-package flycheck :defer t :init (global-flycheck-mode)) When I do this, I get Spacemacs encountered an error while loading your '/...
1
vote
2answers
33 views

Unbind CUA <C-return> key only in dired mode

Goal: unbind <C-return> key ONLY in dired mode in order to rebind it to dired-w32explore. My configuration is using use-package with something like this: (use-package dired :init (unbind-...
4
votes
1answer
55 views

initialization of bibtex package

When i ran the following code in just started emacs (with-temp-buffer (insert "@article{aaaa, author = {AAA}, title = {BBBB} }") (bibtex-mode) (bibtex-autokey-get-field "title")...
0
votes
1answer
251 views

`use-package` errors with “failed to define function” message when loading a local copy of a package

I'm trying to modify the package ediprolog, which was installed and working before, with use-package, from ELPA. I copied the file from the elpa folder to a folder called ediprolog.el and used: (use-...
1
vote
3answers
182 views

How can I remove the logo image in the dashboard package?

I'd like to remove the image of the Emacs cow from the startup screen, but I want to keep my recent files, bookmarks, and agenda. Currently, I'm using the dashboard package with use-package. My ...
1
vote
1answer
65 views

use-package: How to defer loading a command when depending on other deferred packages?

I would like to autoload the command f-join from f.el using use-package. Note that the package f.el depends on the packages dash.el and s.el. Here is a minimal example: (setq debug-on-error t) (let ((...
2
votes
2answers
334 views

How to properly define hydras inside use-package?

For example, I use undo-tree and have the following in my config file: (use-package undo-tree :ensure t :diminish (undo-tree-mode . "") :config (global-undo-tree-mode 1)) Now I want to use ...
1
vote
1answer
234 views

Properly install ESS using use-package

I installed ESS using the following chuck of code: (use-package ess :init (require 'ess-site) :mode (("\\.[rR]\\'" . R-mode) ("\\.Rnw\\'" . Rnw-mode)) ) Everything works fine, however ...
2
votes
2answers
511 views

use-package :bind not working as expected

I frequently work with R and ess, and want to bind a shortcut to a function that clears the R console: (use-package ess-site :ensure ess :bind (:map inferior-ess-mode-map ("C-c c" . ...
2
votes
2answers
64 views

Reordering declarations with use-package: Why does this work?

I'm reorganising my init.el a bit and I've realised that it contains the following set of use-package declarations: (simplified slightly) (use-package hasky-extensions :config (general-define-key ...
1
vote
1answer
988 views

Error (use-package): Cannot load magit

I am not sure if that is a problem on my site or more people are experiencing this. I thought at first that I broke something in my config file, but after loading by backup .emacs.d, the error is the ...
0
votes
1answer
70 views

Does `provide` conflict with `use-package`?

I just install use-package yesterday and still learning it. I notice use-package is not working in my environment: Here is my init file: (require 'package) (dolist (url '(("melpa" . "https://melpa....
1
vote
1answer
455 views

How to set mode hook with lambda using use-package

I'm attempting to set the following hook using use-package, but it's not getting applied. Normal elisp: (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) Using use-package: (use-package ...
2
votes
1answer
260 views

use-package won't load helm for projectile

I'm trying to use use-package to load projectile. Projectile uses helm for completion, which I'm also loading with use-package. Since projectile and helm have :bind sections I believe they're both ...
0
votes
0answers
94 views

package-install - not match

Window 10 (64 bit), Emacs 26.1 When in *scratch* buffer I run: M-x package-install multiple-cursors I get error No match But when I go to package manager I success found and install package ...
3
votes
1answer
97 views

use-package ensure not working: package downloaded but gives warning and skips config [duplicate]

I have the following code in my init.el file: (use-package org-plus-contrib :ensure t :config (progn (require 'ox-extra) (ox-extras-activate '(ignore-headlines)))) The :ensure t ...
0
votes
2answers
137 views

Load package in dir-locals

Sorry, I'm new to emacs and I'm sure this is a very basic question. For my personal projects I prefer spaces for indentation, whereas work requires smart-tabs (tabs for indentation, spaces for ...
3
votes
1answer
53 views

Ensuring binary packages with use-package

I just started organizing my packages with use-package because I need the simple transition between few computers. I use few binary programs asynchronously, and been therefor searching for solution ...
5
votes
1answer
57 views

How to use `use-package` when the package and associated feature are named differently?

What use-package declaration should one use when the name of the package (as present in MELPA or GNU ELPA) and the name of the main feature provided by that package are different? For instance ...
0
votes
0answers
83 views

“No such file or directory, bind-key” after installing use-package [duplicate]

I'm using Emacs on Windows 10. I want to override key bindings, so after reading How to override major mode bindings, I installed use-package with the built-in package manager (via M-x package-install ...
0
votes
1answer
512 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 ...
4
votes
0answers
351 views

when to use defer in use-package?

Quoting from use-package If you aren't using :commands, :bind, :bind*, :bind-keymap, :bind-keymap*, :mode, or :interpreter (all of which imply :defer; see the docstring for use-package for a brief ...
7
votes
1answer
166 views

When to specify a package name in use-package's :ensure tag?

use-package lets you automatically install packages by using the :ensure tag. You can do that as follows (use-package <package> :ensure t) But for some packages that doesn't work, such as ...
7
votes
1answer
605 views

Is it possible to load Dired+ automatically with use-package?

I'm trying to add dired+ to my init.el with use-package but I can't seem to find the name of dired+ on any of the package repositories ( marmalade, melpa or elpa ). I'd been able to add dired+ after ...
5
votes
1answer
1k views

How to avail of `:hook` using use-package?

I've wrote this, and it works: (use-package web-mode :ensure t :mode (("\\.php$" . web-mode) ("\\.html$" . web-mode)) :preface (defun dg/web-mode-hook()) :config (add-hook 'web-...
1
vote
1answer
910 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 ...
4
votes
2answers
3k views

error: Package `use-package-' 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. Warning (initialization): An ...
13
votes
2answers
1k views

use-package - :init or :config

Is there any rule by which the user can determine whether the package configuration requires :init or :config?
2
votes
1answer
152 views

Load all function with use-package

How to load all function in package with use-package ? I modified crux package, and make my own simple-crux.el Inside simple-crux.el, say I have function foo, bar and baz. when I use (use-package ...
0
votes
1answer
97 views

ztree - use-package key bindings

I tried to set key bindings to ztree (dir and diff), but they are not working after the emacs startup (there is no errors). f8 and C-f8 works but not the navigation keys. Pleas help. When I eval my ...
3
votes
1answer
126 views

“Dissasociate” auto-mode for specific files (in ESS)

I'd like to keep ess as automatic major mode for R files and everything else, except for Julia, for which I want to use julia-mode alone. However, I cannot find out how to "unbind" the file ...
0
votes
1answer
587 views

Unable to bind SPC as a prefix in general (evil mode)

My setup worked perfectly fine, however I recently reinstalled Emacs and therefore updated all packages as well when starting for the first time. Since then I cant get rid of the warning/error: ...