From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: req-package Date: Thu, 13 Aug 2015 16:17:15 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439497230 24733 80.91.229.3 (13 Aug 2015 20:20:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2015 20:20:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 13 22:20:29 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZPyz7-0000vv-He for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Aug 2015 22:20:21 +0200 Original-Received: from localhost ([::1]:44024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPyz6-0002hL-3d for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Aug 2015 16:20:20 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 71 Injection-Info: mx02.eternal-september.org; posting-host="6551a55313eeb1483cdfad32ce9cec6d"; logging-data="13049"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+se2gA3oOmnlp25POQTXrJ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:7W0N5JKkvfiXc7QOWtAzEd8wf9o= sha1:pj4loLalhJbbxSjTLMHj05avi2M= Original-Xref: usenet.stanford.edu gnu.emacs.help:214265 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106549 Archived-At: > 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 ) 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