From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: use-package :after ?? Date: Fri, 12 May 2023 09:33:42 +0300 Message-ID: <83fs823vp5.fsf@gnu.org> References: <83fs87c8wg.fsf@gnu.org> <831qjn75tw.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27132"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 12 08:33:45 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pxMLY-0006mg-Hr for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 May 2023 08:33:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxMKk-00080s-GE; Fri, 12 May 2023 02:32:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxMKS-0007zl-Qz for help-gnu-emacs@gnu.org; Fri, 12 May 2023 02:32:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxMKS-0004Xm-IE for help-gnu-emacs@gnu.org; Fri, 12 May 2023 02:32:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=LMQH+zF5hCU8UNKvtrKulG62m+provdqkJsaN0RdjxY=; b=JK4zdxd5rdGF qcnlQYeNghpUr1LiNqnxmRRA6jO+KQBEafFJ8M9yeIJ0dMbdEP9zUtC6XbPJBTGHaYAaUaE/26LOb cn4Vj2yqF79Yemk75sFtA5wrkjsVNqPFTjN1TVcIFQaYKrY/DINgNrH0qewDfsWauaVm8QZyWbgCs mMKi9D2fsyK2wB8t74y9QINxpz/eFkdQPE7XFZwQb8Cawnv/oJZUIlsJTQWrtXAG0NP1SVg7fMoUi SwD+A8PZ69bkOYSya5ld/oAR8TtVHjsJhgBgvPemuXHaz035bAiezNRalNEB2zFhM3vQgKUMci8F6 zsFI6FziTfybOxK3KXzABA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxMKM-0007q6-Uu for help-gnu-emacs@gnu.org; Fri, 12 May 2023 02:32:34 -0400 In-Reply-To: (message from Ruijie Yu on Fri, 12 May 2023 09:18:14 +0800) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143566 Archived-At: > From: Ruijie Yu > Cc: Eli Zaretskii , help-gnu-emacs@gnu.org > Date: Fri, 12 May 2023 09:18:14 +0800 > > David Masterson writes: > > > Eli Zaretskii writes: > > > >> Depends how? via autoloads or via :after? > >> > >> And why does it make thing more complicated? If package FOO should be > >> loaded after BAR, and BAR should be loaded after BAZ, then the order > >> I'd expect should be: BAZ, then BAR, then FOO. Right? > > > > Yes. Will that be handled properly by the following (with global > > deferred loading)? > > > > (use-package foo :after bar > > :config (foo-setup) > > ) > > (use-package bar :after baz > > # :demand t > > ) > > (use-package baz) > > > > In particular, use-package will ensure foo-setup is called after foo is > > loaded, right? If I uncommented the :demand, should/would that make a > > difference? > > > > I may be overthinking this because of my org-ac issue and this looked > > like an obvious debugging approach. > > I attach my scratch session after macroexpanding with the :demand t > (after a pretty-print because I don't think having everything on one > line helps much). You should be able to figure out the answer to your > question by looking at the generated form and playing around with the > macroexpand form. Thanks, but the discussion here is centered on the documentation of use-package and whether it needs some improvements and clarifications. There should be no need to examine the macro-expansion of use-package's macros to reason about the documentation clarity.