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: João Távora
Subject: Re: use-package.el -> Emacs core
Date: Tue, 10 Nov 2015 08:49:36 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

Hi,

I'm reticent of this addition. In lisp (or anywhere else for that
matter), I don't like to learn new syntax unless the advantages are
clear. A perfect example would be cl's LOOP, which is it's own
mini-language which I've learned to love.

Of course adding use-package.el to Emacs wouldn't force me to use
it. However, as the maintainer of a few packages, I have to read users'
bug reports, and that mostly means I would have to learn
use-package.el's syntax, since users would more legitimately consider it
a proper way to install the packages I maintain.

Now, I see use-package.el as a `with-eval-after-load' replacement with
more bells and whistles. It appears to be weak in that sense: each of
those bells and whistles usually already has a nice concise way to
control in stock Emacs, so it's unfortunate that use-package.el
introduces new ones. And it doesn't even appear to save lines of
configuration code while at it, just someone shorter sexps. For example,
I don't see the benefit of replacing:

   (when window-system
     (with-eval-after-load 'foo
       ... more configuration
     ))

with

   (use-package foo
      :if window-system
      ... more configuration
      )

The generic example you gave for `foo-mode' is also not to convincing to
me. I would write it as

    (with-eval-after-load 'foo-mode
      (add-hook 'foo-init-hook 'some-function)
      (define-key foo-mode-map (kbd "C-c k") 'foo-hello))
    (add-to-list 'auto-mode-alist '("\\.foo$" . foo-mode))

Which is just as long, just as readable and less voodoo than
use-package. If I grep for "auto-mode-alist" in my configuration, I'm
sure to find who's setting it.

But perhaps I can be convinced otherwise or am missing something
fundamentally. Can you provide more examples of package configurations
where you definitely think it beats `with-eval-after-load' or other
alternatives? I'm guessing those would be examples that include
automatically installing a package (lazily?) from ELPA, but you tell me.

Thanks,
João



reply via email to

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