HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
jwiegley
use-package
Emacs Lisp2013–2024
jwiegley / use-package · Archived

use-package

A use-package declaration for simplifying your .emacs

20Distinct people
22Mentions
0Explicit recommenders
4.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A use-package declaration for simplifying your .emacs

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year22 dated mentions

Observed mentions: 2013-10-28 14:32:23 UTC to 2024-11-16 03:18:12 UTC.

0123452013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC101
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC202
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC404
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC404
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC505
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

22 sources
One example is the ~use-package~ macro (Emacs plugin) [0]. Using packages in emacs is mostly the same code over and over. They've already been abstracted in functions, but you still find yourself juggling with so many utilities. You could write a bigger functions, but it will then have a lot of conditional branches. This macro selectively select the code it needs and transforming it if needs be and then the result will be evaluated. It's a bit hard to explain for me (English is not my native language). But it's the difference between coding a solution with all the edge cases baked in and coding an archetype that let you add your own cases. With functions, you abstract common algorithms, with macros you abstract common architecture. [0] https://github.com/jwiegley/use-package/blob/a6e856418d2ebd0...
In C++ template macroprogramming versus Lisp macros
> Deps is well documented. > The issue I personally found is that I needed to look at a bunch of OS project's deps.edn to see how people commonly structure things. Other than that it is a simple tool. This seems like a contradiction, because if it was well documented you wouldn’t need to look at other people’s configs to see how to use it. My experience with deps.edn is that every time I start a project and make a deps.edn file, I immediately draw a blank and don’t know how to structure it, so I open ones from other projects to start lifting stuff out of them. I still don’t know how to reliably configure a project to use nrepl or socket repl without just using an editor plugin. I definitely have no idea how to use those in conjunction with a tool like reveal. To me, none of that is simple. Simple would be like Emacs’ use-package. With tha
Read the rest
t I know how to add dependencies, specify keybinds, and do initialization and configuration off the top of my head knowing only the name of a package I want to use. And it has really nice documentation with tons of examples. https://github.com/jwiegley/use-package
In Clojure Turns 15 panel discussion video
Here's what I have so far: * I installed Emacs 26.3 using `sudo apt install emacs` * I installed Melpa by following https://github.com/melpa/melpa/blob/master/README.md#usage * I installed use-package using `M-x package-install use-package` Now I'm trying to make sense of your instructions while reading https://github.com/jwiegley/use-package#readme. I don't see a bind-key*, but I do see: - bind-key - bind-keymap - bind-keymap* Should I try one of those instead? They all seem to be in the context of a `(use-package ...)` declaration. Edit: Never mind, I do see it now at https://github.com/jwiegley/use-package/blob/master/bind-key... Edit 2: I just tried it and it didn't work. Turns out I've tried this approach in the past: https://lobste.rs/s/whaez0/emacs_everywhere#c_l6ez9w (edit 2 there, heh) Wait, the suggestion at the top of that comm
Read the rest
ent now works for me on a few different file extensions! (setq-default tab-width 2) (setq-default indent-tabs-mode nil) ; to insert a tab anyway: C-q TAB (define-key global-map [tab] (lambda () (interactive) (insert-tab))) Thank you!
In Emfy: Emacs for You – Quickly set up vanilla Emacs for editing
On Windows, probably the easiest way is to use Scoop [0]. You can then install org-mode with `M-x package-install org-plus-contrib` If you want to set it up in your `~/.emacs.d/init.el` config, you can use something like `use-package` [1] to make the installation easier : ```elisp (add-to-list 'package-archives '("Org" . "https://orgmode.org/elpa/")) (use-package org :ensure org-plus-contrib :mode ("\\.org\\'" . org-mode) ) ``` [0]: https://jrhawley.ca/2020/03/08/emacs [1]: https://github.com/jwiegley/use-package
In Org Mode 9.5
I tried Rudel a little while ago, and I just had some troubles. Probably my fault. I wasn't nearly as well-versed with Emacs back then. I just tried crdt.el[^1] and holy crap that's cool. I love that it's all built in Emacs, like, there's no special server I have to run to get this to work. I'm blown away. I use straight.el[^2] and use-package[^3] for package management; if you want to give crdt.el a whirl, just use this: (use-package crdt :straight (crdt :type git :repo "https://code.librehq.com/qhong/crdt.el")) A fun alternative if you're in the terminal is tmate[^4], which is a fork of tmux. That one uses a central server to negotiate the connection though, I believe. [^1]: https://code.librehq.com/qhong/crdt.el [^2]: https://github.com/raxod502/straight.el [^3]: https://github.com/jwiegley/use-package [^4]: https://tmate.io
Read the rest
In Collaborative Editing Options for Emacs
I would suggest a step further: start with Spacemacs/Doom, but if you decide to stick around, try to build your own Emacs configuration based on the part of Spacemacs/Doom that you like. Thanks to the amazing use-package[1] macro (which Spacemacs/Doom also uses) most configurations are self-contained to a certain extent. Searching for use-package in GitHub[2] will yields plenty of results which can be mostly be taken as a reference for your own liking. It should be relatively easy to port part of Spacemacs/Doom to vanilla use-package, e.g. starting with this (which sets up use-package alongside with evil): (require 'package) (setq package-enable-at-startup nil) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) (unless (package-installed-p 'use-package) (package-refre
Read the rest
sh-contents) (package-install 'use-package)) (eval-when-compile (require 'use-package)) (use-package evil :ensure t :config (evil-mode t) (use-package evil-leader :after evil :ensure t :config (evil-leader/set-leader "<SPC>") (global-evil-leader-mode t)) To add Magit, one could take a look at Spacemacs's git/packages.el[2], search documentation on what each package does, and proceed on porting configuration, only the part that you actually uses, e.g.: (use-package evil-magit :ensure t :after (magit evil)) (use-package magit :ensure t :config (evil-leader/set-key ("gs" #'magit-status)) Since most configurations based on use-package are self-contained, when stuck I also like to use GitHub search to look on how other people configure a certain package[3]. In most cases the configuration should be reusable as-is. Finally, use-package is highly extensible. There is straight.el[4] which adds extension to use-package to fetch from Git and pin a version in a lockfile, which adds reproducibility to Emacs configuration. There's also el-patch[5] from the same author that allows patching package on the fly without the need to maintain separate forks. [1]: https://github.com/jwiegley/use-package [2]: https://github.com/syl20bnr/spacemacs/blob/d46eacd83842815b2... [3]: https://github.com/search?l=Emacs+Lisp&p=4&q=use-package&typ... [4]: https://github.com/raxod502/straight.el [5]: https://github.com/raxod502/el-patch
In Magit – A Git Porcelain inside Emacs
I'm a moderately experienced Emacser - been using it heavily since 2009 (first encountered it in 2003). I have written a few small extensions and contributed features and bug fixes to bigger ones. Credentials established, I cannot recommend this tutorial enough: https://david.rothlis.net/emacs/tutorial.html He walks you through most of the core of what makes Emacs great by showing you how to make a change to a project in the idiomatic Emacs way. I would have learned it years faster had I started there. Beyond that, learn basic Emacs keybindings via the tutorial, as others have suggested. I started in Emacs but installed evil-mode a few years ago and have never looked back. I do not recommend Spacemacs. Install the tools you want as you find you want them, so that you know what's doing what, and so you have a decent chance of knowing what
Read the rest
broke things when something stops working. Keep your packages in version control as part of your .emacs.d repository. That keeps updates and deleted packages from screwing you. Use "use-package" (https://github.com/jwiegley/use-package) for configuring what you install. It's written by one of the Emacs maintainers and will help you do things right by default. I'm not the best Emacser out there, but if you're curious, my config is on my GitHub account: https://github.com/NateEag/.emacs.d Happy hacking.
In Ask HN: Resources to grok Emacs and use it well?
Spacemacs does indeed use evil. I found Spacemacs to be great starting point for someone new to Emacs, but after a while I highly recommend extracting your workflow from Spacemacs to vanilla Emacs. Thanks to use-package[1] (that Spacemacs also uses), most of the extracting would be just copy and pasting things from Spacemacs repo. The hardest part would be figuring out which package is responsible for which functionality. A starting point would be just put this in ~/.emacs.d/init.el: (require 'package) (setq package-enable-at-startup nil) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (eval-when-compile (require 'use-package)) (use-package ev
Read the rest
il :ensure t :config (evil-mode t) And now you got a working vanilla Emacs with evil auto-installed, ready to be put in VCS. After extracting work is done, it will open up a new world of customization (even a low-level things such as replacing package.el with straight.el[2] to enjoy configuration reproducibility) as you now know exactly how every piece fits together. :-) [1]: https://github.com/jwiegley/use-package [2]: https://github.com/raxod502/straight.el
In Ask HN: Is Visual Studio Code the Emacs of 21st century?
i wouldn't recommend keeping your elpa packages in dropbox if you sync between different operating systems. i've run into issues where auxiliary binaries were giving me trouble. instead, you can use use-package [0] and keep your configuration files in dropbox/syncthing. [0] one of emacs's killer libraries, imo. a brilliant package configuration system that i don't believe vimL could ever support: https://github.com/jwiegley/use-package
In Show HN: Emacs-Bootstrap

Showing the 15 most recent of 22 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.