unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: req-package
Date: Thu, 13 Aug 2015 16:17:15 -0400	[thread overview]
Message-ID: <jwvzj1vufnn.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.8267.1439483837.904.help-gnu-emacs@gnu.org

> Right now, `use-package' is nothing more, but a convenient way to
> structure configurations of packages, especially in terms of autoloads
> and deferring. Yes, right now it's more cosmetics and sugar, rather
> than something that one cannot live without.

Sure.  The autoloads part is mostly redundant for ELPA packages, but the
structuring part is indeed nice.  And convenience is something we all
appreciate.

> In this thread, however, we want to go deeper and discuss package
> "configuration-time" dependencies (which are not covered by
> `use-package' by default),

Exactly.

> The biggest issue, that is not solved anywhere (neither vanilla Emacs
> nor `use-package' provide facilities for this) out of the box, is the
> one that I described two posts earlier with the example on `a' and
> `b'.  Did you understand the issue?

I must have missed it.
[...going back in the thread...]
OK, found it.  But no, I don't understand the issue.  More specifically,
I understand your hypothetical example and the problem it introduces,
but I'm having a hard time imagining when that happens in practice.

We have plenty of concrete problems that I prefer not to worry too much
about the hypothetical ones (except the ones I like, of course ;-)
[ This said, sometimes the hypothetical problems are helpful to see the
  problem in its full generality and thus find a better solution.  ]

More specifically, Elisp being Turing complete (and side-effectingly
dirty and all), I know for a fact that I will always be able to come up
with some example where any neat solution won't be able to express the
specific configuration I need.

** Random thought 1

BTW, part of the problem with a solution like use-package is also that
it hides what it does.  And in some cases you need to know how it does
its job in order to be able to tweak it correctly.
E.g. depending on how the ":config" thingy (which IIUC runs after the
package is loaded) is implemented, a (with-eval-after-load <pkg> <code>)
might end up running either before or after use-package's :config code.

So, we have the usual problem (recently mentioned in the context of
ELPA), that when it works, it's great, but when it doesn't it makes
things harder because you have to look under the cover to see what happens.

** Random thought 2

The design of something like use-package necessary has to start with
the design of a convention that is simple enough to be attractive yet
powerful enough to cover the vast majority of existing cases, *and*
where most of the remaining cases can be accommodated by the package
author (i.e. the packages need to be tweaked to make configuration
easier).

To take the example of Customize, the design is something like:

   We only handle global variables that are only modified via Customize

This covers many cases, but far from all.  And it's inconvenient to
accommodate this limitation by adding more global variables
(e.g. splitting `foobar-hook' into two, one that is fully under the
control of Customize and another that can be modified by Elisp packages;
or adding `foo-bar-enable' to control whether the `bar' major mode
should enable the `foo' minor mode).


        Stefan


      parent reply	other threads:[~2015-08-13 20:17 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  7:10 req-package Edward Knyshov
2015-08-11 15:26 ` req-package Stefan Monnier
2015-08-13 12:10   ` req-package Edward Knyshov
2015-08-13 13:44     ` req-package Alexander Shukaev
2015-08-13 14:06       ` req-package Edward Knyshov
2015-08-13 14:59         ` req-package Alexander Shukaev
2015-08-13 20:43           ` req-package Edward Knyshov
     [not found]           ` <mailman.8283.1439498644.904.help-gnu-emacs@gnu.org>
2015-08-13 21:22             ` req-package Stefan Monnier
2015-08-14  5:14               ` req-package Edward Knyshov
2015-08-14  5:18               ` req-package Edward Knyshov
     [not found]               ` <mailman.8308.1439529283.904.help-gnu-emacs@gnu.org>
2015-08-14 14:07                 ` req-package Stefan Monnier
2015-08-14 14:40                   ` req-package Alexander Shukaev
2015-08-14 14:54                     ` req-package Edward Knyshov
2015-08-14 15:02                       ` req-package Alexander Shukaev
2015-08-15  8:46                         ` req-package John Wiegley
2015-08-15 19:25                           ` req-package Alexander Shukaev
2015-08-15 22:17                             ` req-package John Wiegley
2015-08-16  8:51                               ` req-package Les Harris
     [not found]                               ` <mailman.8410.1439715098.904.help-gnu-emacs@gnu.org>
2015-08-16  9:05                                 ` req-package Rusi
2015-08-16  9:38                                   ` req-package Edward Knyshov
2015-08-17 16:42                                     ` req-package John Wiegley
     [not found]                                   ` <mailman.8411.1439717896.904.help-gnu-emacs@gnu.org>
2015-08-16 10:02                                     ` req-package Rusi
2015-08-16 10:17                                       ` req-package Edward Knyshov
2015-08-16 10:17                                       ` req-package Rusi
2015-08-16 10:32                                         ` req-package Edward Knyshov
     [not found]                                         ` <mailman.8413.1439721183.904.help-gnu-emacs@gnu.org>
2015-08-16 13:07                                           ` req-package Rusi
2015-08-16 13:28                                             ` req-package Edward Knyshov
     [not found]                                             ` <mailman.8416.1439731716.904.help-gnu-emacs@gnu.org>
2015-08-17  1:11                                               ` req-package Rusi
     [not found]                   ` <mailman.8327.1439563225.904.help-gnu-emacs@gnu.org>
2015-08-14 16:58                     ` req-package Stefan Monnier
2015-08-14 17:53                       ` req-package Alexander Shukaev
2015-08-13 15:29       ` req-package Stefan Monnier
2015-08-13 15:50         ` req-package Alexander Shukaev
     [not found]         ` <mailman.8262.1439481023.904.help-gnu-emacs@gnu.org>
2015-08-13 15:56           ` req-package Stefan Monnier
2015-08-13 16:14             ` req-package Alexander Shukaev
     [not found]             ` <mailman.8266.1439482490.904.help-gnu-emacs@gnu.org>
2015-08-13 16:23               ` req-package Stefan Monnier
2015-08-13 16:37                 ` req-package Alexander Shukaev
2015-08-13 20:27                   ` req-package Edward Knyshov
2015-08-13 20:30                     ` req-package Edward Knyshov
     [not found]                 ` <mailman.8267.1439483837.904.help-gnu-emacs@gnu.org>
2015-08-13 20:17                   ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvzj1vufnn.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).