[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use-package.el -> Emacs core
From: |
John Wiegley |
Subject: |
Re: use-package.el -> Emacs core |
Date: |
Mon, 09 Nov 2015 16:31:24 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
>>>>> Dmitry Gutov <address@hidden> writes:
> Will it add a different way to install packages? Is that wise?
> Were it only up to me, I'd just incorporate the features that work well with
> package.el.
No, it does not install packages. There is a keyword, :ensure, which causes it
to use package.el to install a configured package if it is not already
present.
`use-package' is a macro to abstract a common pattern among .emacs files, such
as:
(add-hook 'foo-init-hook 'some-function)
(add-to-list 'auto-mode-alist '("\\.foo$" . foo-mode))
(eval-after-load "foo-mode"
'(progn
(define-key foo-mode-map (kbd "C-c k") 'foo-hello)))
It abstracts the common cases I encountered in my use of 100+ Emacs packages,
and macroexpands to code that tries to minimize Emacs load time as much as
possible. It also adds features that would be cumbersome to do manually, such
as optionally installing an idle-timer so a package is always loaded if Emacs
has been idle for X seconds.
(use-package foo-mode
:mode "\\.foo$"
:bind (:map foo-mode-map
("C-c k" . foo-hello))
:init (add-hook 'foo-init-hook 'some-function))
There is a README with examples at:
https://github.com/jwiegley/use-package
I also discuss it with Sacha Chua in a video:
http://sachachua.com/blog/2015/04/john-wiegley-on-organizing-your-emacs-configuration-with-use-package/
John
- use-package.el -> Emacs core, John Wiegley, 2015/11/09
- Re: use-package.el -> Emacs core, Dmitry Gutov, 2015/11/09
- Re: use-package.el -> Emacs core,
John Wiegley <=
- Re: use-package.el -> Emacs core, Dmitry Gutov, 2015/11/09
- Re: use-package.el -> Emacs core, Oleh Krehel, 2015/11/10
- Re: use-package.el -> Emacs core, Juanma Barranquero, 2015/11/10
- Re: use-package.el -> Emacs core, Oleh Krehel, 2015/11/10
- Re: use-package.el -> Emacs core, Juanma Barranquero, 2015/11/10
- Re: use-package.el -> Emacs core, Oleh Krehel, 2015/11/10
- Re: use-package.el -> Emacs core, Juanma Barranquero, 2015/11/10
- Re: use-package.el -> Emacs core, John Wiegley, 2015/11/10
- Re: use-package.el -> Emacs core, Juanma Barranquero, 2015/11/10
- Re: use-package.el -> Emacs core, Dmitry Gutov, 2015/11/10