[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using use-package
From: |
Phillip Lord |
Subject: |
Re: using use-package |
Date: |
Tue, 11 Aug 2015 21:42:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Sebastien Vauban <sva-news@mygooglest.com> writes:
> phillip.lord@russet.org.uk (Phillip Lord) writes:
>
> Just wanted to share how I do *some* of the above points in my config
> file. Here an example for `diff-hl', which indicates changes in the
> fringe:
>
>
> (with-eval-after-load "diff-hl-autoloads"
>
> (idle-require 'diff-hl))
>
> (with-eval-after-load "diff-hl"
>
> (global-diff-hl-mode)
>
> (define-key diff-hl-mode-map (kbd "C-x v >") 'diff-hl-next-hunk)
> (define-key diff-hl-mode-map (kbd "C-x v <") 'diff-hl-previous-hunk))
This is pretty much what use-package does actually. It's an odd package,
in that the main entry point is a macro. Nowadays, it's even needed at
runtime iff you compile your .emacs.
>
> (with-eval-after-load "diff-hl-autoloads-XXX" ; Diff-hl won't be req'ed
>
> (idle-require 'diff-hl))
>
>
> Of course, I miss, for example, the real execution time of that block,
> once executed/loaded (and you can't advice a macro such as
> `with-eval-after-load', right, to add timings?).
I don't think so, no. It's easy to write a new macro which adds these
timings and expands to `with-eval-after-load'
> And I do have all ELPA paths in `load-path' unlike John (IIUC), though
> I don't understand yet how it works (differently) with `use-package'.
I haven't checked how ELPA load-paths work. Unlike John, though, I don't
sync my ELPA directory; actually I tend to delete it periodically. My
.emacs auto-installs any packages I need.
Phil
- Re: using use-package, (continued)
- Re: using use-package, John Wiegley, 2015/08/11
- Re: using use-package, Stefan Monnier, 2015/08/11
- Re: using use-package, Phillip Lord, 2015/08/11
- Re: using use-package, John Wiegley, 2015/08/12
- Message not available
- Re: using use-package, Sebastien Vauban, 2015/08/11
- Re: using use-package, Nicolas Richard, 2015/08/11
- Re: using use-package, Alexis, 2015/08/11
- Re: using use-package, Nicolas Richard, 2015/08/11
- Re: using use-package, Alexis, 2015/08/11
- Re: using use-package,
Phillip Lord <=
- Message not available
- Re: using use-package, Rusi, 2015/08/12
- Re: using use-package, Ian Zimmerman, 2015/08/12
- Re: using use-package, Stefan Monnier, 2015/08/12
- Re: using use-package, tomas, 2015/08/13
- Re: using use-package, Stefan Monnier, 2015/08/13
- Re: using use-package, tomas, 2015/08/13
- Message not available
- Re: using use-package, Stefan Monnier, 2015/08/13
- Re: using use-package, tomas, 2015/08/13
- Re: using use-package, Michael Heerdegen, 2015/08/13
- Re: using use-package, Stefan Monnier, 2015/08/13