emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use-package.el -> Emacs core


From: Phillip Lord
Subject: Re: use-package.el -> Emacs core
Date: Tue, 10 Nov 2015 17:36:59 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

João Távora <address@hidden> writes:

> address@hidden (Phillip Lord) writes:
>
>> use-package introduces a single (documented) form. So, it's easy to
>> re-eval everything, and keeps all your code in one place. Trivial as
>> this sounds, this is actually pretty useful.
>>
>> In your examples, you need to "progn" everything to achieve the same.
>
> Or use `eval-region'. Or eval the whole .emacs while you're at it.

The first is error prone, the second assumes your entire .emacs is
idempotent.


> So, unless I'm missing something, your example is misrepresenting the
> alternative: when I asked about a fair comparison, I didn't mean a mere
> macroexpansion of the `use-package' form.

The point is that the two forms have quite different expansions, despite
containing quite overlapping arguments.


>>           (message "%s...done" "Loading package foo"))))))
>
> By the way, for the pretty logging functionality, why not add something
> more atomic like a `timing' macro? It could be used as your `progn'
> replacement
>
>    (with-timing "Loading bla"
>      ... configure bla ...)
>
> As well as anything else not related to packages
>
>    (with-timing "Frankinboging fretzels" ...)
>
> I prefer reusable components to big obscure, hard-to-debug black magic
> spells.

That would be nice, yes, and would be a valuable change, as the
with-timing could be turned on and off in a uniform way.

> As another drawback, if a user messes up a line in use-package (still
> totally possible right?) it's much easier to catch that error in a
> backtrace, or a byte-compilation log, when *not* using the syntactic
> sugar.

Yes. Although, the ability to turn lazy loading (with defer) on and off
is a big help in debugging .emacs files. Still use-package now has some
nice error handling. You can't use invalid keyword any more. I've also
found the clean mechanism for disabling all configuration for a package
at once to be helpful.


> The problem could be slightly reduced if use-package came with an edebug
> spec. I don't think it does.

That would be useful, but only so useful. In practice, edebug is not, in
my experience, enormously useful in debugging .emacs files.


>> A useful system for working out why your .emacs is so slow to load.
>>
>> *shrugs*. I really like it, and it's made my .emacs cleaner.
>
> If *you* like it and in your opinion it's cleaner then *you* really
> should use it :-)

I do.


> My argument is that, by adding it to Emacs, especially to the core,
> you're effectively supporting another official package configuration
> method, thus burdening every package maintainer with a different opinion
> with the need to learn a new DSL when reading user's bug
> reports. Perhaps every other package maintainer has converted already,
> but at least I haven't, not yet.

Yes, I agree. On the flip-side, you are removing the burden of bootstrap
problem that use-package has. I use it to ensure that all the packages I
use are installed, but I have to install it with a different technique
(I call package directly). I think that the bootstrap burden is a
sensible justification for keeping use-package in core.

Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]